commit:     04f33a597c41dbb22b483fcbff1d9a2b2cfefb95
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Wed May  1 22:00:41 2019 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Mon May  6 11:04:04 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f33a59

media-gfx/gimp: Move sandbox fixes from src_compile to src_configure

The configure script is accessing graphics hardware already.
Bug: https://bugs.gentoo.org/684886
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Package-Manager: Portage-2.3.65, Repoman-2.3.12

 .../{gimp-9999.ebuild => gimp-2.10.10-r1.ebuild}   | 43 ++++++++++++----------
 media-gfx/gimp/gimp-9999.ebuild                    | 27 ++++++++------
 2 files changed, 39 insertions(+), 31 deletions(-)

diff --git a/media-gfx/gimp/gimp-9999.ebuild 
b/media-gfx/gimp/gimp-2.10.10-r1.ebuild
similarity index 90%
copy from media-gfx/gimp/gimp-9999.ebuild
copy to media-gfx/gimp/gimp-2.10.10-r1.ebuild
index 81a0a726eb3..988122916d6 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-2.10.10-r1.ebuild
@@ -5,15 +5,14 @@ EAPI=6
 PYTHON_COMPAT=( python2_7 )
 GNOME2_EAUTORECONF=yes
 
-inherit virtualx autotools gnome2 multilib python-single-r1 git-r3
+inherit eapi7-ver virtualx autotools gnome2 multilib python-single-r1
 
 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/v$(ver_cut 1-2)/${P}.tar.bz2"
 LICENSE="GPL-3 LGPL-3"
 SLOT="2"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
 
 LANGS="am ar ast az be bg br ca ca@valencia cs csb da de dz el en_CA en_GB eo 
es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml 
ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te 
th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
 IUSE="alsa aalib altivec aqua debug doc openexr gnome heif postscript jpeg2k 
cpu_flags_x86_mmx mng python cpu_flags_x86_sse udev unwind vector-icons webp 
wmf xpm"
@@ -70,7 +69,6 @@ RDEPEND=">=dev-libs/glib-2.56.0:2
 DEPEND="${RDEPEND}
        >=dev-lang/perl-5.10.0
        dev-libs/appstream-glib
-       dev-util/gdbus-codegen
        dev-util/gtk-update-icon-cache
        sys-apps/findutils
        virtual/pkgconfig
@@ -78,7 +76,6 @@ DEPEND="${RDEPEND}
        >=sys-devel/gettext-0.19
        doc? ( >=dev-util/gtk-doc-1 )
        >=sys-devel/libtool-2.2
-       >=sys-devel/autoconf-2.54
        >=sys-devel/automake-1.11
        dev-util/gtk-doc-am"
 
@@ -102,10 +99,26 @@ src_prepare() {
        fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
 }
 
+_adjust_sandbox() {
+       # Bugs #569738 and #591214
+       local nv
+       for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
+               # We do not check for existence as they may show up later
+               # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
+               addwrite "${nv}"
+       done
+
+       addwrite /dev/dri/  # bugs #574038 and #684886
+       addwrite /dev/ati/  # bug #589198
+       addwrite /proc/mtrr  # bug #589198
+}
+
 src_configure() {
+       _adjust_sandbox
+
        local myconf=(
                GEGL="${EPREFIX}"/usr/bin/gegl-0.4
-               GDBUS_CODEGEN="${EPREFIX}"/usr/bin/gdbus-codegen
+               GDBUS_CODEGEN="${EPREFIX}"/bin/false
 
                --enable-default-binary
                --disable-silent-rules
@@ -141,17 +154,6 @@ src_configure() {
 }
 
 src_compile() {
-       # Bugs #569738 and #591214
-       local nv
-       for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
-               # We do not check for existence as they may show up later
-               # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
-               addwrite "${nv}"
-       done
-       addwrite /dev/dri/  # bug #574038
-       addwrite /dev/ati/  # bug 589198
-       addwrite /proc/mtrr  # bug 589198
-
        export XDG_DATA_DIRS="${EPREFIX}"/usr/share  # bug 587004
        gnome2_src_compile
 }
@@ -173,7 +175,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.0/plug-ins || exit 1
                for plugin_slash in $(ls -d1 */); do
                    plugin=${plugin_slash%/}
                    if [[ -f ${plugin}/${plugin} ]]; then
@@ -204,7 +206,8 @@ src_install() {
        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
+       local gimp_app_version=$(get_version_component_range 1-2)
+       mv "${ED%/}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 
|| die
 
        _rename_plugins || die
        _clean_up_locales

diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild
index 81a0a726eb3..30b9a0ee9d5 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-9999.ebuild
@@ -102,7 +102,23 @@ src_prepare() {
        fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
 }
 
+_adjust_sandbox() {
+       # Bugs #569738 and #591214
+       local nv
+       for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
+               # We do not check for existence as they may show up later
+               # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
+               addwrite "${nv}"
+       done
+
+       addwrite /dev/dri/  # bugs #574038 and #684886
+       addwrite /dev/ati/  # bug #589198
+       addwrite /proc/mtrr  # bug #589198
+}
+
 src_configure() {
+       _adjust_sandbox
+
        local myconf=(
                GEGL="${EPREFIX}"/usr/bin/gegl-0.4
                GDBUS_CODEGEN="${EPREFIX}"/usr/bin/gdbus-codegen
@@ -141,17 +157,6 @@ src_configure() {
 }
 
 src_compile() {
-       # Bugs #569738 and #591214
-       local nv
-       for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
-               # We do not check for existence as they may show up later
-               # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
-               addwrite "${nv}"
-       done
-       addwrite /dev/dri/  # bug #574038
-       addwrite /dev/ati/  # bug 589198
-       addwrite /proc/mtrr  # bug 589198
-
        export XDG_DATA_DIRS="${EPREFIX}"/usr/share  # bug 587004
        gnome2_src_compile
 }

Reply via email to