1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 # vala and introspection support is broken, bug #468208
9 VALA_MIN_API_VERSION=0.20
10 VALA_USE_DEPEND=vapigen
12 inherit versionator gnome2-utils eutils autotools python-any-r1 vala
14 if [[ ${PV} == *9999* ]]; then
15 inherit autotools git-r3
16 EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gegl.git"
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"
23 DESCRIPTION="A graph based image processing framework"
24 HOMEPAGE="http://www.gegl.org/"
26 LICENSE="|| ( GPL-3 LGPL-3 )"
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 )"
33 >=dev-libs/glib-2.36:2
35 >=media-libs/babl-0.1.12
37 >=x11-libs/gdk-pixbuf-2.18:2
40 cairo? ( x11-libs/cairo )
42 libav? ( media-video/libav:0= )
43 !libav? ( media-video/ffmpeg:0= )
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 )
60 >=dev-util/gtk-doc-am-1
61 >=dev-util/intltool-0.40.1
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) )
71 use test && use introspection && python-any-r1_pkg_setup
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
83 #epatch "${FILESDIR}"/${P}-g_log_domain.patch
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
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
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
99 epatch "${FILESDIR}"/${PN}-0.2.0-fix-without-exiv2.patch # bug 641872
104 use vala && vala_src_prepare
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
113 # Also please note that:
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)
120 # - Parameter --with-exiv2 compiles a noinst-app only, no use
122 # - Parameter --disable-workshop disables any use of Lua, effectivly
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
127 # - There are two checks for dot, one controllable by --with(out)-graphviz
128 # which toggles HAVE_GRAPHVIZ that is not used anywhere. Yes.
130 # So that's why USE="exif graphviz lua v4l" got resolved. More at:
131 # https://bugs.gentoo.org/show_bug.cgi?id=451136
136 --disable-silent-rules \
138 --program-suffix=-${SLOT} \
142 $(use_enable cpu_flags_x86_mmx mmx) \
143 $(use_enable cpu_flags_x86_sse sse) \
144 $(use_enable debug) \
146 $(use_with cairo pangocairo) \
148 $(use_with ffmpeg libavformat) \
150 $(use_with jpeg libjpeg) \
151 $(use_with jpeg2k jasper) \
153 $(use_with lensfun) \
155 $(use_with openexr) \
156 $(use_with png libpng) \
157 $(use_with raw libopenraw) \
159 $(use_with svg librsvg) \
160 $(use_with umfpack) \
161 $(use_with v4l libv4l) \
162 $(use_with v4l libv4l2) \
163 $(use_enable introspection) \
169 gnome2_environment_reset # sandbox issues
174 gnome2_environment_reset # sandbox issues (bug #396687)
177 [[ ${PV} == *9999* ]] && emake ./ChangeLog # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
182 prune_libtool_files --all