/[gentoo-x86]/media-gfx/imagemagick/imagemagick-6.5.8.8.ebuild
Gentoo

Contents of /media-gfx/imagemagick/imagemagick-6.5.8.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Thu May 27 10:47:15 2010 UTC (8 years, 1 month ago) by maekke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.2_rc67/cvs/Linux i686)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/imagemagick/imagemagick-6.5.8.8.ebuild,v 1.8 2010/03/29 08:29:59 jer Exp $
4
5 EAPI="2"
6
7 inherit eutils multilib perl-app toolchain-funcs versionator
8
9 MY_PN=ImageMagick
10 MY_P=${MY_PN}-${PV%.*}
11 MY_P2=${MY_PN}-${PV%.*}-${PV#*.*.*.}
12
13 DESCRIPTION="A collection of tools and libraries for many image formats"
14 HOMEPAGE="http://www.imagemagick.org/"
15 SRC_URI="mirror://imagemagick/${MY_P2}.tar.bz2
16 mirror://imagemagick/legacy/${MY_P2}.tar.bz2"
17
18 # perl tests fail with userpriv
19 RESTRICT="perl? ( userpriv )"
20 LICENSE="imagemagick"
21 SLOT="0"
22 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
23 IUSE="autotrace bzip2 +corefonts djvu doc fftw fontconfig fpx graphviz gs hdri
24 jbig jpeg jpeg2k lcms lqr nocxx openexr openmp perl png q8 q32 raw svg tiff
25 truetype X wmf xml zlib"
26
27 RDEPEND="
28 autotrace? ( >=media-gfx/autotrace-0.31.1 )
29 bzip2? ( app-arch/bzip2 )
30 djvu? ( app-text/djvu )
31 fftw? ( sci-libs/fftw )
32 fontconfig? ( media-libs/fontconfig )
33 fpx? ( media-libs/libfpx )
34 graphviz? ( >=media-gfx/graphviz-2.6 )
35 gs? ( app-text/ghostscript-gpl )
36 jbig? ( media-libs/jbigkit )
37 jpeg? ( >=media-libs/jpeg-6b:0 )
38 jpeg2k? ( media-libs/jasper )
39 lcms? ( >=media-libs/lcms-1.06 )
40 lqr? ( >=media-libs/liblqr-0.1.0 )
41 openexr? ( media-libs/openexr )
42 perl? ( >=dev-lang/perl-5.8.6-r6 )
43 png? ( media-libs/libpng )
44 raw? ( media-gfx/ufraw )
45 tiff? ( >=media-libs/tiff-3.5.5 )
46 truetype? ( =media-libs/freetype-2*
47 corefonts? ( media-fonts/corefonts ) )
48 wmf? ( >=media-libs/libwmf-0.2.8 )
49 xml? ( >=dev-libs/libxml2-2.4.10 )
50 zlib? ( sys-libs/zlib )
51 X? (
52 x11-libs/libXext
53 x11-libs/libXt
54 x11-libs/libICE
55 x11-libs/libSM
56 svg? ( >=gnome-base/librsvg-2.9.0 )
57 )
58 !dev-perl/perlmagick
59 !media-gfx/graphicsmagick[imagemagick]
60 !sys-apps/compare
61 >=sys-devel/libtool-1.5.2-r6"
62
63 DEPEND="${RDEPEND}
64 >=sys-apps/sed-4
65 X? ( x11-proto/xextproto )"
66
67 S="${WORKDIR}/${MY_P2}"
68
69 pkg_setup() {
70 # for now, only build svg support when X is enabled, as librsvg
71 # pulls in quite some X dependencies.
72 if use svg && ! use X ; then
73 elog "the svg USE-flag requires the X USE-flag set."
74 elog "disabling svg support for now."
75 fi
76
77 if use corefonts && ! use truetype ; then
78 elog "corefonts USE-flag requires the truetype USE-flag to be set."
79 elog "disabling corefonts support for now."
80 fi
81 }
82
83 src_prepare() {
84 # fix doc dir, bug #91911
85 sed -i -e \
86 's:DOCUMENTATION_PATH="${DATA_DIR}/doc/${DOCUMENTATION_RELATIVE_PATH}":DOCUMENTATION_PATH="/usr/share/doc/${PF}":g' \
87 "${S}"/configure || die
88 }
89
90 src_configure() {
91 local myconf
92 if use q32 ; then
93 myconf="${myconf} --with-quantum-depth=32"
94 elif use q8 ; then
95 myconf="${myconf} --with-quantum-depth=8"
96 else
97 myconf="${myconf} --with-quantum-depth=16"
98 fi
99
100 if use X && use svg ; then
101 myconf="${myconf} --with-rsvg"
102 else
103 myconf="${myconf} --without-rsvg"
104 fi
105
106 # openmp support only works with >=sys-devel/gcc-4.3, bug #223825
107 if use openmp && version_is_at_least 4.3 $(gcc-version) ; then
108 if has_version =sys-devel/gcc-$(gcc-version)*[openmp] ; then
109 myconf="${myconf} --enable-openmp"
110 else
111 elog "disabling openmp support (requires >=sys-devel/gcc-4.3 with USE='openmp')"
112 myconf="${myconf} --disable-openmp"
113 fi
114 else
115 elog "disabling openmp support (requires >=sys-devel/gcc-4.3)"
116 myconf="${myconf} --disable-openmp"
117 fi
118
119 use truetype && myconf="${myconf} $(use_with corefonts windows-font-dir /usr/share/fonts/corefonts)"
120
121 econf \
122 ${myconf} \
123 --without-included-ltdl \
124 --with-ltdl-include=/usr/include \
125 --with-ltdl-lib=/usr/$(get_libdir) \
126 --with-threads \
127 --with-modules \
128 $(use_with perl) \
129 --with-perl-options='INSTALLDIRS=vendor' \
130 --with-gs-font-dir=/usr/share/fonts/default/ghostscript \
131 $(use_enable hdri) \
132 $(use_with !nocxx magick-plus-plus) \
133 $(use_with autotrace) \
134 $(use_with bzip2 bzlib) \
135 $(use_with djvu) \
136 $(use_with fftw) \
137 $(use_with fontconfig) \
138 $(use_with fpx) \
139 $(use_with gs dps) \
140 $(use_with gs gslib) \
141 $(use_with graphviz gvc) \
142 $(use_with jbig) \
143 $(use_with jpeg jpeg) \
144 $(use_with jpeg2k jp2) \
145 $(use_with lcms) \
146 $(use_with openexr) \
147 $(use_with png) \
148 $(use_with svg rsvg) \
149 $(use_with tiff) \
150 $(use_with truetype freetype) \
151 $(use_with wmf) \
152 $(use_with xml) \
153 $(use_with zlib) \
154 $(use_with X x)
155 }
156
157 src_test() {
158 einfo "please note that the tests will only be run when the installed"
159 einfo "version and current emerging version are the same"
160
161 if has_version ~${CATEGORY}/${P} ; then
162 emake -j1 check || die "make check failed"
163 fi
164 }
165
166 src_install() {
167 emake DESTDIR="${D}" install || die "Installation of files into image failed"
168
169 # dont need these files with runtime plugins
170 rm -f "${D}"/usr/$(get_libdir)/*/*/*.{la,a}
171
172 use doc || rm -r "${D}"/usr/share/doc/${PF}/{www,images,index.html}
173 dodoc NEWS.txt ChangeLog AUTHORS.txt README.txt
174
175 # Fix perllocal.pod file collision
176 use perl && fixlocalpod
177 }

  ViewVC Help
Powered by ViewVC 1.1.20