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/"
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 )"
}
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.