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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Aug 15 12:00:31 2009 UTC (9 years, 1 month ago) by maekke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.2_rc38/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.2.7.ebuild,v 1.3 2009/07/23 03:47:24 gengor 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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
23 IUSE="bzip2 +corefonts djvu doc fontconfig fpx graphviz gs hdri jbig jpeg jpeg2k
24 lcms nocxx openexr openmp perl png q8 q32 raw svg tiff truetype X wmf xml zlib"
25
26 RDEPEND="bzip2? ( app-arch/bzip2 )
27 djvu? ( app-text/djvu )
28 fontconfig? ( media-libs/fontconfig )
29 fpx? ( media-libs/libfpx )
30 graphviz? ( >=media-gfx/graphviz-2.6 )
31 gs? ( virtual/ghostscript )
32 jbig? ( media-libs/jbigkit )
33 jpeg? ( >=media-libs/jpeg-6b )
34 jpeg2k? ( media-libs/jasper )
35 lcms? ( >=media-libs/lcms-1.06 )
36 openexr? ( media-libs/openexr )
37 perl? ( >=dev-lang/perl-5.8.6-r6 !=dev-lang/perl-5.8.7 )
38 png? ( media-libs/libpng )
39 raw? ( media-gfx/ufraw )
40 tiff? ( >=media-libs/tiff-3.5.5 )
41 truetype? ( =media-libs/freetype-2*
42 corefonts? ( media-fonts/corefonts ) )
43 wmf? ( >=media-libs/libwmf-0.2.8 )
44 xml? ( >=dev-libs/libxml2-2.4.10 )
45 zlib? ( sys-libs/zlib )
46 X? (
47 x11-libs/libXext
48 x11-libs/libXt
49 x11-libs/libICE
50 x11-libs/libSM
51 svg? ( >=gnome-base/librsvg-2.9.0 )
52 )
53 !dev-perl/perlmagick
54 !sys-apps/compare
55 >=sys-devel/libtool-1.5.2-r6"
56
57 DEPEND="${RDEPEND}
58 >=sys-apps/sed-4
59 X? ( x11-proto/xextproto )"
60
61 S="${WORKDIR}/${MY_P2}"
62
63 pkg_setup() {
64 # for now, only build svg support when X is enabled, as librsvg
65 # pulls in quite some X dependencies.
66 if use svg && ! use X ; then
67 elog "the svg USE-flag requires the X USE-flag set."
68 elog "disabling svg support for now."
69 fi
70
71 if use corefonts && ! use truetype ; then
72 elog "corefonts USE-flag requires the truetype USE-flag to be set."
73 elog "disabling corefonts support for now."
74 fi
75 }
76
77 src_prepare() {
78 # fix doc dir, bug #91911
79 sed -i -e \
80 's:DOCUMENTATION_PATH="${DATA_DIR}/doc/${DOCUMENTATION_RELATIVE_PATH}":DOCUMENTATION_PATH="/usr/share/doc/${PF}":g' \
81 "${S}"/configure || die
82 }
83
84 src_configure() {
85 local myconf
86 if use q32 ; then
87 myconf="${myconf} --with-quantum-depth=32"
88 elif use q8 ; then
89 myconf="${myconf} --with-quantum-depth=8"
90 else
91 myconf="${myconf} --with-quantum-depth=16"
92 fi
93
94 if use X && use svg ; then
95 myconf="${myconf} --with-rsvg"
96 else
97 myconf="${myconf} --without-rsvg"
98 fi
99
100 # openmp support only works with >=sys-devel/gcc-4.3, bug #223825
101 if use openmp && version_is_at_least 4.3 $(gcc-version) ; then
102 if built_with_use --missing false =sys-devel/gcc-$(gcc-fullversion)* openmp ; then
103 myconf="${myconf} --enable-openmp"
104 else
105 elog "disabling openmp support (requires >=sys-devel/gcc-4.3 with USE='openmp')"
106 myconf="${myconf} --disable-openmp"
107 fi
108 else
109 elog "disabling openmp support (requires >=sys-devel/gcc-4.3)"
110 myconf="${myconf} --disable-openmp"
111 fi
112
113 use truetype && myconf="${myconf} $(use_with corefonts windows-font-dir /usr/share/fonts/corefonts)"
114
115 econf \
116 ${myconf} \
117 --without-included-ltdl \
118 --with-ltdl-include=/usr/include \
119 --with-ltdl-lib=/usr/$(get_libdir) \
120 --with-threads \
121 --with-modules \
122 $(use_with perl) \
123 --with-gs-font-dir=/usr/share/fonts/default/ghostscript \
124 $(use_enable hdri) \
125 $(use_with !nocxx magick-plus-plus) \
126 $(use_with bzip2 bzlib) \
127 $(use_with djvu) \
128 $(use_with fontconfig) \
129 $(use_with fpx) \
130 $(use_with gs dps) \
131 $(use_with gs gslib) \
132 $(use_with graphviz gvc) \
133 $(use_with jbig) \
134 $(use_with jpeg jpeg) \
135 $(use_with jpeg2k jp2) \
136 $(use_with lcms) \
137 $(use_with openexr) \
138 $(use_with png) \
139 $(use_with svg rsvg) \
140 $(use_with tiff) \
141 $(use_with truetype freetype) \
142 $(use_with wmf) \
143 $(use_with xml) \
144 $(use_with zlib) \
145 $(use_with X x)
146 }
147
148 src_test() {
149 einfo "please note that the tests will only be run when the installed"
150 einfo "version and current emerging version are the same"
151
152 if has_version ~${CATEGORY}/${P} ; then
153 emake -j1 check || die "make check failed"
154 fi
155 }
156
157 src_install() {
158 emake DESTDIR="${D}" install || die "Installation of files into image failed"
159
160 # dont need these files with runtime plugins
161 rm -f "${D}"/usr/$(get_libdir)/*/*/*.{la,a}
162
163 use doc || rm -r "${D}"/usr/share/doc/${PF}/{www,images,index.html}
164 dodoc NEWS.txt ChangeLog AUTHORS.txt README.txt
165
166 # Fix perllocal.pod file collision
167 use perl && fixlocalpod
168 }

  ViewVC Help
Powered by ViewVC 1.1.20