[arch-commits] Commit in kalzium/trunk (PKGBUILD kalzium-openbabel3.patch)
Antonio Rojas
arojas at archlinux.org
Sat Oct 12 10:50:19 UTC 2019
Date: Saturday, October 12, 2019 @ 10:50:19
Author: arojas
Revision: 364674
openbabel 3.0 rebuld
Added:
kalzium/trunk/kalzium-openbabel3.patch
Modified:
kalzium/trunk/PKGBUILD
--------------------------+
PKGBUILD | 16 ++++++++++++----
kalzium-openbabel3.patch | 25 +++++++++++++++++++++++++
2 files changed, 37 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-12 10:25:28 UTC (rev 364673)
+++ PKGBUILD 2019-10-12 10:50:19 UTC (rev 364674)
@@ -3,7 +3,7 @@
pkgname=kalzium
pkgver=19.08.2
-pkgrel=1
+pkgrel=2
pkgdesc="Periodic Table of Elements"
url="https://kde.org/applications/education/kalzium/"
arch=(x86_64)
@@ -11,20 +11,28 @@
depends=(khtml knewstuff kplotting kunitconversion avogadrolibs openbabel hicolor-icon-theme)
makedepends=(extra-cmake-modules kdoctools eigen ocaml facile python)
groups=(kde-applications kdeedu)
-source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
+source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}
+ kalzium-openbabel3.patch)
sha256sums=('e63d88526c86dd67ab133694dc23b6a35fd5514643bd7a7f1790db8c2a8490d9'
- 'SKIP')
+ 'SKIP'
+ '010f10640fb80834f13556e6cf03f594118081d610701a82aeec043b7a44f1e8')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid at kde.org>
F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck at kde.org>
prepare() {
mkdir -p build
+
+ cd $pkgname-$pkgver
+ patch -p1 -i ../kalzium-openbabel3.patch
}
build() {
cd build
cmake ../$pkgname-$pkgver \
- -DBUILD_TESTING=OFF
+ -DBUILD_TESTING=OFF \
+ -DOPENBABEL2_INCLUDE_DIR=/usr/include/openbabel3 \
+ -DOPENBABEL2_LIBRARIES=/usr/lib/libopenbabel.so \
+ -DOPENBABEL2_VERSION_MET=TRUE
make
}
Added: kalzium-openbabel3.patch
===================================================================
--- kalzium-openbabel3.patch (rev 0)
+++ kalzium-openbabel3.patch 2019-10-12 10:50:19 UTC (rev 364674)
@@ -0,0 +1,25 @@
+diff --git a/src/kalziumschemetype.cpp b/src/kalziumschemetype.cpp
+index 91a5cbf0..e2935916 100644
+--- a/src/kalziumschemetype.cpp
++++ b/src/kalziumschemetype.cpp
+@@ -23,7 +23,7 @@
+ #include "prefs.h"
+
+ #ifdef HAVE_OPENBABEL2
+-#include <openbabel/mol.h>
++#include <openbabel/elements.h>
+ #endif
+
+ #include <QBrush>
+@@ -406,8 +407,9 @@ QBrush KalziumColorSchemeType::elementBrush(int el) const
+ {
+ QColor c;
+
+- std::vector<double> color = OpenBabel::etab.GetRGB(el);
+- c.setRgbF(color[0], color[1], color[2]);
++ double *red, *green, *blue;
++ OpenBabel::OBElements::GetRGB(el, red, green, blue);
++ c.setRgbF(*red, *green, *blue);
+
+ return QBrush(c);
+ }
More information about the arch-commits
mailing list