media-gfx/gimp: Fix suppressing system CFLAGS on configuration tests
authorSergey Torokhov <torokhov-s-a@yandex.ru>
Sun, 15 Dec 2019 22:38:29 +0000 (01:38 +0300)
committerJoonas Niilola <juippis@gentoo.org>
Tue, 7 Jan 2020 06:20:00 +0000 (08:20 +0200)
During configuration tests CPU support of SSE2 and SSE4.1 in configure.ac file
the system env variable CFLAGS parameters are suppressed by addition of -msse2
and -msse4.1 that results in the GIMP will be compiled with their support
but the compilation will fail if system CFLAGS has SSE2 and SSE4.1 disabled
(i.e. -mno-sse2 and -mno-sse4.1 is used).

Closes: https://bugs.gentoo.org/702554
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/13992
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
media-gfx/gimp/gimp-2.10.10-r1.ebuild
media-gfx/gimp/gimp-2.10.12.ebuild
media-gfx/gimp/gimp-2.10.14.ebuild
media-gfx/gimp/gimp-2.9.8-r1.ebuild

index ff1bb96d42f1394c774e3b2dc2289f0264300494..f3976c3f12b0da6a4c9352595f3e1d1552bf0d91 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -101,6 +101,10 @@ pkg_setup() {
 }
 
 src_prepare() {
+       # Disable system CFLAGS suppressing on SSE{2,4.1} support tests by addition of {SSE2,SSE4_1}_EXTRA_CFLAGS: bug #702554
+       sed -i -e 's:\$intrinsics_save_CFLAGS \$SSE2_EXTRA_CFLAGS:\$SSE2_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' \
+               -e 's:\$intrinsics_save_CFLAGS \$SSE4_1_EXTRA_CFLAGS:\$SSE4_1_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' configure.ac || die
+
        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
 
index b3c8a9550e9a26f5a217c983372fd3fba1e0bf2b..3b13abe136afac84c9a3253bae7f1983e51754e4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -101,6 +101,10 @@ pkg_setup() {
 }
 
 src_prepare() {
+       # Disable system CFLAGS suppressing on SSE{2,4.1} support tests by addition of {SSE2,SSE4_1}_EXTRA_CFLAGS: bug #702554
+       sed -i -e 's:\$intrinsics_save_CFLAGS \$SSE2_EXTRA_CFLAGS:\$SSE2_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' \
+               -e 's:\$intrinsics_save_CFLAGS \$SSE4_1_EXTRA_CFLAGS:\$SSE4_1_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' configure.ac || die
+
        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
 
index f1341996c4fa0e22c9cc677ded0a2d981829e144..59020299a27262cc886c97c8e7e7662cb5d347cc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -101,6 +101,10 @@ pkg_setup() {
 }
 
 src_prepare() {
+       # Disable system CFLAGS suppressing on SSE{2,4.1} support tests by addition of {SSE2,SSE4_1}_EXTRA_CFLAGS: bug #702554
+       sed -i -e 's:\$intrinsics_save_CFLAGS \$SSE2_EXTRA_CFLAGS:\$SSE2_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' \
+               -e 's:\$intrinsics_save_CFLAGS \$SSE4_1_EXTRA_CFLAGS:\$SSE4_1_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' configure.ac || die
+
        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
 
index 162fd88fc46e12606f485874e3044bb6ccaee0d1..fc0e9d31d199dbfdeb050d75c4ca25a40fe4a160 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -16,6 +16,8 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~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 postscript cpu_flags_x86_mmx mng pdf python smp cpu_flags_x86_sse udev vector-icons webp wmf xpm"
 
+RESTRICT="!test? ( test )"
+
 RDEPEND=">=dev-libs/glib-2.40.0:2
        >=dev-libs/atk-2.2.0
        >=x11-libs/gtk+-2.24.10:2
@@ -94,6 +96,10 @@ PATCHES=(
 )
 
 src_prepare() {
+       # Disable system CFLAGS suppressing on SSE{2,4.1} support tests by addition of {SSE2,SSE4_1}_EXTRA_CFLAGS: bug #702554
+       sed -i -e 's:\$intrinsics_save_CFLAGS \$SSE2_EXTRA_CFLAGS:\$SSE2_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' \
+               -e 's:\$intrinsics_save_CFLAGS \$SSE4_1_EXTRA_CFLAGS:\$SSE4_1_EXTRA_CFLAGS \$intrinsics_save_CFLAGS:' configure.ac || die
+
        gnome2_src_prepare
 
        sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864