archrelease: copy trunk to extra-x86_64
[arch-packages.git] / openbabel / trunk / PKGBUILD
blob4cecd7d785678ccf366f1a5a3c5c25dfb420a4cc
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: Damir Perisa <damir.perisa@bluewin.ch>
5 pkgbase=openbabel
6 pkgname=(openbabel python-openbabel)
7 pkgver=3.1.1
8 pkgrel=7
9 pkgdesc='A library designed to interconvert between many file formats used in molecular modeling and computational chemistry'
10 arch=(x86_64)
11 url='https://openbabel.org/wiki/Main_Page'
12 license=(GPL)
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')
19 prepare() {
20   patch -d openbabel-$pkgver -p1 < c0570bfe.patch # Fix build with GCC 12
23 build() {
24   cmake -B build -S openbabel-$pkgver \
25     -DCMAKE_INSTALL_PREFIX=/usr \
26     -DRUN_SWIG=ON \
27     -DPYTHON_BINDINGS=ON
28   cmake --build build
30   # To split python bindings
31   sed -i '/scripts.cmake_install.cmake/d' build/cmake_install.cmake
34 package_openbabel() {
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