1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
4 pkgname=(avogadrolibs avogadrolibs-qt5)
7 pkgdesc='Libraries that provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas'
9 url='https://www.openchemistry.org/'
11 depends=(molequeue glew spglib hdf5 avogadro-molecules avogadro-crystals)
12 makedepends=(cmake eigen boost python mmtf-cpp libmsym pybind11 vtk qt5-tools qt5-svg genxrdpattern tbb openmpi)
13 optdepends=('avogadrolibs-qt5: For the VTK and Qt plugins')
14 source=(https://github.com/OpenChemistry/avogadrolibs/archive/$pkgver/$pkgname-$pkgver.tar.gz
16 sha256sums=('52817eebfc0cf700e5f6c0c4455b460618ec0dd7cb4ede5d8fabc5a2d73a7816'
17 'a2272c456f1a5dd85bb98fbf5ed9aa5aabaa3fbd8b191bb6d14e6ee57c2789f4')
20 mkdir crystals molecules # Dummy dirs to trick cmake, actually provided by avogadro-molecules and avogadro-crystals
21 patch -d $pkgname-$pkgver -p1 < vtk9.patch # Fix build with VTK 9
25 cmake -B build -S $pkgname-$pkgver \
26 -DCMAKE_INSTALL_PREFIX=/usr \
27 -DENABLE_TRANSLATIONS=ON \
31 -DUSE_SYSTEM_GENXRDPATTERN=ON
35 package_avogadrolibs() {
36 DESTDIR="$pkgdir" cmake --install build
37 rm -r "$pkgdir"/usr/lib/libAvogadroQt* \
38 "$pkgdir"/usr/lib/libAvogadroMoleQueue* \
39 "$pkgdir"/usr/lib/libAvogadroVtk* \
40 "$pkgdir"/usr/include/avogadro/{molequeue,qt*,vtk} \
41 "$pkgdir"/usr/lib/avogadro2/{scripts,staticplugins}
43 install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
45 # Move python module to the correct place
46 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
47 mkdir -p "$pkgdir${site_packages}"
48 mv "$pkgdir"/usr/lib/avogadro "$pkgdir${site_packages}"
51 package_avogadrolibs-qt5() {
52 pkgdesc="Qt 5 modules for Avogadro"
53 depends=(qt5-svg libarchive libmsym avogadrolibs vtk openmpi pugixml fmt tbb libxcursor)
55 DESTDIR="$pkgdir" cmake --install build/avogadro/molequeue
56 DESTDIR="$pkgdir" cmake --install build/avogadro/qtgui
57 DESTDIR="$pkgdir" cmake --install build/avogadro/qtopengl
58 DESTDIR="$pkgdir" cmake --install build/avogadro/qtplugins
59 DESTDIR="$pkgdir" cmake --install build/avogadro/vtk