1 |
commit: e4dbb5c139e2c3dfe8a7d6eaa7f19a08da9b88b0 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 2 18:34:46 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 2 18:35:42 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4dbb5c1 |
7 |
|
8 |
sci-biology/pysam: Fix broken relative -I |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=629670 |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
.../pysam/files/pysam-0.12-fix-buildsystem.patch | 63 ++++++++++++++++++++++ |
14 |
sci-biology/pysam/pysam-0.12.ebuild | 6 ++- |
15 |
2 files changed, 68 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch b/sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..8b323a63fba |
20 |
--- /dev/null |
21 |
+++ b/sci-biology/pysam/files/pysam-0.12-fix-buildsystem.patch |
22 |
@@ -0,0 +1,63 @@ |
23 |
+The build system is not designed with partial out-of-source |
24 |
+builds in mind. This is evident by using relative includes |
25 |
+such as '-Isamtools' instead of proper relative or absolute |
26 |
+paths. |
27 |
+ |
28 |
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=629670 |
29 |
+ |
30 |
+--- a/setup.py |
31 |
++++ b/setup.py |
32 |
+@@ -359,6 +359,8 @@ |
33 |
+ |
34 |
+ define_macros = [] |
35 |
+ |
36 |
++samtools_include_dirs = [os.path.abspath("samtools")] |
37 |
++ |
38 |
+ chtslib = Extension( |
39 |
+ "pysam.libchtslib", |
40 |
+ [source_pattern % "htslib", |
41 |
+@@ -385,7 +387,7 @@ |
42 |
+ htslib_sources + |
43 |
+ os_c_files, |
44 |
+ library_dirs=htslib_library_dirs, |
45 |
+- include_dirs=["pysam", "samtools", "."] + include_os + htslib_include_dirs, |
46 |
++ include_dirs=["pysam", "."] + samtools_include_dirs + include_os + htslib_include_dirs, |
47 |
+ libraries=external_htslib_libraries + internal_htslib_libraries, |
48 |
+ language="c", |
49 |
+ extra_compile_args=extra_compile_args, |
50 |
+@@ -404,7 +406,7 @@ |
51 |
+ htslib_sources + |
52 |
+ os_c_files, |
53 |
+ library_dirs=htslib_library_dirs, |
54 |
+- include_dirs=["pysam", "samtools"] + include_os + htslib_include_dirs, |
55 |
++ include_dirs=["pysam"] + samtools_include_dirs + include_os + htslib_include_dirs, |
56 |
+ libraries=external_htslib_libraries + internal_htslib_libraries, |
57 |
+ language="c", |
58 |
+ extra_compile_args=extra_compile_args, |
59 |
+@@ -423,7 +425,7 @@ |
60 |
+ htslib_sources + |
61 |
+ os_c_files, |
62 |
+ library_dirs=htslib_library_dirs, |
63 |
+- include_dirs=["pysam", "samtools", "."] + include_os + htslib_include_dirs, |
64 |
++ include_dirs=["pysam", "."] + samtools_include_dirs + include_os + htslib_include_dirs, |
65 |
+ libraries=external_htslib_libraries + internal_htslib_libraries, |
66 |
+ language="c", |
67 |
+ extra_compile_args=extra_compile_args, |
68 |
+@@ -467,7 +469,7 @@ |
69 |
+ htslib_sources + |
70 |
+ os_c_files, |
71 |
+ library_dirs=["pysam"] + htslib_library_dirs, |
72 |
+- include_dirs=["samtools", "pysam", "."] + |
73 |
++ include_dirs=["pysam", "."] + samtools_include_dirs + |
74 |
+ include_os + htslib_include_dirs, |
75 |
+ libraries=external_htslib_libraries + internal_htslib_libraries, |
76 |
+ language="c", |
77 |
+@@ -482,7 +484,7 @@ |
78 |
+ htslib_sources + |
79 |
+ os_c_files, |
80 |
+ library_dirs=["pysam"] + htslib_library_dirs, |
81 |
+- include_dirs=["bcftools", "pysam", "."] + |
82 |
++ include_dirs=["bcftools", "pysam", "."] + samtools_include_dirs + |
83 |
+ include_os + htslib_include_dirs, |
84 |
+ libraries=external_htslib_libraries + internal_htslib_libraries, |
85 |
+ language="c", |
86 |
|
87 |
diff --git a/sci-biology/pysam/pysam-0.12.ebuild b/sci-biology/pysam/pysam-0.12.ebuild |
88 |
index e181e06ac9b..1f4f58fdfe2 100644 |
89 |
--- a/sci-biology/pysam/pysam-0.12.ebuild |
90 |
+++ b/sci-biology/pysam/pysam-0.12.ebuild |
91 |
@@ -22,10 +22,14 @@ DEPEND="${RDEPEND} |
92 |
dev-python/cython[${PYTHON_USEDEP}] |
93 |
dev-python/setuptools[${PYTHON_USEDEP}]" |
94 |
|
95 |
+PATCHES=( "${FILESDIR}"/${PN}-0.12-fix-buildsystem.patch ) |
96 |
+ |
97 |
python_prepare_all() { |
98 |
+ # unbundle htslib |
99 |
+ export HTSLIB_MODE="external" |
100 |
export HTSLIB_INCLUDE_DIR="${EPREFIX}"/usr/include |
101 |
export HTSLIB_LIBRARY_DIR="${EPREFIX}"/usr/$(get_libdir) |
102 |
- export HTSLIB_CONFIGURE_OPTIONS="--disable-libcurl" |
103 |
+ rm -r htslib || die |
104 |
|
105 |
# prevent setup.py from adding RPATHs |
106 |
sed -e "/ext\.extra_link_args += \['-Wl,-rpath,\$ORIGIN'\]/d" \ |