summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/gd/gd-2.2.5-r2.ebuild11
1 files changed, 9 insertions, 2 deletions
diff --git a/media-libs/gd/gd-2.2.5-r2.ebuild b/media-libs/gd/gd-2.2.5-r2.ebuild
index 799f5b0382a..636cf3398f4 100644
--- a/media-libs/gd/gd-2.2.5-r2.ebuild
+++ b/media-libs/gd/gd-2.2.5-r2.ebuild
@@ -3,7 +3,7 @@
EAPI="7"
-inherit autotools multilib-minimal
+inherit autotools flag-o-matic multilib-minimal
DESCRIPTION="Graphics library for fast image creation"
HOMEPAGE="https://libgd.org/ https://www.boutell.com/gd/"
@@ -16,7 +16,7 @@ SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz
LICENSE="gd IJG HPND BSD"
SLOT="2/3"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="fontconfig jpeg png static-libs test tiff truetype webp xpm zlib"
+IUSE="cpu_flags_x86_sse fontconfig jpeg png static-libs test tiff truetype webp xpm zlib"
# fontconfig has prefixed font paths, details see bug #518970
REQUIRED_USE="prefix? ( fontconfig )"
@@ -59,6 +59,13 @@ src_prepare() {
}
multilib_src_configure() {
+ # bug 603360, https://github.com/libgd/libgd/blob/fd06f7f83c5e78bf5b7f5397746b4e5ee4366250/docs/README.TESTING#L65
+ if use cpu_flags_x86_sse ; then
+ append-cflags -msse -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+
# we aren't actually {en,dis}abling X here ... the configure
# script uses it just to add explicit -I/-L paths which we
# don't care about on Gentoo systems.