1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 # vala and introspection support is broken, bug #468208
8 VALA_USE_DEPEND=vapigen
10 inherit versionator gnome2-utils eutils autotools python-any-r1 vala
12 if [[ ${PV} == *9999* ]]; then
13 inherit autotools git-r3
14 EGIT_REPO_URI="git://git.gnome.org/gegl"
17 SRC_URI="http://download.gimp.org/pub/${PN}/${PV:0:3}/${P}.tar.bz2"
18 KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ppc64 ~sparc x86 ~amd64-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
21 DESCRIPTION="A graph based image processing framework"
22 HOMEPAGE="http://www.gegl.org/"
24 LICENSE="|| ( GPL-3 LGPL-3 )"
27 IUSE="cairo cpu_flags_x86_mmx cpu_flags_x86_sse debug ffmpeg +introspection jpeg2k lcms lensfun openexr raw sdl svg test tiff umfpack vala v4l webp"
30 vala? ( introspection )
33 # NOTE: Even current libav 11.4 does not have AV_CODEC_CAP_VARIABLE_FRAME_SIZE
34 # so there is no chance to support libav right now (Gentoo bug #567638)
35 # If it returns, please check prior GEGL ebuilds for how libav was integrated. Thanks!
37 >=dev-libs/glib-2.44:2
39 >=media-libs/babl-0.1.38
41 >=x11-libs/gdk-pixbuf-2.32:2
44 cairo? ( >=x11-libs/cairo-1.12.2 )
46 >=media-video/ffmpeg-2.8:0=
48 introspection? ( >=dev-libs/gobject-introspection-1.32:= )
50 jpeg2k? ( >=media-libs/jasper-1.900.1:= )
51 lcms? ( >=media-libs/lcms-2.8:2 )
52 lensfun? ( >=media-libs/lensfun-0.2.5 )
53 openexr? ( >=media-libs/openexr-1.6.1:= )
54 >=media-libs/libpng-1.6.0:0=
55 raw? ( >=media-libs/libraw-0.15.4:0= )
56 sdl? ( >=media-libs/libsdl-1.2.0 )
57 svg? ( >=gnome-base/librsvg-2.40.6:2 )
58 tiff? ( >=media-libs/tiff-4:0 )
59 umfpack? ( sci-libs/umfpack )
60 v4l? ( >=media-libs/libv4l-1.0.1 )
61 webp? ( >=media-libs/libwebp-0.5.0:= )
64 >=dev-util/gtk-doc-am-1
65 >=sys-devel/gettext-0.19.8
68 >=sys-devel/libtool-2.2
69 test? ( introspection? (
70 $(python_gen_any_dep '>=dev-python/pygobject-3.2[${PYTHON_USEDEP}]') ) )
71 vala? ( $(vala_depend) )
75 use test && use introspection && python-any-r1_pkg_setup
79 "${FILESDIR}"/${PN}-0.3.12-failing-tests.patch
85 # FIXME: the following should be proper patch sent to upstream
86 # fix OSX loadable module filename extension
87 sed -i -e 's/\.dylib/.bundle/' configure.ac || die
88 # don't require Apple's OpenCL on versions of OSX that don't have it
89 if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
90 sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
93 # commit 7c78497b : tests that use gegl.png are broken on non-amd64
94 sed -e '/clones.xml/d' \
95 -e '/composite-transform.xml/d' \
96 -i tests/compositions/Makefile.am || die
100 gnome2_environment_reset
102 use vala && vala_src_prepare
106 # never enable altering of CFLAGS via profile option
107 # libspiro: not in portage main tree
108 # disable documentation as the generating is bit automagic
109 # if anyone wants to work on it just create bug with patch
111 # Also please note that:
113 # - Some auto-detections are not patched away since the docs are
114 # not built (--disable-docs, lack of --enable-gtk-doc) and these
115 # tools affect re-generation of docs, only
116 # (e.g. ruby, asciidoc, dot (of graphviz), enscript)
118 # - Parameter --with-exiv2 compiles a noinst-app only, no use
120 # - Parameter --disable-workshop disables any use of Lua, effectivly
122 # - v4l support does not work with our media-libs/libv4l-0.8.9,
123 # upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
125 # - There are two checks for dot, one controllable by --with(out)-graphviz
126 # which toggles HAVE_GRAPHVIZ that is not used anywhere. Yes.
128 # - mrg is not in tree and gexiv2 support only has effect when mrg support
131 # So that's why USE="exif graphviz lua v4l" got resolved. More at:
132 # https://bugs.gentoo.org/show_bug.cgi?id=451136
137 --disable-silent-rules \
139 --program-suffix=-${SLOT} \
143 $(use_enable cpu_flags_x86_mmx mmx) \
144 $(use_enable cpu_flags_x86_sse sse) \
145 $(use_enable debug) \
147 $(use_with cairo pangocairo) \
149 $(use_with ffmpeg libavformat) \
152 $(use_with jpeg2k jasper) \
154 $(use_with lensfun) \
157 $(use_with openexr) \
158 $(use_with raw libraw) \
160 $(use_with svg librsvg) \
161 $(use_with tiff libtiff) \
162 $(use_with umfpack) \
163 $(use_with v4l libv4l) \
164 $(use_with v4l libv4l2) \
165 $(use_enable introspection) \
173 [[ ${PV} == *9999* ]] && emake ./ChangeLog # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
178 prune_libtool_files --all