1 |
commit: 8da2a0947bca1b02d41d35e020c3289083eb255e |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 28 09:05:12 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 28 09:05:12 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8da2a094 |
7 |
|
8 |
dev-libs/redland-bindings: eapi8, added python 3.10 & 3.11, deps versions cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/845669 |
11 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
12 |
|
13 |
.../redland-bindings-1.0.17.1-r101.ebuild | 188 +++++++++++++++++++++ |
14 |
1 file changed, 188 insertions(+) |
15 |
|
16 |
diff --git a/dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild b/dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild |
17 |
new file mode 100644 |
18 |
index 000000000000..169122ec6cd4 |
19 |
--- /dev/null |
20 |
+++ b/dev-libs/redland-bindings/redland-bindings-1.0.17.1-r101.ebuild |
21 |
@@ -0,0 +1,188 @@ |
22 |
+# Copyright 1999-2022 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=8 |
26 |
+ |
27 |
+LUA_COMPAT=( lua5-{1..4} luajit ) |
28 |
+PYTHON_COMPAT=( python3_{8..11} ) |
29 |
+ |
30 |
+USE_PHP="php7-4" |
31 |
+PHP_EXT_ECONF_ARGS="--with-php=yes --without-lua --without-perl --without-python --without-ruby" |
32 |
+PHP_EXT_NAME="redland" |
33 |
+PHP_EXT_OPTIONAL_USE="php" |
34 |
+PHP_EXT_SKIP_PATCHES="yes" |
35 |
+PHP_EXT_SKIP_PHPIZE="yes" |
36 |
+ |
37 |
+inherit lua php-ext-source-r3 python-single-r1 autotools |
38 |
+ |
39 |
+DESCRIPTION="Language bindings for Redland" |
40 |
+HOMEPAGE="http://librdf.org/bindings/" |
41 |
+SRC_URI="http://download.librdf.org/source/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="Apache-2.0 GPL-2 LGPL-2.1" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-linux" |
46 |
+IUSE="lua perl python php ruby test" |
47 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) |
48 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
49 |
+RESTRICT="!test? ( test )" |
50 |
+ |
51 |
+BDEPEND="sys-apps/sed |
52 |
+ virtual/pkgconfig" |
53 |
+ |
54 |
+RDEPEND="dev-libs/redland |
55 |
+ lua? ( ${LUA_DEPS} ) |
56 |
+ perl? ( dev-lang/perl:= ) |
57 |
+ python? ( ${PYTHON_DEPS} ) |
58 |
+ ruby? ( dev-lang/ruby:* dev-ruby/log4r ) |
59 |
+ php? ( |
60 |
+ php_targets_php7-4? ( dev-lang/php:7.4[-threads] ) |
61 |
+ )" |
62 |
+ |
63 |
+DEPEND="${RDEPEND} |
64 |
+ dev-lang/swig |
65 |
+ test? ( |
66 |
+ dev-libs/redland[berkdb] |
67 |
+ )" |
68 |
+ |
69 |
+PATCHES=( |
70 |
+ "${FILESDIR}"/${P}-bool.patch |
71 |
+ "${FILESDIR}"/${PN}-1.0.17.1-php-config-r1.patch |
72 |
+ "${FILESDIR}"/${PN}-1.0.17.1-add-PHP7-support.patch |
73 |
+) |
74 |
+ |
75 |
+pkg_setup() { |
76 |
+ use python && python-single-r1_pkg_setup |
77 |
+} |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ default |
81 |
+ |
82 |
+ eautoreconf |
83 |
+ |
84 |
+ # As of version 1.0.17.1, out-of-tree builds fail with: |
85 |
+ # "error: redland_wrap.c: No such file or directory", |
86 |
+ # have to copy the sources. |
87 |
+ use lua && lua_copy_sources |
88 |
+ |
89 |
+ use php && php-ext-source-r3_src_prepare |
90 |
+} |
91 |
+ |
92 |
+lua_src_configure() { |
93 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
94 |
+ |
95 |
+ econf \ |
96 |
+ --with-lua="${ELUA}" \ |
97 |
+ --without-perl \ |
98 |
+ --without-php \ |
99 |
+ --without-python \ |
100 |
+ --without-ruby |
101 |
+ |
102 |
+ popd > /dev/null || die |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ if use perl || use python || use ruby ; then |
107 |
+ econf \ |
108 |
+ $(use_with lua) \ |
109 |
+ $(use_with perl) \ |
110 |
+ $(use_with python) \ |
111 |
+ --without-php \ |
112 |
+ $(use_with ruby) |
113 |
+ fi |
114 |
+ |
115 |
+ if use lua; then |
116 |
+ lua_foreach_impl lua_src_configure |
117 |
+ fi |
118 |
+ |
119 |
+ use php && php-ext-source-r3_src_configure |
120 |
+} |
121 |
+ |
122 |
+lua_src_compile() { |
123 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
124 |
+ |
125 |
+ default_src_compile |
126 |
+ |
127 |
+ popd > /dev/null || die |
128 |
+} |
129 |
+ |
130 |
+src_compile() { |
131 |
+ if use perl || use python || use ruby ; then |
132 |
+ default |
133 |
+ fi |
134 |
+ |
135 |
+ if use lua; then |
136 |
+ lua_foreach_impl lua_src_compile |
137 |
+ fi |
138 |
+ |
139 |
+ use php && php-ext-source-r3_src_compile |
140 |
+} |
141 |
+ |
142 |
+lua_src_test() { |
143 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
144 |
+ |
145 |
+ default_src_test |
146 |
+ |
147 |
+ popd > /dev/null || die |
148 |
+} |
149 |
+ |
150 |
+src_test() { |
151 |
+ if use perl || use python || use ruby ; then |
152 |
+ default |
153 |
+ fi |
154 |
+ |
155 |
+ if use lua; then |
156 |
+ lua_foreach_impl lua_src_test |
157 |
+ fi |
158 |
+ |
159 |
+ if use php ; then |
160 |
+ local slot |
161 |
+ for slot in $(php_get_slots) ; do |
162 |
+ php_init_slot_env "${slot}" |
163 |
+ cd php || die |
164 |
+ ${PHPCLI} -v |
165 |
+ ${PHPCLI} -d "extension=./${PHP_EXT_NAME}.so" -f test.php || die "PHP tests for ${slot} failed!" |
166 |
+ cd "${S}" || die |
167 |
+ done |
168 |
+ fi |
169 |
+} |
170 |
+ |
171 |
+lua_src_install() { |
172 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
173 |
+ |
174 |
+ emake DESTDIR="${D}" INSTALLDIRS=vendor luadir="$(lua_get_cmod_dir)" install |
175 |
+ |
176 |
+ popd > /dev/null || die |
177 |
+} |
178 |
+ |
179 |
+src_install() { |
180 |
+ if use perl || use python || use ruby ; then |
181 |
+ emake DESTDIR="${D}" INSTALLDIRS=vendor install |
182 |
+ fi |
183 |
+ |
184 |
+ if use lua; then |
185 |
+ lua_foreach_impl lua_src_install |
186 |
+ fi |
187 |
+ |
188 |
+ if use perl; then |
189 |
+ find "${ED}" -type f -name perllocal.pod -delete |
190 |
+ find "${ED}" -depth -mindepth 1 -type d -empty -delete |
191 |
+ fi |
192 |
+ |
193 |
+ use python && python_optimize |
194 |
+ |
195 |
+ if use php; then |
196 |
+ local slot |
197 |
+ for slot in $(php_get_slots); do |
198 |
+ php_init_slot_env "${slot}" |
199 |
+ exeinto "${EXT_DIR#$EPREFIX}" |
200 |
+ doexe "php/${PHP_EXT_NAME}.so" |
201 |
+ done |
202 |
+ |
203 |
+ php-ext-source-r3_createinifiles |
204 |
+ fi |
205 |
+ |
206 |
+ local DOCS=( AUTHORS ChangeLog NEWS README TODO ) |
207 |
+ local HTML_DOCS=( {NEWS,README,RELEASE,TODO}.html ) |
208 |
+ einstalldocs |
209 |
+} |