commit:     52b195c1624b27428e4fca190e0ab4316cf52d2d
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 26 22:15:10 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat Dec 26 23:18:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52b195c1

media-gfx/gimp/gimp: migrate to lua-single.eclass

Latest 2.99 and the live ebuild; older versions do not depend on Lua.
Approved by the maintainer via comment in the GitHub PR #18768.
Also includes the requested Pango version bump in the dependencies of 9999.

Closes: https://bugs.gentoo.org/752747
Closes: https://bugs.gentoo.org/755962
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../{gimp-9999.ebuild => gimp-2.99.2-r100.ebuild}  | 46 +++++++++++-----------
 media-gfx/gimp/gimp-9999.ebuild                    | 32 +++++++++------
 2 files changed, 44 insertions(+), 34 deletions(-)

diff --git a/media-gfx/gimp/gimp-9999.ebuild 
b/media-gfx/gimp/gimp-2.99.2-r100.ebuild
similarity index 85%
copy from media-gfx/gimp/gimp-9999.ebuild
copy to media-gfx/gimp/gimp-2.99.2-r100.ebuild
index 0d94d06ee02..0ee31a0bca9 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-2.99.2-r100.ebuild
@@ -1,25 +1,26 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
+LUA_COMPAT=( luajit )
 PYTHON_COMPAT=( python3_{6,7,8,9} )
 GNOME2_EAUTORECONF=yes
 VALA_MIN_API_VERSION="0.40"
 VALA_USE_DEPEND=vapigen
 
-inherit autotools git-r3 gnome2 python-single-r1 toolchain-funcs vala virtualx
+inherit autotools gnome2 lua-single python-single-r1 toolchain-funcs vala 
virtualx
 
 DESCRIPTION="GNU Image Manipulation Program"
 HOMEPAGE="https://www.gimp.org/";
-EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gimp.git";
-SRC_URI=""
+SRC_URI="mirror://gimp/v2.99/${P}.tar.bz2"
 LICENSE="GPL-3 LGPL-3"
 SLOT="0/3"
-KEYWORDS=""
+#KEYWORDS="~amd64"
 
 IUSE="aalib alsa aqua debug doc gnome heif javascript jpeg2k lua mng openexr 
postscript python udev unwind vala vector-icons webp wmf xpm 
cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
+       python? ( ${PYTHON_REQUIRED_USE} )"
 
 RESTRICT="!test? ( test )"
 
@@ -35,10 +36,10 @@ COMMON_DEPEND="
        dev-libs/libxslt
        >=gnome-base/librsvg-2.40.21:2
        >=media-gfx/mypaint-brushes-2.0.2:=
-       >=media-libs/babl-0.1.82[introspection,lcms,vala?]
+       >=media-libs/babl-0.1.78[introspection,lcms,vala?]
        >=media-libs/fontconfig-2.12.6
        >=media-libs/freetype-2.10.2
-       >=media-libs/gegl-0.4.27:0.4[cairo,introspection,lcms,vala?]
+       >=media-libs/gegl-0.4.26:0.4[cairo,introspection,lcms,vala?]
        >=media-libs/gexiv2-0.10.10
        >=media-libs/harfbuzz-2.6.5
        >=media-libs/lcms-2.9:2
@@ -60,8 +61,10 @@ COMMON_DEPEND="
        javascript? ( dev-libs/gjs )
        jpeg2k? ( >=media-libs/openjpeg-2.3.1:2= )
        lua? (
-               dev-lang/luajit
-               dev-lua/lgi
+               ${LUA_DEPS}
+               $(lua_gen_cond_dep '
+                       dev-lua/lgi[${LUA_USEDEP}]
+               ')
        )
        mng? ( media-libs/libmng:= )
        openexr? ( >=media-libs/openexr-2.3.0:= )
@@ -97,7 +100,6 @@ DEPEND="
        >=sys-devel/automake-1.11
        >=sys-devel/gettext-0.21
        >=sys-devel/libtool-2.4.6
-       virtual/pkgconfig
        doc? (
                >=dev-util/gtk-doc-1.32
                dev-util/gtk-doc-am
@@ -105,33 +107,33 @@ DEPEND="
        vala? ( $(vala_depend) )
 "
 
+# TODO: there are probably more atoms in DEPEND which should be in BDEPEND now
+BDEPEND="virtual/pkgconfig"
+
 DOCS=( "AUTHORS" "HACKING" "NEWS" "README" "README.i18n" )
 
 # Bugs 685210 (and duplicate 691070)
 PATCHES=(
        "${FILESDIR}/${PN}-2.10_fix_test-appdata.patch"
+       "${FILESDIR}/${P}_fix_autoconf-2.70.patch"
 )
 
 pkg_setup() {
+       use lua && lua-single_pkg_setup
+
        if use python; then
                python-single-r1_pkg_setup
        fi
 }
 
 src_prepare() {
+       sed -i -e 's/\[gegl_micro_version\], \[27\]/\[gegl_micro_version\], 
\[26\]/' configure.ac || die
+
        sed -i -e 's/mypaint-brushes-1.0/mypaint-brushes-2.0/' configure.ac || 
die #737794
 
        sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
        sed 's:-DGIMP_DISABLE_DEPRECATED:-DGIMP_protect_DISABLE_DEPRECATED:g' 
-i configure.ac || die #615144
 
-       # Fix checking of gtk-doc.make if USE="-doc" like autogen.sh
-       # USE="doc" is currently broken for gimp-9999 due to absence of 
appropriate *.m4 file
-       if ! use doc ; then
-               echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
-               sed -i -e "/CLEANFILES/s/^/#/g" \
-               
"${S}"/devel-docs/{libgimp,libgimpbase,libgimpcolor,libgimpconfig,libgimpmath,libgimpmodule,libgimpthumb,libgimpwidgets}/Makefile.am
 || die
-       fi
-
        gnome2_src_prepare  # calls eautoreconf
 
        use vala && vala_src_prepare
@@ -210,7 +212,7 @@ _rename_plugins() {
        einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout 
(bug #664938)...'
        local prepend=gimp-org-
        (
-               cd "${ED%/}"/usr/$(get_libdir)/gimp/2.99/plug-ins || exit 1
+               cd "${ED}"/usr/$(get_libdir)/gimp/2.99/plug-ins || exit 1
                for plugin_slash in $(ls -d1 */); do
                    plugin=${plugin_slash%/}
                    if [[ -f ${plugin}/${plugin} ]]; then
@@ -236,12 +238,12 @@ src_install() {
 
        # Workaround for bug #321111 to give GIMP the least
        # precedence on PDF documents by default
-       mv "${ED%/}"/usr/share/applications/{,zzz-}gimp.desktop || die
+       mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
 
        find "${D}" -name '*.la' -type f -delete || die
 
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
-       mv "${ED%/}"/usr/share/man/man1/gimp-console{-*,}.1 || die
+       mv "${ED}"/usr/share/man/man1/gimp-console{-*,}.1 || die
 
        _rename_plugins || die
 }

diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild
index 0d94d06ee02..04c9a09842a 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-9999.ebuild
@@ -1,14 +1,15 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
+LUA_COMPAT=( luajit )
 PYTHON_COMPAT=( python3_{6,7,8,9} )
 GNOME2_EAUTORECONF=yes
 VALA_MIN_API_VERSION="0.40"
 VALA_USE_DEPEND=vapigen
 
-inherit autotools git-r3 gnome2 python-single-r1 toolchain-funcs vala virtualx
+inherit autotools git-r3 gnome2 lua-single python-single-r1 toolchain-funcs 
vala virtualx
 
 DESCRIPTION="GNU Image Manipulation Program"
 HOMEPAGE="https://www.gimp.org/";
@@ -19,7 +20,8 @@ SLOT="0/3"
 KEYWORDS=""
 
 IUSE="aalib alsa aqua debug doc gnome heif javascript jpeg2k lua mng openexr 
postscript python udev unwind vala vector-icons webp wmf xpm 
cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
+       python? ( ${PYTHON_REQUIRED_USE} )"
 
 RESTRICT="!test? ( test )"
 
@@ -35,10 +37,10 @@ COMMON_DEPEND="
        dev-libs/libxslt
        >=gnome-base/librsvg-2.40.21:2
        >=media-gfx/mypaint-brushes-2.0.2:=
-       >=media-libs/babl-0.1.82[introspection,lcms,vala?]
+       >=media-libs/babl-0.1.84[introspection,lcms,vala?]
        >=media-libs/fontconfig-2.12.6
        >=media-libs/freetype-2.10.2
-       >=media-libs/gegl-0.4.27:0.4[cairo,introspection,lcms,vala?]
+       >=media-libs/gegl-0.4.28:0.4[cairo,introspection,lcms,vala?]
        >=media-libs/gexiv2-0.10.10
        >=media-libs/harfbuzz-2.6.5
        >=media-libs/lcms-2.9:2
@@ -52,7 +54,7 @@ COMMON_DEPEND="
        >=x11-libs/gdk-pixbuf-2.40.0:2
        >=x11-libs/gtk+-3.24.16:3
        x11-libs/libXcursor
-       >=x11-libs/pango-1.42.4
+       >=x11-libs/pango-1.44.7
        aalib? ( media-libs/aalib )
        alsa? ( >=media-libs/alsa-lib-1.0.0 )
        aqua? ( >=x11-libs/gtk-mac-integration-2.0.0 )
@@ -60,8 +62,10 @@ COMMON_DEPEND="
        javascript? ( dev-libs/gjs )
        jpeg2k? ( >=media-libs/openjpeg-2.3.1:2= )
        lua? (
-               dev-lang/luajit
-               dev-lua/lgi
+               ${LUA_DEPS}
+               $(lua_gen_cond_dep '
+                       dev-lua/lgi[${LUA_USEDEP}]
+               ')
        )
        mng? ( media-libs/libmng:= )
        openexr? ( >=media-libs/openexr-2.3.0:= )
@@ -97,7 +101,6 @@ DEPEND="
        >=sys-devel/automake-1.11
        >=sys-devel/gettext-0.21
        >=sys-devel/libtool-2.4.6
-       virtual/pkgconfig
        doc? (
                >=dev-util/gtk-doc-1.32
                dev-util/gtk-doc-am
@@ -105,6 +108,9 @@ DEPEND="
        vala? ( $(vala_depend) )
 "
 
+# TODO: there are probably more atoms in DEPEND which should be in BDEPEND now
+BDEPEND="virtual/pkgconfig"
+
 DOCS=( "AUTHORS" "HACKING" "NEWS" "README" "README.i18n" )
 
 # Bugs 685210 (and duplicate 691070)
@@ -113,6 +119,8 @@ PATCHES=(
 )
 
 pkg_setup() {
+       use lua && lua-single_pkg_setup
+
        if use python; then
                python-single-r1_pkg_setup
        fi
@@ -210,7 +218,7 @@ _rename_plugins() {
        einfo 'Renaming plug-ins to not collide with pre-2.10.6 file layout 
(bug #664938)...'
        local prepend=gimp-org-
        (
-               cd "${ED%/}"/usr/$(get_libdir)/gimp/2.99/plug-ins || exit 1
+               cd "${ED}"/usr/$(get_libdir)/gimp/2.99/plug-ins || exit 1
                for plugin_slash in $(ls -d1 */); do
                    plugin=${plugin_slash%/}
                    if [[ -f ${plugin}/${plugin} ]]; then
@@ -236,12 +244,12 @@ src_install() {
 
        # Workaround for bug #321111 to give GIMP the least
        # precedence on PDF documents by default
-       mv "${ED%/}"/usr/share/applications/{,zzz-}gimp.desktop || die
+       mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
 
        find "${D}" -name '*.la' -type f -delete || die
 
        # Prevent dead symlink gimp-console.1 from downstream man page 
compression (bug #433527)
-       mv "${ED%/}"/usr/share/man/man1/gimp-console{-*,}.1 || die
+       mv "${ED}"/usr/share/man/man1/gimp-console{-*,}.1 || die
 
        _rename_plugins || die
 }

Reply via email to