1 |
commit: 4f5873115bca3a0e697598a10f67d2294cf81364 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 7 21:04:05 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 7 21:04:24 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f587311 |
7 |
|
8 |
sci-chemistry/sparky: Allow for compiling with GCC 6 |
9 |
|
10 |
Gentoo-bug: 596012 |
11 |
* EAPI=6 |
12 |
* Patch by Peter Levine |
13 |
|
14 |
Package-Manager: portage-2.3.1 |
15 |
|
16 |
sci-chemistry/sparky/files/3.115-fix-c++14.patch | 32 +++++++++++++++++++++ |
17 |
...arky-3.115-r1.ebuild => sparky-3.115-r2.ebuild} | 33 ++++++++++------------ |
18 |
2 files changed, 47 insertions(+), 18 deletions(-) |
19 |
|
20 |
diff --git a/sci-chemistry/sparky/files/3.115-fix-c++14.patch b/sci-chemistry/sparky/files/3.115-fix-c++14.patch |
21 |
new file mode 100644 |
22 |
index 00000000..3a05ea7 |
23 |
--- /dev/null |
24 |
+++ b/sci-chemistry/sparky/files/3.115-fix-c++14.patch |
25 |
@@ -0,0 +1,32 @@ |
26 |
+Fix the custom new/new[] operators in order to account for changed |
27 |
+noexcept semantics in C++11. |
28 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=596012 |
29 |
+ |
30 |
+Patch by Peter Levine |
31 |
+ |
32 |
+--- a/c++/memalloc.cc |
33 |
++++ b/c++/memalloc.cc |
34 |
+@@ -39,7 +39,10 @@ |
35 |
+ |
36 |
+ // ---------------------------------------------------------------------------- |
37 |
+ // |
38 |
+-void *operator new(size_t size) throw(std::bad_alloc) |
39 |
++void *operator new(size_t size) |
40 |
++#if __cplusplus < 201103L |
41 |
++throw(std::bad_alloc) |
42 |
++#endif |
43 |
+ { |
44 |
+ void *value = allocate(size); |
45 |
+ if (tracking_memory) |
46 |
+@@ -72,7 +75,10 @@ |
47 |
+ |
48 |
+ // ---------------------------------------------------------------------------- |
49 |
+ // |
50 |
+-void *operator new[](size_t size) throw(std::bad_alloc) |
51 |
++void *operator new[](size_t size) |
52 |
++#if __cplusplus < 201103L |
53 |
++throw(std::bad_alloc) |
54 |
++#endif |
55 |
+ { |
56 |
+ void *value = allocate(size); |
57 |
+ if (tracking_memory) |
58 |
|
59 |
diff --git a/sci-chemistry/sparky/sparky-3.115-r1.ebuild b/sci-chemistry/sparky/sparky-3.115-r2.ebuild |
60 |
similarity index 89% |
61 |
rename from sci-chemistry/sparky/sparky-3.115-r1.ebuild |
62 |
rename to sci-chemistry/sparky/sparky-3.115-r2.ebuild |
63 |
index 1dc0780..b04634e 100644 |
64 |
--- a/sci-chemistry/sparky/sparky-3.115-r1.ebuild |
65 |
+++ b/sci-chemistry/sparky/sparky-3.115-r2.ebuild |
66 |
@@ -1,13 +1,13 @@ |
67 |
-# Copyright 1999-2015 Gentoo Foundation |
68 |
+# Copyright 1999-2016 Gentoo Foundation |
69 |
# Distributed under the terms of the GNU General Public License v2 |
70 |
# $Id$ |
71 |
|
72 |
-EAPI=5 |
73 |
+EAPI=6 |
74 |
|
75 |
PYTHON_COMPAT=( python2_7 ) |
76 |
PYTHON_REQ_USE="tk" |
77 |
|
78 |
-inherit eutils flag-o-matic multilib prefix python-single-r1 toolchain-funcs |
79 |
+inherit flag-o-matic prefix python-single-r1 toolchain-funcs |
80 |
|
81 |
DESCRIPTION="Graphical NMR assignment and integration program for large polymers" |
82 |
HOMEPAGE="http://www.cgl.ucsf.edu/home/sparky/" |
83 |
@@ -17,7 +17,6 @@ LICENSE="sparky" |
84 |
SLOT="0" |
85 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
86 |
IUSE="examples" |
87 |
- |
88 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
89 |
|
90 |
RDEPEND="${PYTHON_DEPS} |
91 |
@@ -35,7 +34,8 @@ PATCHES=( |
92 |
"${FILESDIR}"/${PV}-wrapper-r1.patch |
93 |
"${FILESDIR}"/${PV}-paths.patch |
94 |
"${FILESDIR}"/${PV}-makefile.patch |
95 |
- ) |
96 |
+ "${FILESDIR}"/${PV}-fix-c++14.patch |
97 |
+) |
98 |
|
99 |
pkg_setup() { |
100 |
python-single-r1_pkg_setup |
101 |
@@ -44,7 +44,7 @@ pkg_setup() { |
102 |
} |
103 |
|
104 |
src_prepare() { |
105 |
- epatch ${PATCHES[@]} |
106 |
+ default |
107 |
|
108 |
sed -i \ |
109 |
-e "s:^\(set PYTHON =\).*:\1 ${PYTHON}:g" \ |
110 |
@@ -92,7 +92,6 @@ src_compile() { |
111 |
|
112 |
src_install() { |
113 |
# The symlinks are needed to avoid hacking the complete code to fix the locations |
114 |
- |
115 |
dobin c++/{{bruk,matrix,peaks,pipe,vnmr}2ucsf,ucsfdata,sparky-no-python} bin/${PN} |
116 |
|
117 |
insinto /usr/share/${PN}/ |
118 |
@@ -100,22 +99,20 @@ src_install() { |
119 |
dosym ../../share/${PN}/print-prolog.ps /usr/$(get_libdir)/${PN}/print-prolog.ps |
120 |
dosym ../../share/${PN}/Sparky /usr/$(get_libdir)/${PN}/Sparky |
121 |
|
122 |
- dohtml -r manual/* |
123 |
- dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/${PN}/manual |
124 |
- |
125 |
python_moduleinto ${PN} |
126 |
python_domodule python/*.py c++/{spy.so,_tkinter.so} |
127 |
- |
128 |
- python_optimize |
129 |
- |
130 |
dosym ../${EPYTHON}/site-packages /usr/$(get_libdir)/${PN}/python |
131 |
|
132 |
+ rm manual/{pkzip.cfg,Makefile} || die |
133 |
+ mv {manual/,}manual.ps || die |
134 |
+ local DOCS=( README manual.ps ) |
135 |
+ local HTML_DOCS=( manual/. ) |
136 |
+ einstalldocs |
137 |
+ newdoc python/README README.python |
138 |
+ dosym ../../share/doc/${PF}/html /usr/$(get_libdir)/${PN}/manual |
139 |
+ |
140 |
if use examples; then |
141 |
- insinto /usr/share/doc/${PF}/ |
142 |
- doins -r example || die |
143 |
+ dodoc -r example |
144 |
dosym ../../share/doc/${PF}/example /usr/$(get_libdir)/${PN}/example |
145 |
fi |
146 |
- |
147 |
- dodoc README |
148 |
- newdoc python/README README.python |
149 |
} |