summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Rojas2016-12-17 10:55:00 +0000
committerAntonio Rojas2016-12-17 10:55:00 +0000
commite6ed43a2e07d5667c6126ab85d17743d82599a28 (patch)
treea5ba68c726304e926ed2d1074389dd5fc54773a4
downloadaur-e6ed43a2e07d5667c6126ab85d17743d82599a28.tar.gz
Dropped from extra
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD47
-rw-r--r--avogadro-fix-linking.patch14
-rw-r--r--avogadro-glibc2.23.patch18
-rw-r--r--boost153.patch60
5 files changed, 168 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..faf55a39fef
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = avogadro
+ pkgdesc = An advanced molecular editor based on Qt
+ pkgver = 1.2.0
+ pkgrel = 4
+ url = http://avogadro.openmolecules.net/wiki/Main_Page
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = cmake
+ makedepends = boost
+ makedepends = doxygen
+ makedepends = mesa-libgl
+ makedepends = eigen
+ depends = openbabel
+ depends = python2-pyqt4
+ depends = boost-libs
+ depends = glew
+ depends = python2-numpy
+ source = http://downloads.sourceforge.net/avogadro/avogadro-1.2.0.tar.gz
+ source = boost153.patch
+ source = avogadro-glibc2.23.patch
+ source = avogadro-fix-linking.patch
+ md5sums = 3206068fc27bd3b717c568ee72f1e5ec
+ md5sums = aa2573f78d5dbd85b3cb79e08acde8ab
+ md5sums = 83990ecbb4c076fddda3eaca2c2975ed
+ md5sums = e333f624d5649c6d3a7cfd14a778bc73
+
+pkgname = avogadro
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f732e39c085
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 277876 2016-10-07 17:36:47Z arojas $
+# Maintainer:
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Nick B <Shirakawasuna at gmail _dot_com>
+
+pkgname=avogadro
+pkgver=1.2.0
+pkgrel=4
+pkgdesc="An advanced molecular editor based on Qt"
+arch=('i686' 'x86_64')
+url="http://avogadro.openmolecules.net/wiki/Main_Page"
+license=('GPL2')
+depends=('openbabel' 'python2-pyqt4' 'boost-libs' 'glew' 'python2-numpy')
+makedepends=('cmake' 'boost' 'doxygen' 'mesa-libgl' 'eigen')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'boost153.patch' 'avogadro-glibc2.23.patch' 'avogadro-fix-linking.patch')
+md5sums=('3206068fc27bd3b717c568ee72f1e5ec'
+ 'aa2573f78d5dbd85b3cb79e08acde8ab'
+ '83990ecbb4c076fddda3eaca2c2975ed'
+ 'e333f624d5649c6d3a7cfd14a778bc73')
+
+prepare() {
+ mkdir build
+
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i "${srcdir}"/boost153.patch
+# Fix build with glibc 2.23
+ patch -p1 -i ../avogadro-glibc2.23.patch
+# Fix linking (Fedora)
+ patch -p1 -i ../avogadro-fix-linking.patch
+}
+
+build() {
+ cd build
+
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/avogadro-fix-linking.patch b/avogadro-fix-linking.patch
new file mode 100644
index 00000000000..c819b08502e
--- /dev/null
+++ b/avogadro-fix-linking.patch
@@ -0,0 +1,14 @@
+diff -up avogadro-1.1.1/libavogadro/src/python/CMakeLists.txt.openbabel avogadro-1.1.1/libavogadro/src/python/CMakeLists.txt
+--- avogadro-1.1.1/libavogadro/src/python/CMakeLists.txt.openbabel 2013-12-06 09:50:04.000000000 -0600
++++ avogadro-1.1.1/libavogadro/src/python/CMakeLists.txt 2016-01-25 13:50:10.469758655 -0600
+@@ -20,8 +20,8 @@ if (WIN32)
+ set_target_properties(python-module PROPERTIES SUFFIX ".pyd")
+ target_link_libraries(python-module avogadro ${PYTHON_LIBRARIES})
+ else()
+- target_link_libraries(python-module stdc++ avogadro
+- ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
++ target_link_libraries(python-module stdc++ avogadro
++ ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${OPENBABEL2_LIBRARIES} ${Boost_LIBRARIES})
+ endif()
+
+ # Let's try to use this instead:
diff --git a/avogadro-glibc2.23.patch b/avogadro-glibc2.23.patch
new file mode 100644
index 00000000000..44506dc88d2
--- /dev/null
+++ b/avogadro-glibc2.23.patch
@@ -0,0 +1,18 @@
+--- avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c.orig 2016-06-16 06:36:58.888214167 +0000
++++ avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c 2016-06-16 06:37:19.091459100 +0000
+@@ -67,13 +67,13 @@
+ }
+ case 2 : {
+ //o->v = dpolynomial[m+l];
+- char *d = (signbit(m) == 1 ? "-" : "+");
++ char *d = (signbit(m*1.0) == 1 ? "-" : "+");
+ snprintf(o->name, sizeof(o->name), "%dd%d%s",n,abs(m),d);
+ break;
+ }
+ default : {
+ char t = 'f' - 3 + l;
+- char *d = (signbit(m) == 1 ? "-" : "+");
++ char *d = (signbit(m*1.0) == 1 ? "-" : "+");
+ snprintf(o->name, sizeof(o->name), "%d%c%d%s",n,t,abs(m),d);
+ }
+ }
diff --git a/boost153.patch b/boost153.patch
new file mode 100644
index 00000000000..fd8685974c2
--- /dev/null
+++ b/boost153.patch
@@ -0,0 +1,60 @@
+--- avogadro-1.1.0/libavogadro/src/pythonengine_p.h~ 2013-03-29 12:46:16.306165881 +0000
++++ avogadro-1.1.0/libavogadro/src/pythonengine_p.h 2013-03-29 12:45:43.123089622 +0000
+@@ -27,7 +27,9 @@
+
+ #include <avogadro/global.h>
+ #include <avogadro/engine.h>
++#ifndef Q_MOC_RUN
+ #include <boost/python.hpp>
++#endif
+
+ namespace Avogadro {
+
+--- avogadro-1.1.0/libavogadro/src/pythonextension_p.h~ 2013-03-29 12:46:32.156043085 +0000
++++ avogadro-1.1.0/libavogadro/src/pythonextension_p.h 2013-03-29 12:47:07.265771087 +0000
+@@ -29,7 +29,9 @@
+ #include <avogadro/extension.h>
+ #include <avogadro/primitive.h>
+ #include <avogadro/glwidget.h>
++#ifndef Q_MOC_RUN
+ #include <boost/python.hpp>
++#endif
+
+ #include <QWidget>
+ #include <QList>
+--- avogadro-1.1.0/libavogadro/src/pythontool_p.h~ 2013-03-29 12:47:33.335569185 +0000
++++ avogadro-1.1.0/libavogadro/src/pythontool_p.h 2013-03-29 12:47:50.732101147 +0000
+@@ -27,7 +27,9 @@
+
+ #include <avogadro/global.h>
+ #include <avogadro/tool.h>
++#ifndef Q_MOC_RUN
+ #include <boost/python.hpp>
++#endif
+
+ #include <QObject>
+ #include <QAction>
+--- avogadro-1.1.0/libavogadro/src/pythoninterpreter.h~ 2013-03-29 12:50:46.550738652 +0000
++++ avogadro-1.1.0/libavogadro/src/pythoninterpreter.h 2013-03-29 12:51:00.853961341 +0000
+@@ -26,7 +26,9 @@
+ #define PYTHONINTERPRETER_H
+
+ #include <avogadro/global.h>
++#ifndef Q_MOC_RUN
+ #include <boost/python.hpp>
++#endif
+ #include <avogadro/primitive.h>
+ #include <QString>
+
+--- avogadro-1.1.0/libavogadro/src/pythonscript.h~ 2013-03-29 12:52:00.723488935 +0000
++++ avogadro-1.1.0/libavogadro/src/pythonscript.h 2013-03-29 12:52:11.676745364 +0000
+@@ -27,7 +27,9 @@
+ #define PYTHONSCRIPT_H
+
+ #include <avogadro/global.h>
++#ifndef Q_MOC_RUN
+ #include <boost/python.hpp>
++#endif
+
+ #include "pythonerror.h"
+