aboutsummaryrefslogtreecommitdiffstats
path: root/community/clingo/APKBUILD
blob: e8814339de961a30e00e5615059e3077856aad11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=clingo
pkgver=5.4.1
pkgrel=0
pkgdesc="grounder and solver for logic programs"
url="https://potassco.org/clingo/"
arch="all"
license="MIT"
depends="!clasp" # both provide /usr/bin/clasp
makedepends="python3-dev cmake"
subpackages="$pkgname-dev py3-$pkgname:py"
options="!check"
source="https://github.com/potassco/clingo/archive/v$pkgver/clingo-$pkgver.tar.gz"
replaces="gringo" # backwards compatibility

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DCLINGO_REQUIRE_PYTHON=ON \
		-DCLINGO_BUILD_PY_SHARED=ON \
		-DPYCLINGO_USER_INSTALL=OFF \
		-DCLINGO_REQUIRE_LUA=OFF
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

py() {
	pkgdesc="Python bindings for clingo"
	depends="python3"

	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="85954ef28406a2bc8b54bd46cce6dba24c00541e1fde55779b898373bc96c08ca19cb53d909337772621e79e198b68d10753f32a9f709ac681723a370f284f33  clingo-5.4.1.tar.gz"