commit:     9b182d1f3734c2fbf2398510653f202f352faa63
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 22:00:42 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 22:10:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b182d1f

x11-themes/gtk-engines: migrate to lua-single.eclass

Builds, tests and installs fine even when built against lua5-4 so
support all PUC Lua versions currently in the tree.

Warning - as the ebuild stands now, USE=lua IS QUIETLY IGNORED for
non-native ABIs. The dependencies are ready for enabling it there as
well but since the pkgconfig wrapper lua-single.eclass sets up is not
multilib-compatible, it is necessary to patch upstream build scripts so
that they look for the pkgconfig module "${ELUA}" rather than just "lua"
- and for some reason running eautoreconf following the patching of
configure.ac resulted in corrupted test Makefiles. Pushing it as-is in
case the maintainers have got some idea on how to make this work, if not
will probably end up patching configure directly.

Bug: https://bugs.gentoo.org/752888
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 profiles/package.mask                              |  1 +
 .../gtk-engines/gtk-engines-2.20.2-r100.ebuild     | 73 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/profiles/package.mask b/profiles/package.mask
index 73a18f18d46..52a7a2e99e7 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -607,6 +607,7 @@ kde-apps/kdebase-meta:5
 >=www-client/luakit-2.2.1-r100
 >=www-servers/lighttpd-1.4.55-r100
 >=x11-misc/devilspie2-0.43-r100
+>=x11-themes/gtk-engines-2.20.2-r100
 >=x11-wm/awesome-4.3-r100
 >=x11-wm/notion-3_p2015061300-r100
 >=mail-filter/opendkim-2.10.3-r25

diff --git a/x11-themes/gtk-engines/gtk-engines-2.20.2-r100.ebuild 
b/x11-themes/gtk-engines/gtk-engines-2.20.2-r100.ebuild
new file mode 100644
index 00000000000..597dc742bc9
--- /dev/null
+++ b/x11-themes/gtk-engines/gtk-engines-2.20.2-r100.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+GNOME2_LA_PUNT="yes"
+GNOME_TARBALL_SUFFIX="bz2"
+LUA_COMPAT=( lua5-{1..4} )
+
+inherit autotools gnome2 lua-single multilib-minimal
+
+DESCRIPTION="GTK+2 standard engines and themes"
+HOMEPAGE="https://www.gtk.org/";
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~x86-linux ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="accessibility lua"
+
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+
+# Lua dependency uses lua_gen_impl_dep() because LUA_REQ_USE doesn't seem
+# to play nicely with MULTILIB_USEDEP.
+RDEPEND="
+       >=x11-libs/gtk+-2.24.23:2[${MULTILIB_USEDEP}]
+       lua? ( $(lua_gen_impl_dep "${MULTILIB_USEDEP}") )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       >=dev-util/intltool-0.31
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-glib.h.patch
+       "${FILESDIR}"/${P}-java-look.patch
+       "${FILESDIR}"/${P}-auto-mnemonics.patch
+       "${FILESDIR}"/${P}-change-bullet.patch
+       "${FILESDIR}"/${P}-tooltips.patch
+       "${FILESDIR}"/${P}-window-dragging.patch
+)
+
+src_prepare() {
+       gnome2_src_prepare
+}
+
+multilib_src_configure() {
+       local confopts=(
+               --enable-animation
+       )
+       # TODO: fix system-lua detection so that it works for non-native ABIs,
+       # native builds rely on the pkgconfig wrapper set up by 
lua-single.eclass
+       # but that wrapper is not multilib-compatible.
+       if multilib_is_native_abi; then
+               confopts+=(
+                       $(use_enable lua)
+                       $(use_with lua system-lua)
+               )
+       else
+               confopts+=(
+                       --disable-lua
+               )
+       fi
+       ECONF_SOURCE=${S} gnome2_src_configure "${confopts[@]}"
+}
+
+multilib_src_install() {
+       gnome2_src_install
+}
+
+multilib_src_install_all() {
+       einstalldocs
+}

Reply via email to