commit: 826d6c4bc1d93c7280725d48eb8284ba19703402 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Mon Dec 29 16:23:39 2025 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Mon Dec 29 16:23:59 2025 +0000 URL: https://gitweb.gentoo.org/repo/dev/ulm.git/commit/?id=826d6c4b
x11-libs/motif: add 2.4.0 Ebuild copied from motif-2.3.8-r6.ebuild in Gentoo repo. Work in progress and needs more testing. Bug: https://bugs.gentoo.org/968120 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> x11-libs/motif/Manifest | 1 + x11-libs/motif/files/Mwm.defaults | 14 +++ .../motif/files/motif-2.4.0-icons-makefile.patch | 17 ++++ x11-libs/motif/metadata.xml | 10 ++ x11-libs/motif/motif-2.4.0.ebuild | 104 +++++++++++++++++++++ 5 files changed, 146 insertions(+) diff --git a/x11-libs/motif/Manifest b/x11-libs/motif/Manifest new file mode 100644 index 0000000..0ea53ed --- /dev/null +++ b/x11-libs/motif/Manifest @@ -0,0 +1 @@ +DIST motif-2.4.0.tar.gz 8816531 BLAKE2B f70c10706295db8d0103db7a79ecc0a268e9b476a66daafd3dcab844215a4ad2317cdcb8ed792dccaff8d7d0aec6518a81057786c0e786e6e2dea15ba64d8b5f SHA512 5e9b0ac120a3e3357517f8d883ec40b4392c91f67cf415473460dc0129b1f378c1915508c80d84afcaa7b8311c4895aff39310ec814d302e16bcc50266bbe383 diff --git a/x11-libs/motif/files/Mwm.defaults b/x11-libs/motif/files/Mwm.defaults new file mode 100644 index 0000000..ea91b6f --- /dev/null +++ b/x11-libs/motif/files/Mwm.defaults @@ -0,0 +1,14 @@ +Mwm*fontList: variable +Mwm*iconClick: False +Mwm*iconPlacement: top left +Mwm*moveOpaque: True +Mwm*rootButtonClick: True +Mwm*foreground: #000000 +Mwm*background: #B8B8C0 +Mwm*enableThinThickness: True +Mwm*enableEtchedInMenu: True +Mwm*menu*fontList: -adobe-helvetica-medium-r-*--*-120-*-*-*-*-*-* +Mwm*client*title*fontList: -adobe-helvetica-bold-r-*--*-100-*-*-*-*-*-* +Mwm*icon*fontList: -adobe-helvetica-bold-r-*--*-80-*-*-*-*-*-* +Mwm*feedback*fontList: -adobe-helvetica-bold-r-*--*-100-*-*-*-*-*-* +Mwm*multiClickTime: 300 diff --git a/x11-libs/motif/files/motif-2.4.0-icons-makefile.patch b/x11-libs/motif/files/motif-2.4.0-icons-makefile.patch new file mode 100644 index 0000000..5edd446 --- /dev/null +++ b/x11-libs/motif/files/motif-2.4.0-icons-makefile.patch @@ -0,0 +1,17 @@ +commit e1f248f6fcefc5f1a0ce6a942dfd7fc59d6ca53a +Author: Ulrich Müller <[email protected]> +Date: Mon Dec 29 16:29:59 2025 +0100 + + bug: icons/Makefile.am: Fix typo for xm_error.xpm + +--- a/icons/Makefile.am ++++ b/icons/Makefile.am +@@ -10,7 +10,7 @@ icon_DATA = \ + xm_question.svg \ + xm_warning.svg \ + xm_working.svg \ +- xm_error.svg \ ++ xm_error.xpm \ + xm_information.xpm \ + xm_question.xpm \ + xm_warning.xpm \ diff --git a/x11-libs/motif/metadata.xml b/x11-libs/motif/metadata.xml new file mode 100644 index 0000000..522b608 --- /dev/null +++ b/x11-libs/motif/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + </maintainer> + <upstream> + <remote-id type="github">thentenaar/motif</remote-id> + </upstream> +</pkgmetadata> diff --git a/x11-libs/motif/motif-2.4.0.ebuild b/x11-libs/motif/motif-2.4.0.ebuild new file mode 100644 index 0000000..0535c9f --- /dev/null +++ b/x11-libs/motif/motif-2.4.0.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs multilib-minimal + +DESCRIPTION="The Motif user interface component toolkit" +HOMEPAGE="https://github.com/thentenaar/motif" +SRC_URI="https://github.com/thentenaar/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1+ MIT" +SLOT="0/5" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos ~x64-solaris" +IUSE="examples jpeg png static-libs unicode xft" + +RDEPEND="x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXmu[${MULTILIB_USEDEP}] + x11-libs/libXpm[${MULTILIB_USEDEP}] + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-libs/libXrender[${MULTILIB_USEDEP}] + x11-libs/libXt[${MULTILIB_USEDEP}] + jpeg? ( media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}] ) + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) + unicode? ( virtual/libiconv[${MULTILIB_USEDEP}] ) + xft? ( + media-libs/fontconfig[${MULTILIB_USEDEP}] + x11-libs/libXft[${MULTILIB_USEDEP}] + )" + +DEPEND="${RDEPEND} + x11-base/xorg-proto + x11-misc/xbitmaps" + +BDEPEND="sys-devel/flex + dev-util/byacc" + +PATCHES=( "${FILESDIR}/${P}-icons-makefile.patch" ) + +src_prepare() { + default + + AT_M4DIR=. eautoreconf + + # feel free to fix properly if you care + append-flags -fno-strict-aliasing + + if use !elibc_glibc && use !elibc_musl; then + # libiconv detection in configure script doesn't always work + # http://bugs.motifzone.net/show_bug.cgi?id=1423 + export LIBS="${LIBS} -liconv" + fi + + # avoid mismatch of lex variants #936172 + export LEX=flex + # "bison -y" causes runtime crashes #355795 + export YACC=byacc + + # remember the name of the C compiler for the native ABI + MY_NATIVE_CC=$(tc-getCC) +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + $(use_enable static-libs static) \ + $(use_enable unicode utf8) \ + $(use_with jpeg) \ + $(use_with png) \ + $(use_with xft) +} + +multilib_src_compile() { + if ! multilib_is_native_abi; then + # The wmluiltok build tool is linked with libfl.a, so always + # compile it for the native ABI + emake -C tools/wml CC="${MY_NATIVE_CC}" \ + wmluiltok_LDADD="-lfl" wmluiltok + fi + emake +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi && use examples; then + emake -C demos DESTDIR="${D}" install-data + dodir /usr/share/doc/${PF}/demos + mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos || die + fi +} + +multilib_src_install_all() { + # mwm default configs + insinto /usr/share/X11/app-defaults + newins "${FILESDIR}"/Mwm.defaults Mwm + + # cleanup + rm -rf "${ED}"/usr/share/Xm || die + find "${D}" -type f -name "*.la" -delete || die + + dodoc README.md +}
