1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: Damir Perisa <damir.perisa@bluewin.ch>
6 pkgname=(openbabel python-openbabel)
9 pkgdesc='A library designed to interconvert between many file formats used in molecular modeling and computational chemistry'
11 url='https://openbabel.org/wiki/Main_Page'
13 makedepends=(cmake eigen wxwidgets-gtk3 boost python swig maeparser rapidjson coordgen)
14 source=(https://github.com/openbabel/openbabel/releases/download/openbabel-${pkgver//./-}/openbabel-$pkgver-source.tar.bz2
15 https://github.com/openbabel/openbabel/commit/c0570bfe.patch)
16 sha256sums=('a6ec8381d59ea32a4b241c8b1fbd799acb52be94ab64cdbd72506fb4e2270e68'
17 '70e16fe1ae60806ef1a022e6b768e9ebd0b1d832d052d4ceea30cbb76354ca7c')
20 patch -d openbabel-$pkgver -p1 < c0570bfe.patch # Fix build with GCC 12
24 cmake -B build -S openbabel-$pkgver \
25 -DCMAKE_INSTALL_PREFIX=/usr \
30 # To split python bindings
31 sed -i '/scripts.cmake_install.cmake/d' build/cmake_install.cmake
35 depends=(libxml2 cairo coordgen)
36 optdepends=('wxwidgets-gtk3: GUI interface')
38 DESTDIR="$pkgdir" cmake --install build
41 package_python-openbabel() {
42 depends=(python openbabel)
44 DESTDIR="$pkgdir" cmake --install build/scripts