1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools toolchain-funcs
7 MY_P=${P/graphicsm/GraphicsM}
9 DESCRIPTION="Collection of tools and libraries for many image formats"
10 HOMEPAGE="http://www.graphicsmagick.org/"
14 if [[ ${PV} == "9999" ]] ; then
16 EHG_REPO_URI="http://hg.code.sf.net/p/${PN}/code"
18 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
19 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
22 IUSE="bzip2 cxx debug fpx imagemagick jbig jpeg lcms lzma modules openmp
23 perl png postscript q16 q32 static-libs svg threads tiff truetype
26 RDEPEND="dev-libs/libltdl:0
27 bzip2? ( app-arch/bzip2 )
28 fpx? ( media-libs/libfpx )
29 imagemagick? ( !media-gfx/imagemagick )
30 jbig? ( media-libs/jbigkit )
31 jpeg? ( virtual/jpeg:0 )
32 lcms? ( media-libs/lcms:2 )
33 lzma? ( app-arch/xz-utils )
34 perl? ( dev-lang/perl )
35 png? ( media-libs/libpng:0= )
36 postscript? ( app-text/ghostscript-gpl )
37 svg? ( dev-libs/libxml2 )
38 tiff? ( media-libs/tiff:0 )
41 >=media-libs/freetype-2
43 webp? ( media-libs/libwebp:= )
44 wmf? ( media-libs/libwmf )
49 zlib? ( sys-libs/zlib )"
55 "${FILESDIR}"/${PN}-1.3.19-flags.patch
56 "${FILESDIR}"/${PN}-1.3.19-perl.patch
70 if use openmp && tc-has-openmp; then
78 $(use_enable static-libs static)
79 $(use_enable debug prof)
80 $(use_enable debug gcov)
81 $(use_enable imagemagick magick-compat)
84 --with-quantum-depth=${depth}
86 $(use_with cxx magick-plus-plus)
88 --with-perl-options=INSTALLDIRS=vendor
89 $(use_with bzip2 bzlib)
90 $(use_with postscript dps)
96 $(use_with lcms lcms2)
100 $(use_with truetype ttf)
102 --with-fontpath="${EPREFIX}"/usr/share/fonts
103 --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts
104 --with-windows-font-dir="${EPREFIX}"/usr/share/fonts/corefonts
109 econf "${myeconfargs[@]}"
114 use perl && emake perl-build
118 unset DISPLAY # some perl tests fail when DISPLAY is set
126 emake -C PerlMagick DESTDIR="${D}" install
127 find "${ED}" -type f -name perllocal.pod -exec rm -f {} + || die
128 find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} + || die
131 find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + || die