1 |
commit: 0947afa365abf88670172058186a1ff22de84a07 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 5 15:18:04 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 5 15:22:05 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0947afa3 |
7 |
|
8 |
sci-chemistry/ball: Fix Swig bug, qualify std::isnan |
9 |
|
10 |
Gentoo-Bug: 583932 |
11 |
* EAPI=6 |
12 |
* Also fix GCC warning pollution due to |
13 |
misplaced attributes |
14 |
* Add subslot operator for dev-libs/boost |
15 |
* Remove USE=webkit, as webkit is no longer supported |
16 |
|
17 |
Package-Manager: portage-2.3.0_rc1 |
18 |
|
19 |
.../{ball-1.4.2.ebuild => ball-1.4.2-r1.ebuild} | 28 ++++---- |
20 |
.../files/ball-1.4.2-fix-python-bindings.patch | 22 ++++++ |
21 |
.../files/ball-1.4.2-std-namespace-isnan.patch | 16 +++++ |
22 |
.../files/ball-1.4.2-struct-swap-attribute.patch | 80 ++++++++++++++++++++++ |
23 |
sci-chemistry/ball/metadata.xml | 1 - |
24 |
5 files changed, 133 insertions(+), 14 deletions(-) |
25 |
|
26 |
diff --git a/sci-chemistry/ball/ball-1.4.2.ebuild b/sci-chemistry/ball/ball-1.4.2-r1.ebuild |
27 |
similarity index 78% |
28 |
rename from sci-chemistry/ball/ball-1.4.2.ebuild |
29 |
rename to sci-chemistry/ball/ball-1.4.2-r1.ebuild |
30 |
index bc10052..635e8b4 100644 |
31 |
--- a/sci-chemistry/ball/ball-1.4.2.ebuild |
32 |
+++ b/sci-chemistry/ball/ball-1.4.2-r1.ebuild |
33 |
@@ -1,8 +1,8 @@ |
34 |
-# Copyright 1999-2015 Gentoo Foundation |
35 |
+# Copyright 1999-2016 Gentoo Foundation |
36 |
# Distributed under the terms of the GNU General Public License v2 |
37 |
# $Id$ |
38 |
|
39 |
-EAPI=5 |
40 |
+EAPI=6 |
41 |
|
42 |
PYTHON_COMPAT=( python2_7 ) |
43 |
|
44 |
@@ -15,13 +15,13 @@ SRC_URI="http://www.ball-project.org/Downloads/v${PV}/BALL-${PV}.tar.xz" |
45 |
SLOT="0" |
46 |
LICENSE="LGPL-2 GPL-3" |
47 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
48 |
-IUSE="cuda mpi +python sql test +threads +webkit" |
49 |
+IUSE="cuda mpi +python sql test +threads" |
50 |
|
51 |
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
52 |
|
53 |
RDEPEND=" |
54 |
dev-cpp/eigen:3 |
55 |
- dev-libs/boost |
56 |
+ dev-libs/boost:= |
57 |
dev-qt/qtcore:4 |
58 |
dev-qt/qtgui:4 |
59 |
dev-qt/qtopengl:4 |
60 |
@@ -37,8 +37,7 @@ RDEPEND=" |
61 |
cuda? ( dev-util/nvidia-cuda-toolkit ) |
62 |
mpi? ( virtual/mpi ) |
63 |
python? ( ${PYTHON_DEPS} ) |
64 |
- sql? ( dev-qt/qtsql:4 ) |
65 |
- webkit? ( dev-qt/qtwebkit:4 )" |
66 |
+ sql? ( dev-qt/qtsql:4 )" |
67 |
DEPEND="${RDEPEND} |
68 |
dev-python/sip |
69 |
sys-devel/bison |
70 |
@@ -54,7 +53,10 @@ PATCHES=( |
71 |
"${FILESDIR}"/${PN}-1.4.1-BondOrder.xml.patch |
72 |
"${FILESDIR}"/${P}-Fix-compilation-of-sipModularWidget.patch |
73 |
"${FILESDIR}"/${P}-underlinking.patch |
74 |
- ) |
75 |
+ "${FILESDIR}"/${P}-fix-python-bindings.patch |
76 |
+ "${FILESDIR}"/${P}-std-namespace-isnan.patch |
77 |
+ "${FILESDIR}"/${P}-struct-swap-attribute.patch |
78 |
+) |
79 |
|
80 |
pkg_setup() { |
81 |
use python && python-single-r1_pkg_setup |
82 |
@@ -62,14 +64,14 @@ pkg_setup() { |
83 |
|
84 |
src_configure() { |
85 |
local mycmakeargs=( |
86 |
- $(cmake-utils_use_use threads FFTW_THREADS) |
87 |
- $(cmake-utils_use cuda MT_ENABLE_CUDA) |
88 |
- $(cmake-utils_use mpi MT_ENABLE_MPI) |
89 |
- $(cmake-utils_use sql BALL_HAS_QTSQL) |
90 |
- $(cmake-utils_use_use webkit USE_QTWEBKIT) |
91 |
- $(cmake-utils_use python BALL_PYTHON_SUPPORT) |
92 |
+ -DUSE_FFTW_THREADS=$(usex threads) |
93 |
+ -DMT_ENABLE_CUDA=$(usex cuda) |
94 |
+ -DMT_ENABLE_MPI=$(usex mpi) |
95 |
+ -DBALL_HAS_QTSQL=$(usex sql) |
96 |
+ -DBALL_PYTHON_SUPPORT=$(usex python) |
97 |
) |
98 |
cmake-utils_src_configure |
99 |
+ |
100 |
local i |
101 |
for i in "${S}"/data/*; do |
102 |
ln -sf "${i}" "${BUILD_DIR}"/source/TEST/ || die |
103 |
|
104 |
diff --git a/sci-chemistry/ball/files/ball-1.4.2-fix-python-bindings.patch b/sci-chemistry/ball/files/ball-1.4.2-fix-python-bindings.patch |
105 |
new file mode 100644 |
106 |
index 0000000..a13ea2f |
107 |
--- /dev/null |
108 |
+++ b/sci-chemistry/ball/files/ball-1.4.2-fix-python-bindings.patch |
109 |
@@ -0,0 +1,22 @@ |
110 |
+From 38a955ad9588817073a330c79d4b4476afcf69d5 Mon Sep 17 00:00:00 2001 |
111 |
+From: Daniel Stoeckel <dstoeckel@×××××××××××××.de> |
112 |
+Date: Thu, 14 Apr 2016 19:30:04 +0200 |
113 |
+Subject: [PATCH] Fix Python bindings for Box |
114 |
+ |
115 |
+--- |
116 |
+ source/PYTHON/EXTENSIONS/VIEW/box.sip | 2 +- |
117 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
118 |
+ |
119 |
+diff --git a/source/PYTHON/EXTENSIONS/VIEW/box.sip b/source/PYTHON/EXTENSIONS/VIEW/box.sip |
120 |
+index 341b1a4..592765e 100644 |
121 |
+--- a/source/PYTHON/EXTENSIONS/VIEW/box.sip |
122 |
++++ b/source/PYTHON/EXTENSIONS/VIEW/box.sip |
123 |
+@@ -6,7 +6,7 @@ |
124 |
+ |
125 |
+ class Box |
126 |
+ : GeometricObject, |
127 |
+- Vertex2 |
128 |
++ Box3 |
129 |
+ { |
130 |
+ %TypeHeaderCode |
131 |
+ #include <BALL/VIEW/PRIMITIVES/box.h> |
132 |
|
133 |
diff --git a/sci-chemistry/ball/files/ball-1.4.2-std-namespace-isnan.patch b/sci-chemistry/ball/files/ball-1.4.2-std-namespace-isnan.patch |
134 |
new file mode 100644 |
135 |
index 0000000..cea6377 |
136 |
--- /dev/null |
137 |
+++ b/sci-chemistry/ball/files/ball-1.4.2-std-namespace-isnan.patch |
138 |
@@ -0,0 +1,16 @@ |
139 |
+Fix C++11 changes to isnan(): |
140 |
+* /var/tmp/portage/sci-chemistry/ball-1.4.2/work/BALL-1.4.2/source/MOLMEC/MINIMIZATION/shiftedLVMM.C:769:46: required from here |
141 |
+* /var/tmp/portage/sci-chemistry/ball-1.4.2/work/BALL-1.4.2/include/BALL/MATHS/common.h:175:18: error: ‘isnan’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] |
142 |
+* return (isnan(t) != 0); |
143 |
+ |
144 |
+--- BALL-1.4.2/include/BALL/MATHS/common.h |
145 |
++++ BALL-1.4.2/include/BALL/MATHS/common.h |
146 |
+@@ -172,7 +172,7 @@ |
147 |
+ #elif defined(BALL_OS_DARWIN) |
148 |
+ return ( __inline_isnand(t) != 0); |
149 |
+ #else |
150 |
+- return (isnan(t) != 0); |
151 |
++ return (std::isnan(t) != 0); |
152 |
+ #endif |
153 |
+ } |
154 |
+ |
155 |
|
156 |
diff --git a/sci-chemistry/ball/files/ball-1.4.2-struct-swap-attribute.patch b/sci-chemistry/ball/files/ball-1.4.2-struct-swap-attribute.patch |
157 |
new file mode 100644 |
158 |
index 0000000..da33491 |
159 |
--- /dev/null |
160 |
+++ b/sci-chemistry/ball/files/ball-1.4.2-struct-swap-attribute.patch |
161 |
@@ -0,0 +1,80 @@ |
162 |
+Silence warning pollution due to misplaced attributes: |
163 |
+* /var/tmp/portage/sci-chemistry/ball-1.4.2/work/BALL-1.4.2/include/BALL/COMMON/logStream.h:165:22: note: attribute for ‘struct BALL::LogStreamBuf::StreamStruct’ must follow the ‘struct’ keyword |
164 |
+ |
165 |
+--- BALL-1.4.2/include/BALL/COMMON/logStream.h |
166 |
++++ BALL-1.4.2/include/BALL/COMMON/logStream.h |
167 |
+@@ -162,7 +162,7 @@ |
168 |
+ virtual int overflow(int c = -1); |
169 |
+ //@} |
170 |
+ |
171 |
+- BALL_EXPORT struct StreamStruct |
172 |
++ struct BALL_EXPORT StreamStruct |
173 |
+ { |
174 |
+ std::ostream* stream; |
175 |
+ string prefix; |
176 |
+--- BALL-1.4.2/include/BALL/FORMAT/MOL2File.h |
177 |
++++ BALL-1.4.2/include/BALL/FORMAT/MOL2File.h |
178 |
+@@ -33,7 +33,7 @@ |
179 |
+ public: |
180 |
+ |
181 |
+ /// A class used for storing TRIPOS sets |
182 |
+- BALL_EXPORT struct SetStruct |
183 |
++ struct BALL_EXPORT SetStruct |
184 |
+ { |
185 |
+ String name; |
186 |
+ bool is_static; |
187 |
+@@ -136,7 +136,7 @@ |
188 |
+ |
189 |
+ bool containsAtomChilds_(AtomContainerConstIterator& frag_it); |
190 |
+ |
191 |
+- BALL_EXPORT struct AtomStruct |
192 |
++ struct BALL_EXPORT AtomStruct |
193 |
+ { |
194 |
+ String name; |
195 |
+ Vector3 position; |
196 |
+@@ -146,14 +146,14 @@ |
197 |
+ float charge; |
198 |
+ }; |
199 |
+ |
200 |
+- BALL_EXPORT struct BondStruct |
201 |
++ struct BALL_EXPORT BondStruct |
202 |
+ { |
203 |
+ Position atom1; |
204 |
+ Position atom2; |
205 |
+ String type; |
206 |
+ }; |
207 |
+ |
208 |
+- BALL_EXPORT struct MoleculeStruct |
209 |
++ struct BALL_EXPORT MoleculeStruct |
210 |
+ { |
211 |
+ String name; |
212 |
+ Size number_of_atoms; |
213 |
+@@ -166,7 +166,7 @@ |
214 |
+ String comment; |
215 |
+ }; |
216 |
+ |
217 |
+- BALL_EXPORT struct SubstructureStruct |
218 |
++ struct BALL_EXPORT SubstructureStruct |
219 |
+ { |
220 |
+ String name; |
221 |
+ Size root_atom; |
222 |
+@@ -178,7 +178,7 @@ |
223 |
+ String comment; |
224 |
+ }; |
225 |
+ |
226 |
+- BALL_EXPORT struct CommentStruct |
227 |
++ struct BALL_EXPORT CommentStruct |
228 |
+ { |
229 |
+ String name; |
230 |
+ String value; |
231 |
+--- BALL-1.4.2/include/BALL/FORMAT/MOLFile.h |
232 |
++++ BALL-1.4.2/include/BALL/FORMAT/MOLFile.h |
233 |
+@@ -41,7 +41,7 @@ |
234 |
+ @see PropertyManager::setProperty |
235 |
+ @see PropertyManager::getProperty |
236 |
+ */ |
237 |
+- BALL_EXPORT struct Property |
238 |
++ struct BALL_EXPORT Property |
239 |
+ { |
240 |
+ /// |
241 |
+ static const String ATOM_MASS_DIFFERENCE; |
242 |
|
243 |
diff --git a/sci-chemistry/ball/metadata.xml b/sci-chemistry/ball/metadata.xml |
244 |
index a4d9afb..72d683b 100644 |
245 |
--- a/sci-chemistry/ball/metadata.xml |
246 |
+++ b/sci-chemistry/ball/metadata.xml |
247 |
@@ -27,6 +27,5 @@ integrated user-friendly GUI. |
248 |
<use> |
249 |
<flag name="sql">Include SQL database support</flag> |
250 |
<flag name="cuda">Include cuda support</flag> |
251 |
- <flag name="webkit">Uses <pkg>dev-qt/qtwebkit</pkg> for drawing</flag> |
252 |
</use> |
253 |
</pkgmetadata> |