summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-06-05 17:18:04 +0200
committerDavid Seifert <soap@gentoo.org>2016-06-05 17:22:05 +0200
commit0947afa365abf88670172058186a1ff22de84a07 (patch)
tree28abe932cc12f586c5ba58b91358a14180ea3f89 /sci-chemistry/ball
parentp/p/l-s/arm: add arm profile for prefix-standalone. (diff)
downloadgentoo-0947afa365abf88670172058186a1ff22de84a07.tar.gz
gentoo-0947afa365abf88670172058186a1ff22de84a07.tar.bz2
gentoo-0947afa365abf88670172058186a1ff22de84a07.zip
sci-chemistry/ball: Fix Swig bug, qualify std::isnan
Gentoo-Bug: 583932 * EAPI=6 * Also fix GCC warning pollution due to misplaced attributes * Add subslot operator for dev-libs/boost * Remove USE=webkit, as webkit is no longer supported Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'sci-chemistry/ball')
-rw-r--r--sci-chemistry/ball/ball-1.4.2-r1.ebuild (renamed from sci-chemistry/ball/ball-1.4.2.ebuild)28
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-fix-python-bindings.patch22
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-std-namespace-isnan.patch16
-rw-r--r--sci-chemistry/ball/files/ball-1.4.2-struct-swap-attribute.patch80
-rw-r--r--sci-chemistry/ball/metadata.xml1
5 files changed, 133 insertions, 14 deletions
diff --git a/sci-chemistry/ball/ball-1.4.2.ebuild b/sci-chemistry/ball/ball-1.4.2-r1.ebuild
index bc1005204c0b..635e8b4989ab 100644
--- a/sci-chemistry/ball/ball-1.4.2.ebuild
+++ b/sci-chemistry/ball/ball-1.4.2-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
PYTHON_COMPAT=( python2_7 )
@@ -15,13 +15,13 @@ SRC_URI="http://www.ball-project.org/Downloads/v${PV}/BALL-${PV}.tar.xz"
SLOT="0"
LICENSE="LGPL-2 GPL-3"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="cuda mpi +python sql test +threads +webkit"
+IUSE="cuda mpi +python sql test +threads"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
dev-cpp/eigen:3
- dev-libs/boost
+ dev-libs/boost:=
dev-qt/qtcore:4
dev-qt/qtgui:4
dev-qt/qtopengl:4
@@ -37,8 +37,7 @@ RDEPEND="
cuda? ( dev-util/nvidia-cuda-toolkit )
mpi? ( virtual/mpi )
python? ( ${PYTHON_DEPS} )
- sql? ( dev-qt/qtsql:4 )
- webkit? ( dev-qt/qtwebkit:4 )"
+ sql? ( dev-qt/qtsql:4 )"
DEPEND="${RDEPEND}
dev-python/sip
sys-devel/bison
@@ -54,7 +53,10 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.4.1-BondOrder.xml.patch
"${FILESDIR}"/${P}-Fix-compilation-of-sipModularWidget.patch
"${FILESDIR}"/${P}-underlinking.patch
- )
+ "${FILESDIR}"/${P}-fix-python-bindings.patch
+ "${FILESDIR}"/${P}-std-namespace-isnan.patch
+ "${FILESDIR}"/${P}-struct-swap-attribute.patch
+)
pkg_setup() {
use python && python-single-r1_pkg_setup
@@ -62,14 +64,14 @@ pkg_setup() {
src_configure() {
local mycmakeargs=(
- $(cmake-utils_use_use threads FFTW_THREADS)
- $(cmake-utils_use cuda MT_ENABLE_CUDA)
- $(cmake-utils_use mpi MT_ENABLE_MPI)
- $(cmake-utils_use sql BALL_HAS_QTSQL)
- $(cmake-utils_use_use webkit USE_QTWEBKIT)
- $(cmake-utils_use python BALL_PYTHON_SUPPORT)
+ -DUSE_FFTW_THREADS=$(usex threads)
+ -DMT_ENABLE_CUDA=$(usex cuda)
+ -DMT_ENABLE_MPI=$(usex mpi)
+ -DBALL_HAS_QTSQL=$(usex sql)
+ -DBALL_PYTHON_SUPPORT=$(usex python)
)
cmake-utils_src_configure
+
local i
for i in "${S}"/data/*; do
ln -sf "${i}" "${BUILD_DIR}"/source/TEST/ || die
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
new file mode 100644
index 000000000000..a13ea2f36ec0
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-fix-python-bindings.patch
@@ -0,0 +1,22 @@
+From 38a955ad9588817073a330c79d4b4476afcf69d5 Mon Sep 17 00:00:00 2001
+From: Daniel Stoeckel <dstoeckel@bioinf.uni-sb.de>
+Date: Thu, 14 Apr 2016 19:30:04 +0200
+Subject: [PATCH] Fix Python bindings for Box
+
+---
+ source/PYTHON/EXTENSIONS/VIEW/box.sip | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/PYTHON/EXTENSIONS/VIEW/box.sip b/source/PYTHON/EXTENSIONS/VIEW/box.sip
+index 341b1a4..592765e 100644
+--- a/source/PYTHON/EXTENSIONS/VIEW/box.sip
++++ b/source/PYTHON/EXTENSIONS/VIEW/box.sip
+@@ -6,7 +6,7 @@
+
+ class Box
+ : GeometricObject,
+- Vertex2
++ Box3
+ {
+ %TypeHeaderCode
+ #include <BALL/VIEW/PRIMITIVES/box.h>
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
new file mode 100644
index 000000000000..cea6377b6a20
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-std-namespace-isnan.patch
@@ -0,0 +1,16 @@
+Fix C++11 changes to isnan():
+* /var/tmp/portage/sci-chemistry/ball-1.4.2/work/BALL-1.4.2/source/MOLMEC/MINIMIZATION/shiftedLVMM.C:769:46: required from here
+* /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]
+* return (isnan(t) != 0);
+
+--- BALL-1.4.2/include/BALL/MATHS/common.h
++++ BALL-1.4.2/include/BALL/MATHS/common.h
+@@ -172,7 +172,7 @@
+ #elif defined(BALL_OS_DARWIN)
+ return ( __inline_isnand(t) != 0);
+ #else
+- return (isnan(t) != 0);
++ return (std::isnan(t) != 0);
+ #endif
+ }
+
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
new file mode 100644
index 000000000000..da334915f410
--- /dev/null
+++ b/sci-chemistry/ball/files/ball-1.4.2-struct-swap-attribute.patch
@@ -0,0 +1,80 @@
+Silence warning pollution due to misplaced attributes:
+* /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
+
+--- BALL-1.4.2/include/BALL/COMMON/logStream.h
++++ BALL-1.4.2/include/BALL/COMMON/logStream.h
+@@ -162,7 +162,7 @@
+ virtual int overflow(int c = -1);
+ //@}
+
+- BALL_EXPORT struct StreamStruct
++ struct BALL_EXPORT StreamStruct
+ {
+ std::ostream* stream;
+ string prefix;
+--- BALL-1.4.2/include/BALL/FORMAT/MOL2File.h
++++ BALL-1.4.2/include/BALL/FORMAT/MOL2File.h
+@@ -33,7 +33,7 @@
+ public:
+
+ /// A class used for storing TRIPOS sets
+- BALL_EXPORT struct SetStruct
++ struct BALL_EXPORT SetStruct
+ {
+ String name;
+ bool is_static;
+@@ -136,7 +136,7 @@
+
+ bool containsAtomChilds_(AtomContainerConstIterator& frag_it);
+
+- BALL_EXPORT struct AtomStruct
++ struct BALL_EXPORT AtomStruct
+ {
+ String name;
+ Vector3 position;
+@@ -146,14 +146,14 @@
+ float charge;
+ };
+
+- BALL_EXPORT struct BondStruct
++ struct BALL_EXPORT BondStruct
+ {
+ Position atom1;
+ Position atom2;
+ String type;
+ };
+
+- BALL_EXPORT struct MoleculeStruct
++ struct BALL_EXPORT MoleculeStruct
+ {
+ String name;
+ Size number_of_atoms;
+@@ -166,7 +166,7 @@
+ String comment;
+ };
+
+- BALL_EXPORT struct SubstructureStruct
++ struct BALL_EXPORT SubstructureStruct
+ {
+ String name;
+ Size root_atom;
+@@ -178,7 +178,7 @@
+ String comment;
+ };
+
+- BALL_EXPORT struct CommentStruct
++ struct BALL_EXPORT CommentStruct
+ {
+ String name;
+ String value;
+--- BALL-1.4.2/include/BALL/FORMAT/MOLFile.h
++++ BALL-1.4.2/include/BALL/FORMAT/MOLFile.h
+@@ -41,7 +41,7 @@
+ @see PropertyManager::setProperty
+ @see PropertyManager::getProperty
+ */
+- BALL_EXPORT struct Property
++ struct BALL_EXPORT Property
+ {
+ ///
+ static const String ATOM_MASS_DIFFERENCE;
diff --git a/sci-chemistry/ball/metadata.xml b/sci-chemistry/ball/metadata.xml
index a4d9afb7efb3..72d683b18460 100644
--- a/sci-chemistry/ball/metadata.xml
+++ b/sci-chemistry/ball/metadata.xml
@@ -27,6 +27,5 @@ integrated user-friendly GUI.
<use>
<flag name="sql">Include SQL database support</flag>
<flag name="cuda">Include cuda support</flag>
- <flag name="webkit">Uses <pkg>dev-qt/qtwebkit</pkg> for drawing</flag>
</use>
</pkgmetadata>