1 |
commit: e992bd736e81accd9ad2f4af6bef0573c594665b |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 30 15:36:24 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 21:38:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e992bd73 |
7 |
|
8 |
dev-libs/xapian-bindings: convert to python-r1 and enable python3 |
9 |
|
10 |
This change configures/builds/installs the bindings once for each python |
11 |
implementation. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/589642 |
14 |
|
15 |
.../xapian-bindings/xapian-bindings-1.4.1.ebuild | 51 +++++++++++++++++----- |
16 |
1 file changed, 41 insertions(+), 10 deletions(-) |
17 |
|
18 |
diff --git a/dev-libs/xapian-bindings/xapian-bindings-1.4.1.ebuild b/dev-libs/xapian-bindings/xapian-bindings-1.4.1.ebuild |
19 |
index c1bfac4..24783b9 100644 |
20 |
--- a/dev-libs/xapian-bindings/xapian-bindings-1.4.1.ebuild |
21 |
+++ b/dev-libs/xapian-bindings/xapian-bindings-1.4.1.ebuild |
22 |
@@ -4,11 +4,8 @@ |
23 |
|
24 |
EAPI="5" |
25 |
|
26 |
-PYTHON_COMPAT=( python2_7 ) |
27 |
-PYTHON_REQ_USE=threads |
28 |
-DISTUTILS_SINGLE_IMPL=yesplz |
29 |
-DISTUTILS_OPTIONAL=yesplz |
30 |
-DISTUTILS_IN_SOURCE_BUILD=yesplz |
31 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5} ) |
32 |
+PYTHON_REQ_USE="threads(+)" |
33 |
|
34 |
USE_PHP="php5-5 php5-6" |
35 |
|
36 |
@@ -18,7 +15,7 @@ PHP_EXT_OPTIONAL_USE="php" |
37 |
|
38 |
#mono violates sandbox, we disable it until we figure this out |
39 |
#inherit distutils-r1 libtool java-pkg-opt-2 mono-env php-ext-source-r2 toolchain-funcs |
40 |
-inherit distutils-r1 libtool java-pkg-opt-2 php-ext-source-r2 toolchain-funcs |
41 |
+inherit python-r1 libtool java-pkg-opt-2 php-ext-source-r2 toolchain-funcs |
42 |
|
43 |
DESCRIPTION="SWIG and JNI bindings for Xapian" |
44 |
HOMEPAGE="http://www.xapian.org/" |
45 |
@@ -36,7 +33,7 @@ COMMONDEPEND="dev-libs/xapian:0/30 |
46 |
lua? ( dev-lang/lua:= ) |
47 |
perl? ( dev-lang/perl:= ) |
48 |
python? ( |
49 |
- dev-python/sphinx |
50 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
51 |
${PYTHON_DEPS} |
52 |
) |
53 |
ruby? ( dev-lang/ruby:= ) |
54 |
@@ -53,7 +50,6 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
55 |
pkg_setup() { |
56 |
# use mono && mono-env_pkg_setup |
57 |
use java && java-pkg-opt-2_pkg_setup |
58 |
- use python && python-single-r1_pkg_setup |
59 |
} |
60 |
|
61 |
src_prepare() { |
62 |
@@ -64,6 +60,10 @@ src_prepare() { |
63 |
|
64 |
# Accept ruby 2.0 - patch configure directly to avoid autoreconf |
65 |
epatch "${FILESDIR}"/${PN}-1.3.6-allow-ruby-2.0.patch |
66 |
+ |
67 |
+ if use python; then |
68 |
+ python_copy_sources |
69 |
+ fi |
70 |
} |
71 |
|
72 |
src_configure() { |
73 |
@@ -87,15 +87,42 @@ src_configure() { |
74 |
--without-csharp \ |
75 |
$(use_with perl) \ |
76 |
$(use_with php) \ |
77 |
- $(use_with python) \ |
78 |
+ --without-python \ |
79 |
+ --without-python3 \ |
80 |
$(use_with ruby) \ |
81 |
$(use_with tcl) |
82 |
# $(use_with mono csharp) |
83 |
+ |
84 |
+ python_configure() { |
85 |
+ local myconf=( |
86 |
+ --disable-documentation |
87 |
+ --without-java |
88 |
+ --without-lua |
89 |
+ --without-csharp |
90 |
+ --without-perl |
91 |
+ --without-php |
92 |
+ --without-ruby |
93 |
+ --without-tcl |
94 |
+ ) |
95 |
+ if python_is_python3; then |
96 |
+ myconf+=( --with-python3 ) |
97 |
+ else |
98 |
+ myconf+=( --with-python ) |
99 |
+ fi |
100 |
+ econf "${myconf[@]}" |
101 |
+ } |
102 |
+ |
103 |
+ if use python; then |
104 |
+ python_foreach_impl run_in_build_dir python_configure |
105 |
+ fi |
106 |
} |
107 |
|
108 |
src_compile() { |
109 |
- local -x PYTHONDONTWRITEBYTECODE= |
110 |
default |
111 |
+ if use python; then |
112 |
+ unset PYTHONDONTWRITEBYTECODE |
113 |
+ python_foreach_impl run_in_build_dir emake |
114 |
+ fi |
115 |
} |
116 |
|
117 |
src_install() { |
118 |
@@ -110,6 +137,10 @@ src_install() { |
119 |
|
120 |
use php && php-ext-source-r2_createinifiles |
121 |
|
122 |
+ if use python; then |
123 |
+ python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install |
124 |
+ fi |
125 |
+ |
126 |
# For some USE combinations this directory is not created |
127 |
if [[ -d "${D}/usr/share/doc/xapian-bindings" ]]; then |
128 |
mv "${D}/usr/share/doc/xapian-bindings" "${D}/usr/share/doc/${PF}" || die |