1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
10 DESCRIPTION="Interface to Thomas Boutell's gd library"
13 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
14 IUSE="animgif gif jpeg png truetype xpm"
16 "${FILESDIR}/${P}-rt106594.patch"
19 virtual/perl-Math-Complex
31 media-libs/gd[truetype]
38 gif? ( media-libs/giflib )
41 virtual/perl-ExtUtils-CBuilder
42 virtual/perl-ExtUtils-MakeMaker
48 perl-module_src_prepare
51 ln -s "${S}"/lib/GD.xs "${S}"/GD.xs
53 sed -i "s/use Getopt::Long;/use Getopt::Long qw(:config pass_through);/" \
54 "${S}"/Makefile.PL || die
59 myconf="VERSION_33,GD_UNCLOSEDPOLY,GD_FTCIRCLE" # Per line 284 of Makefile.PL
60 use gif && use animgif && myconf+=",ANIMGIF"
61 use jpeg && myconf+=",JPEG"
62 use truetype && myconf+=",FT"
63 use png && myconf+=",PNG"
64 use xpm && myconf+=",XPM"
65 use gif && myconf+=",GIF"
66 myconf="-options '${myconf}'"
67 perl-module_src_configure