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 autotools gnome2-utils python-any-r1 vala
12 if [[ ${PV} == *9999* ]]; then
14 EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gegl.git"
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-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 libav 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.56
40 >=media-libs/libpng-1.6.0:0=
43 >=x11-libs/gdk-pixbuf-2.32:2
45 cairo? ( >=x11-libs/cairo-1.12.2 )
47 libav? ( media-video/libav:0= )
48 !libav? ( media-video/ffmpeg:0= )
50 introspection? ( >=dev-libs/gobject-introspection-1.32:= )
51 jpeg2k? ( >=media-libs/jasper-1.900.1:= )
52 lcms? ( >=media-libs/lcms-2.8:2 )
53 lensfun? ( >=media-libs/lensfun-0.2.5 )
54 openexr? ( >=media-libs/openexr-2.2.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:= )
65 >=dev-util/gtk-doc-am-1
66 >=sys-devel/gettext-0.19.8
68 >=sys-devel/libtool-2.2
69 test? ( ffmpeg? ( media-libs/gexiv2 )
71 $(python_gen_any_dep '>=dev-python/pygobject-3.2[${PYTHON_USEDEP}]')
74 vala? ( $(vala_depend) )
78 "${FILESDIR}/${PN}-0.3.12-failing-tests.patch"
79 "${FILESDIR}/${P}-remove-imath-version.patch"
83 use test && use introspection && python-any-r1_pkg_setup
89 # FIXME: the following should be proper patch sent to upstream
90 # fix OSX loadable module filename extension
91 sed -i -e 's/\.dylib/.bundle/' configure.ac || die
92 # don't require Apple's OpenCL on versions of OSX that don't have it
93 if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
94 sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
97 # commit 7c78497b : tests that use gegl.png are broken on non-amd64
98 sed -e '/clones.xml/d' \
99 -e '/composite-transform.xml/d' \
100 -i tests/compositions/Makefile.am || die
104 gnome2_environment_reset
106 use vala && vala_src_prepare
111 # disable documentation as the generating is bit automagic
112 # if anyone wants to work on it just create bug with patch
114 # never enable altering of CFLAGS via profile option
116 --disable-silent-rules
117 # - Parameter --disable-workshop disables any use of Lua, effectivly
119 --program-suffix=-${SLOT}
122 # - Parameter --with-exiv2 compiles a noinst-app only, no use
123 # but needed during testing
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 # libspiro: not in portage main tree
132 $(use_enable cpu_flags_x86_mmx mmx)
133 $(use_enable cpu_flags_x86_sse sse)
135 $(use_enable introspection)
137 $(use_with cairo pangocairo)
138 $(use_with ffmpeg libavformat)
139 $(use_with jpeg2k jasper)
143 $(use_with raw libraw)
145 $(use_with svg librsvg)
146 $(use_with tiff libtiff)
148 # - v4l support does not work with our media-libs/libv4l-0.8.9,
149 # upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
150 $(use_with v4l libv4l)
151 $(use_with v4l libv4l2)
157 myeconfargs+=( $(use_with ffmpeg gexiv2) )
159 myeconfargs+=( --without-gexiv2 )
162 econf "${myeconfargs[@]}"
168 [[ ${PV} == *9999* ]] && emake ./ChangeLog # "./" prevents "Circular ChangeLog <- ChangeLog dependency dropped."
173 find "${ED}" -name '*.la' -delete || die