1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_{6,7}} )
7 # vala and introspection support is broken, bug #468208
8 VALA_USE_DEPEND=vapigen
10 inherit meson 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.xz"
18 KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~amd64-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 debug ffmpeg introspection lcms lensfun libav openexr pdf raw sdl svg test tiff umfpack vala v4l webp"
30 test? ( introspection )
31 vala? ( introspection )
34 RESTRICT="!test? ( test )"
36 # NOTE: Even current libav 11.4 does not have AV_CODEC_CAP_VARIABLE_FRAME_SIZE
37 # so there is no chance to support libav right now (Gentoo bug #567638)
38 # If it returns, please check prior GEGL ebuilds for how libav was integrated. Thanks!
40 >=dev-libs/glib-2.44:2
41 >=dev-libs/json-glib-1.2.6
42 >=media-libs/babl-0.1.72[introspection?]
44 >=media-libs/libpng-1.6.0:0=
47 >=x11-libs/gdk-pixbuf-2.32:2
48 >=x11-libs/pango-1.38.0
49 cairo? ( >=x11-libs/cairo-1.12.2 )
51 libav? ( media-video/libav:0= )
52 !libav? ( media-video/ffmpeg:0= )
54 introspection? ( >=dev-libs/gobject-introspection-1.32:= )
55 lcms? ( >=media-libs/lcms-2.8:2 )
56 lensfun? ( >=media-libs/lensfun-0.2.5 )
57 openexr? ( >=media-libs/openexr-1.6.1:= )
58 pdf? ( >=app-text/poppler-0.71.0[cairo] )
59 raw? ( >=media-libs/libraw-0.15.4:0= )
60 sdl? ( >=media-libs/libsdl-1.2.0 )
61 svg? ( >=gnome-base/librsvg-2.40.6:2 )
62 tiff? ( >=media-libs/tiff-4:0 )
63 umfpack? ( sci-libs/umfpack )
64 v4l? ( >=media-libs/libv4l-1.0.1 )
65 webp? ( >=media-libs/libwebp-0.5.0:= )
74 >=dev-util/gtk-doc-am-1
75 >=sys-devel/gettext-0.19.8
76 >=sys-devel/libtool-2.2
78 test? ( $(python_gen_any_dep '>=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}]') )
79 vala? ( $(vala_depend) )
82 DOCS=( AUTHORS docs/ChangeLog docs/NEWS.txt )
85 "${FILESDIR}"/${P}-drop-failing-tests.patch
86 "${FILESDIR}"/${P}-program-suffix.patch
87 "${FILESDIR}"/${P}-meson_cpu_detection.patch
88 "${FILESDIR}"/${P}-cltostring_force_utf8.patch
92 has_version -b ">=dev-python/pygobject-3.2:3[${PYTHON_USEDEP}]"
96 use test && python-any-r1_pkg_setup
102 # don't require Apple's OpenCL on versions of OSX that don't have it
103 if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -le 9 ]] ; then
104 sed -i -e 's/#ifdef __APPLE__/#if 0/' gegl/opencl/* || die
107 # commit 7c78497b : tests that use gegl.png are broken on non-amd64
108 sed -e '/clones.xml/d' \
109 -e '/composite-transform.xml/d' \
110 -i tests/compositions/meson.build || die
112 # fix skipping mipmap tests due to executable not found
113 for item in "invert-crop.sh" "invert.sh" "rotate-crop.sh" "rotate.sh" "unsharp-crop.sh" "unsharp.sh"; do
114 sed -i "s:/bin/gegl:/bin/gegl-0.4:g" "${S}/tests/mipmap/${item}" || die
115 sed -i "s:/tools/gegl-imgcmp:/tools/gegl-imgcmp-0.4:g" "${S}/tests/mipmap/${item}" || die
118 gnome2_environment_reset
120 use vala && vala_src_prepare
125 # - Disable documentation as the generating is bit automagic
126 # if anyone wants to work on it just create bug with patch
131 # - There are two checks for dot, one controllable by --with(out)-graphviz
132 # which toggles HAVE_GRAPHVIZ that is not used anywhere. Yes.
137 # - libspiro: not in portage main tree
143 # - Parameter -Dworkshop=false disables any use of Lua, effectivly
145 $(meson_feature cairo)
146 $(meson_feature cairo pangocairo)
147 $(meson_feature ffmpeg libav)
148 $(meson_feature lcms)
149 $(meson_feature lensfun)
150 $(meson_feature openexr)
151 $(meson_feature raw libraw)
152 $(meson_feature sdl sdl1)
153 $(meson_feature svg librsvg)
154 $(meson_feature test pygobject)
155 $(meson_feature tiff libtiff)
156 $(meson_feature umfpack)
157 # - v4l support does not work with our media-libs/libv4l-0.8.9,
158 # upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=654675
159 $(meson_feature v4l libv4l)
160 $(meson_feature v4l libv4l2)
161 $(meson_feature vala vapigen)
162 $(meson_feature webp)
163 $(meson_use introspection)