152
|
1 # Copyright 1999-2009 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
176
|
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/graphicsmagick/graphicsmagick-1.3.7.ebuild,v 1.1 2009/11/24 00:20:48 bicatali Exp $
|
152
|
4
|
|
5 EAPI="2"
|
|
6
|
176
|
7 inherit toolchain-funcs flag-o-matic perl-app
|
152
|
8
|
|
9 MY_P=${P/graphicsm/GraphicsM}
|
|
10
|
176
|
11 DESCRIPTION="Collection of tools and libraries for many image formats"
|
152
|
12 HOMEPAGE="http://www.graphicsmagick.org/"
|
|
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
|
|
14
|
176
|
15 LICENSE="MIT"
|
152
|
16 SLOT="0"
|
|
17 KEYWORDS="~amd64 ~x86"
|
176
|
18 IUSE="bzip2 cxx debug fpx -gs imagemagick jbig +jpeg +jpeg2k lcms openmp
|
152
|
19 perl +png q16 q32 +svg +threads tiff +truetype X wmf zlib"
|
|
20
|
176
|
21 RDEPEND="bzip2? ( app-arch/bzip2 )
|
152
|
22 fpx? ( media-libs/libfpx )
|
176
|
23 gs? ( virtual/ghostscript )
|
152
|
24 jbig? ( media-libs/jbigkit )
|
|
25 jpeg? ( media-libs/jpeg )
|
|
26 jpeg2k? ( >=media-libs/jasper-1.701.0 )
|
|
27 lcms? ( media-libs/lcms )
|
|
28 perl? ( dev-lang/perl )
|
|
29 png? ( media-libs/libpng )
|
|
30 svg? ( dev-libs/libxml2 )
|
|
31 tiff? ( >=media-libs/tiff-3.8.2 )
|
|
32 truetype? ( >=media-libs/freetype-2.0 )
|
|
33 wmf? ( media-libs/libwmf )
|
|
34 X? ( x11-libs/libXext
|
|
35 x11-libs/libSM
|
|
36 x11-libs/libX11
|
|
37 x11-libs/libICE )
|
|
38 imagemagick? ( !media-gfx/imagemagick )"
|
176
|
39
|
|
40 DEPEND="${RDEPEND}"
|
|
41
|
|
42 S="${WORKDIR}/${MY_P}"
|
|
43
|
|
44 pkg_setup() {
|
|
45 if use openmp &&
|
|
46 [[ $(tc-getCC)$ == *gcc* ]] &&
|
|
47 ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
|
|
48 ! built_with_use sys-devel/gcc openmp )
|
|
49 then
|
|
50 ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
|
|
51 ewarn "If you want to build fftw with OpenMP, abort now,"
|
|
52 ewarn "and switch CC to an OpenMP capable compiler"
|
|
53 epause 5
|
|
54 fi
|
|
55 }
|
152
|
56
|
|
57 src_configure() {
|
176
|
58 local quantumDepth
|
152
|
59 if use q16 ; then
|
176
|
60 quantumDepth="16"
|
152
|
61 elif use q32 ; then
|
176
|
62 quantumDepth="32"
|
152
|
63 else
|
176
|
64 quantumDepth="8"
|
152
|
65 fi
|
|
66
|
|
67 use debug && filter-flags -fomit-frame-pointer
|
|
68
|
|
69 econf \
|
176
|
70 --enable-shared \
|
152
|
71 --enable-largefile \
|
|
72 --without-included-ltdl \
|
176
|
73 --without-frozenpaths \
|
152
|
74 --with-modules \
|
176
|
75 --with-quantum-depth=${quantumDepth} \
|
|
76 $(use_enable debug ccmalloc) \
|
|
77 $(use_enable debug prof) \
|
|
78 $(use_enable debug gcov) \
|
|
79 $(use_enable imagemagick magick-compat) \
|
|
80 $(use_enable openmp) \
|
|
81 $(use_with bzip2 bzlib) \
|
|
82 $(use_with cxx magick-plus-plus) \
|
|
83 $(use_with fpx) \
|
|
84 $(use_with gs gslib) \
|
|
85 $(use_with jbig) \
|
|
86 $(use_with jpeg) \
|
|
87 $(use_with jpeg2k jp2) \
|
|
88 $(use_with lcms) \
|
|
89 $(use_with perl) \
|
|
90 $(use_with png) \
|
|
91 $(use_with svg xml) \
|
|
92 $(use_with threads) \
|
|
93 $(use_with tiff) \
|
|
94 $(use_with truetype ttf) \
|
|
95 $(use_with wmf) \
|
|
96 $(use_with X x) \
|
|
97 $(use_with zlib)
|
|
98 }
|
|
99
|
|
100 src_test() {
|
|
101 emake check || die "tests failed"
|
152
|
102 }
|
|
103
|
|
104 src_install() {
|
|
105 emake DESTDIR="${D}" install || die "Installation failed"
|
176
|
106 dodoc README.txt ChangeLog* NEWS.txt TODO.txt
|
152
|
107
|
|
108 # Fix perllocal.pod file collision
|
|
109 use perl && fixlocalpod
|
|
110 }
|
|
111
|
|
112 pkg_postinst() {
|
|
113 elog "For RAW image suport please install media-gfx/dcraw."
|
176
|
114 elog "For mpeg suport please install media-video/mpeg2vidcodec."
|
152
|
115 elog "To read gnuplot files please install sci-visualization/gnuplot."
|
|
116 }
|