added community/clingo

This commit is contained in:
Kevin Mihelich 2018-02-14 02:01:54 +00:00
parent eccbca17f5
commit d031c96c53

48
community/clingo/PKGBUILD Normal file
View file

@ -0,0 +1,48 @@
# $Id$
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Vincent Bernardoff <vb@luminar.eu.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove -fno-plt CFLAG for v5 (old llvm)
pkgname=clingo
pkgver=5.2.2
pkgrel=5
pkgdesc='Grounding tools for (disjunctive) logic programs'
arch=('x86_64')
url='https://potassco.org/'
license=('GPL3')
depends=('lua' 'python')
makedepends=('clang' 'cmake' 'git' 'ninja' 're2c')
conflicts=('clasp')
source=("git+https://github.com/potassco/clingo#tag=v$pkgver")
md5sums=('SKIP')
prepare() {
sed '/#include <xlocale.h>/d' -i clingo/clasp/libpotassco/src/string_convert.cpp
}
build() {
mkdir -p build
cd build
[[ $CARCH == "arm" ]] && CFLAGS=${CFLAGS/-fno-plt/} && CXXFLAGS=${CXXFLAGS/-fno-plt/}
cmake "../$pkgname" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCLINGO_REQUIRE_PYTHON=ON \
-DCLINGO_BUILD_PY_SHARED=ON \
-DPYCLINGO_USER_INSTALL=OFF \
-DCLINGO_REQUIRE_LUA=ON \
-DCLINGO_BUILD_LUA_SHARED=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-G Ninja
ninja
}
package() {
DESTDIR="$pkgdir" ninja -C build install
}
# vim: ts=2 sw=2 et: