152
|
1 # Copyright 1999-2009 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
|
3 # $Header: $
|
|
4
|
|
5 EAPI="2"
|
|
6
|
|
7 inherit flag-o-matic perl-app
|
|
8
|
|
9 MY_P=${P/graphicsm/GraphicsM}
|
|
10
|
|
11 DESCRIPTION="A collection of tools and libraries for many image formats"
|
|
12 HOMEPAGE="http://www.graphicsmagick.org/"
|
|
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
|
|
14
|
|
15 LICENSE="as-is"
|
|
16 SLOT="0"
|
|
17 KEYWORDS="~amd64 ~x86"
|
|
18 IUSE="bzip2 cxx debug fpx imagemagick jbig +jpeg +jpeg2k lcms openmp
|
|
19 perl +png q16 q32 +svg +threads tiff +truetype X wmf zlib"
|
|
20
|
|
21 DEPEND="bzip2? ( app-arch/bzip2 )
|
|
22 fpx? ( media-libs/libfpx )
|
|
23 virtual/ghostscript
|
|
24 jbig? ( media-libs/jbigkit )
|
|
25 jpeg? ( media-libs/jpeg )
|
|
26 jpeg2k? ( >=media-libs/jasper-1.701.0 )
|
|
27 lcms? ( media-libs/lcms )
|
|
28 media-video/mpeg2vidcodec
|
|
29 openmp? ( sys-devel/gcc[openmp] )
|
|
30 perl? ( dev-lang/perl )
|
|
31 png? ( media-libs/libpng )
|
|
32 svg? ( dev-libs/libxml2 )
|
|
33 tiff? ( >=media-libs/tiff-3.8.2 )
|
|
34 truetype? ( >=media-libs/freetype-2.0 )
|
|
35 wmf? ( media-libs/libwmf )
|
|
36 X? ( x11-libs/libXext
|
|
37 x11-libs/libSM
|
|
38 x11-libs/libX11
|
|
39 x11-libs/libICE )
|
|
40 imagemagick? ( !media-gfx/imagemagick )"
|
|
41 RDEPEND=${DEPEND}
|
|
42 S=${WORKDIR}/${MY_P}
|
|
43
|
|
44 src_configure() {
|
|
45 local quantumDepth="--with-quantum-depth="
|
|
46 if use q16 ; then
|
|
47 quantumDepth="${quantumDepth}16"
|
|
48 elif use q32 ; then
|
|
49 quantumDepth="${quantumDepth}32"
|
|
50 else
|
|
51 quantumDepth="${quantumDepth}8"
|
|
52 fi
|
|
53
|
|
54 use debug && filter-flags -fomit-frame-pointer
|
|
55
|
|
56 econf \
|
|
57 ${quantumDepth} \
|
|
58 $( use_enable imagemagick magick-compat ) \
|
|
59 $( use_enable openmp ) \
|
|
60 $( use_with bzip2 bzlib ) \
|
|
61 $( use_with fpx ) \
|
|
62 $( use_with jbig ) \
|
|
63 $( use_with jpeg ) \
|
|
64 $( use_with jpeg2k jp2 ) \
|
|
65 $( use_with lcms ) \
|
|
66 $( use_with cxx magick-plus-plus ) \
|
|
67 $( use_with perl ) \
|
|
68 $( use_with png ) \
|
|
69 $( use_with tiff ) \
|
|
70 $( use_with truetype ttf ) \
|
|
71 $( use_with X x ) \
|
|
72 $( use_with svg xml ) \
|
|
73 $( use_with wmf ) \
|
|
74 $( use_with zlib ) \
|
|
75 $( use_with threads ) \
|
|
76 $( use_enable debug ccmalloc ) \
|
|
77 $( use_enable debug prof ) \
|
|
78 $( use_enable debug gcov ) \
|
|
79 --disable-gprof \
|
|
80 --enable-largefile \
|
|
81 --without-included-ltdl \
|
|
82 --without-gslib \
|
|
83 --without-dps \
|
|
84 --without-umem \
|
|
85 --without-trio \
|
|
86 --with-modules \
|
|
87 --enable-shared
|
|
88 }
|
|
89
|
|
90 src_install() {
|
|
91 emake DESTDIR="${D}" install || die "Installation failed"
|
|
92 dodoc README.txt ChangeLog* || die "dodoc failed."
|
|
93
|
|
94 # Fix perllocal.pod file collision
|
|
95 use perl && fixlocalpod
|
|
96 }
|
|
97
|
|
98 pkg_postinst() {
|
|
99 elog "For RAW image suport please install media-gfx/dcraw."
|
|
100 elog "To read gnuplot files please install sci-visualization/gnuplot."
|
|
101 }
|