media-libs/gegl: remove local webp use flag
[gentoo.git] / media-libs / gegl / gegl-0.3.0-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 )
7
8 # vala and introspection support is broken, bug #468208
9 VALA_MIN_API_VERSION=0.20
10 VALA_USE_DEPEND=vapigen
11
12 inherit versionator gnome2-utils eutils autotools python-any-r1 vala
13
14 if [[ ${PV} == *9999* ]]; then
15         inherit autotools git-r3
16         EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gegl.git"
17         SRC_URI=""
18 else
19         SRC_URI="http://download.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
20         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
21 fi
22
23 DESCRIPTION="A graph based image processing framework"
24 HOMEPAGE="http://www.gegl.org/"
25
26 LICENSE="|| ( GPL-3 LGPL-3 )"
27 SLOT="0.3"
28
29 IUSE="cairo cpu_flags_x86_mmx cpu_flags_x86_sse debug ffmpeg +introspection jpeg jpeg2k lcms lensfun libav openexr png raw sdl svg test umfpack vala v4l webp"
30 REQUIRED_USE="vala? ( introspection )"
31
32 RDEPEND="
33         >=dev-libs/glib-2.36:2
34         dev-libs/json-glib
35         >=media-libs/babl-0.1.12
36         sys-libs/zlib
37         >=x11-libs/gdk-pixbuf-2.18:2
38         x11-libs/pango
39
40         cairo? ( x11-libs/cairo )
41         ffmpeg? (
42                 libav? ( media-video/libav:0= )
43                 !libav? ( media-video/ffmpeg:0= )
44         )
45         introspection? ( >=dev-libs/gobject-introspection-1.32 )
46         jpeg? ( virtual/jpeg:0= )
47         jpeg2k? ( >=media-libs/jasper-1.900.1:= )
48         lcms? ( >=media-libs/lcms-2.2:2 )
49         lensfun? ( >=media-libs/lensfun-0.2.5 )
50         openexr? ( media-libs/openexr )
51         png? ( media-libs/libpng:0= )
52         raw? ( =media-libs/libopenraw-0.0.9 )
53         sdl? ( media-libs/libsdl )
54         svg? ( >=gnome-base/librsvg-2.14:2 )
55         umfpack? ( sci-libs/umfpack )
56         v4l? ( >=media-libs/libv4l-1.0.1 )
57         webp? ( media-libs/libwebp )
58 "
59 DEPEND="${RDEPEND}
60         >=dev-util/gtk-doc-am-1
61         >=dev-util/intltool-0.40.1
62         dev-lang/perl
63         virtual/pkgconfig
64         >=sys-devel/libtool-2.2
65         test? ( introspection? (
66                 $(python_gen_any_dep '>=dev-python/pygobject-3.2[${PYTHON_USEDEP}]') ) )
67         vala? ( $(vala_depend) )
68 "
69
70 pkg_setup() {
71         use test && use introspection && python-any-r1_pkg_setup
72 }
73
74 src_prepare() {
75         # FIXME: the following should be proper patch sent to upstream
76         # fix OSX loadable module filename extension
77         sed -i -e 's/\.dylib/.bundle/' configure.ac || die
78         # don't require Apple's OpenCL on versions of OSX that don't have it
79         if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
80                 sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
81         fi
82
83         #epatch "${FILESDIR}"/${P}-g_log_domain.patch
84
85         # commit 7c78497b : tests that use gegl.png are broken on non-amd64
86         sed -e '/clones.xml/d' \
87                 -e '/composite-transform.xml/d' \
88                 -i tests/compositions/Makefile.am || die
89
90         # commit 11a283ab : test-image-compare needs >=babl-0.1.13 (not released yet)
91         # for the new CIE conversions
92         sed -e '/test-image-compare/d' \
93                 -i tests/simple/Makefile.am || die
94
95         # Skip broken test with >=dev-python/pygobject-3.14
96         sed -e '/test_buffer/ i\    @unittest.skip("broken")\' \
97                 -i tests/python/test-gegl-format.py || die
98
99         epatch "${FILESDIR}"/${PN}-0.2.0-fix-without-exiv2.patch  # bug 641872
100
101         epatch_user
102         eautoreconf
103
104         use vala && vala_src_prepare
105 }
106
107 src_configure() {
108         # never enable altering of CFLAGS via profile option
109         # libspiro: not in portage main tree
110         # disable documentation as the generating is bit automagic
111         #    if anyone wants to work on it just create bug with patch
112
113         # Also please note that:
114         #
115         #  - Some auto-detections are not patched away since the docs are
116         #    not built (--disable-docs, lack of --enable-gtk-doc) and these
117         #    tools affect re-generation of docs, only
118         #    (e.g. ruby, asciidoc, dot (of graphviz), enscript)
119         #
120         #  - Parameter --with-exiv2 compiles a noinst-app only, no use
121         #
122         #  - Parameter --disable-workshop disables any use of Lua, effectivly
123         #
124         #  - v4l support does not work with our media-libs/libv4l-0.8.9,
125         #    upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
126         #
127         #  - There are two checks for dot, one controllable by --with(out)-graphviz
128         #    which toggles HAVE_GRAPHVIZ that is not used anywhere.  Yes.
129         #
130         # So that's why USE="exif graphviz lua v4l" got resolved.  More at:
131         # https://bugs.gentoo.org/show_bug.cgi?id=451136
132         #
133         econf \
134                 --disable-docs \
135                 --disable-profile \
136                 --disable-silent-rules \
137                 --disable-workshop \
138                 --program-suffix=-${SLOT} \
139                 --with-gdk-pixbuf \
140                 --with-pango \
141                 --without-libspiro \
142                 $(use_enable cpu_flags_x86_mmx mmx) \
143                 $(use_enable cpu_flags_x86_sse sse) \
144                 $(use_enable debug) \
145                 $(use_with cairo) \
146                 $(use_with cairo pangocairo) \
147                 --without-exiv2 \
148                 $(use_with ffmpeg libavformat) \
149                 --without-graphviz \
150                 $(use_with jpeg libjpeg) \
151                 $(use_with jpeg2k jasper) \
152                 $(use_with lcms) \
153                 $(use_with lensfun) \
154                 --without-lua \
155                 $(use_with openexr) \
156                 $(use_with png libpng) \
157                 $(use_with raw libopenraw) \
158                 $(use_with sdl) \
159                 $(use_with svg librsvg) \
160                 $(use_with umfpack) \
161                 $(use_with v4l libv4l) \
162                 $(use_with v4l libv4l2) \
163                 $(use_enable introspection) \
164                 $(use_with vala) \
165                 $(use_with webp)
166 }
167
168 src_test() {
169         gnome2_environment_reset  # sandbox issues
170         default
171 }
172
173 src_compile() {
174         gnome2_environment_reset  # sandbox issues (bug #396687)
175         default
176
177         [[ ${PV} == *9999* ]] && emake ./ChangeLog  # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
178 }
179
180 src_install() {
181         default
182         prune_libtool_files --all
183 }