summaryrefslogtreecommitdiff
path: root/community/clingo
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-08-25 10:13:53 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-08-25 10:13:53 +0200
commitf27ce3f0762820b2d81a8557237cc865c24a1124 (patch)
tree02eac7dd0000ce198aa28b7edbd705aee9fc187c /community/clingo
parent4100c00d838f57fa7497947d07f30d6453bdae1a (diff)
downloadpackages-f27ce3f0762820b2d81a8557237cc865c24a1124.tar.xz
community/cringo: fixed building with g++ instead of clang++
Diffstat (limited to 'community/clingo')
-rw-r--r--community/clingo/PKGBUILD15
1 files changed, 15 insertions, 0 deletions
diff --git a/community/clingo/PKGBUILD b/community/clingo/PKGBUILD
new file mode 100644
index 00000000..362b9ad9
--- /dev/null
+++ b/community/clingo/PKGBUILD
@@ -0,0 +1,15 @@
+# clang++ misses some C++ atomic stubs in the C++ library on 32-bit,
+# g++ compiles and links fine
+# also reported upstream: https://github.com/potassco/clingo/issues/57
+
+# cmake
+makedepends=(${makedepends[@]/clang})
+
+# must be patched after cmake has run, hence it is in build
+eval "$(
+ declare -f build | \
+ sed '
+ s/-DCMAKE_CXX_COMPILER=clang++/-DCMAKE_CXX_COMPILER=g++/
+ /^\s*ninja\s*/i sed -i s/clang++/g++/g ${srcdir}/build/rules.ninja
+ '
+)"