wpewebkit-2.24.3.ebuild (2537B)
1 # Copyright 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 CMAKE_MAKEFILE_GENERATOR="ninja"
6 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
7 USE_RUBY="ruby24 ruby25 ruby26"
8
9 inherit cmake-utils python-any-r1 ruby-single
10
11 DESCRIPTION="WebKit port optimized for embedded devices"
12 HOMEPAGE="https://wpewebkit.org/"
13 LICENSE="LGPL-2+ BSD"
14 SRC_URI="https://wpewebkit.org/releases/${P}.tar.xz"
15 SLOT="1.0" # WPE_API_VERSION
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~x86-macos"
17 IUSE="accessibility doc examples experimental jpeg2k qt +gstreamer"
18
19 RDEPEND="
20 >=x11-libs/cairo-1.10.2:=
21 >=media-libs/fontconfig-2.8.0:=
22 >=media-libs/freetype-2.4.2:=
23 >=dev-libs/glib-2.40.0:=
24 >=media-libs/harfbuzz-0.9.18:=
25 dev-libs/icu
26 virtual/jpeg:=
27 >=media-libs/libepoxy-1.4.0:=
28 >=dev-libs/libgcrypt-1.6.0:=
29 >=net-libs/libsoup-2.42.0:=
30 >=dev-libs/libxml2-2.8.0:=
31 media-libs/libpng:=
32 dev-db/sqlite:=
33 media-libs/libwebp:=
34 net-libs/libwpe:=
35 sys-libs/zlib:=
36
37 jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= )
38 qt? (
39 dev-qt/qtcore:5=
40 dev-qt/qtquickcontrols:5=
41 dev-qt/qtgui:5=
42 >=dev-libs/wpebackend-fdo-1.0:=
43 )
44 gstreamer? (
45 >=media-libs/gstreamer-1.14:1.0
46 >=media-libs/gst-plugins-base-1.14:1.0[egl]
47 >=media-plugins/gst-plugins-opus-1.14.4-r1:1.0
48 >=media-libs/gst-plugins-bad-1.14:1.0
49 )
50 accessibility? (
51 >=dev-libs/atk-2.16.0:=
52 app-accessibility/at-spi2-atk:=
53 )
54 "
55 DEPEND="
56 ${RDEPEND}
57 ${PYTHON_DEPS}
58 ${RUBY_DEPS}
59
60 >=dev-lang/perl-5.10
61 virtual/perl-JSON-PP
62
63 doc? ( >=dev-util/gtk-doc-1.10 )
64 "
65
66 src_configure() {
67 # Ruby situation is a bit complicated. See bug 513888
68 local rubyimpl
69 local ruby_interpreter=""
70 for rubyimpl in ${USE_RUBY}; do
71 if has_version "virtual/rubygems[ruby_targets_${rubyimpl}]"; then
72 ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})"
73 fi
74 done
75 # This will rarely occur. Only a couple of corner cases could lead us to
76 # that failure. See bug 513888
77 [[ -z $ruby_interpreter ]] && die "No suitable ruby interpreter found"
78
79 local mycmakeargs=(
80 "-DPORT=WPE"
81 -DENABLE_ACCESSIBILITY=$(usex accessibility)
82 -DSHOULD_INSTALL_JS_SHELL=ON
83 -DENABLE_EXPERIMENTAL_FEATURES=$(usex experimental)
84 -DENABLE_GTKDOC=$(usex doc)
85 -DUSE_OPENJPEG=$(usex jpeg2k)
86 -DENABLE_WPE_QT_API=$(usex qt)
87 -DENABLE_MINIBROWSER=$(usex examples)
88 -DENABLE_VIDEO=$(usex gstreamer)
89 -DENABLE_WEB_AUDIO=$(usex gstreamer)
90 ${ruby_interpreter}
91 )
92
93 cmake-utils_src_configure
94 }