summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Arthaud2018-12-10 20:52:28 -0800
committerMaxime Arthaud2018-12-10 20:52:28 -0800
commit8e22c82f43e71ff9899e59d68a5f38447ddcdee9 (patch)
treef0f7c4d8bca8400213ad264b3c5a3cda0d52fdcc
downloadaur-8e22c82f43e71ff9899e59d68a5f38447ddcdee9.tar.gz
Import PKGBUILD from apron-ppl-svn
-rw-r--r--.SRCINFO22
-rw-r--r--0001-Remove-strdup-implementation.patch20
-rw-r--r--0002-Fix-invalid-operands-to-binary-expression.patch16
-rw-r--r--PKGBUILD48
4 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3b8d1e632502
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = apron
+ pkgdesc = APRON numerical abstract domain library
+ pkgver = 0.9.10
+ pkgrel = 1
+ url = http://apron.cri.ensmp.fr/library/
+ arch = i686
+ arch = x86_64
+ license = LGPL2
+ makedepends = sed
+ depends = gmp>=5
+ depends = mpfr>=3
+ depends = ppl
+ provides = apron
+ source = http://apron.cri.ensmp.fr/library/apron-0.9.10.tgz
+ source = 0001-Remove-strdup-implementation.patch
+ source = 0002-Fix-invalid-operands-to-binary-expression.patch
+ sha256sums = b108de2f4a8c4ecac1ff76a6d282946fd3bf1466a126cf5344723955f305ec8e
+ sha256sums = fe8d85b1f2db6dad149209324b32a8e81deab6868147e71bcfe4c8df57303fc9
+ sha256sums = f624c2152ac6c621f92d1cbb58a891701e938d44dc0fde6a1b80b4a7d3c8ba43
+
+pkgname = apron
+
diff --git a/0001-Remove-strdup-implementation.patch b/0001-Remove-strdup-implementation.patch
new file mode 100644
index 000000000000..f17354a6a047
--- /dev/null
+++ b/0001-Remove-strdup-implementation.patch
@@ -0,0 +1,20 @@
+--- apron/ap_config.h 2009-09-11 11:00:27.000000000 -0700
++++ apron/ap_config.h 2018-12-10 20:40:51.914905968 -0800
+@@ -23,17 +23,6 @@
+ static const bool true = 1;
+ #endif
+
+-#if !(defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __APPLE__ || defined __CYGWIN__)
+-
+-static inline char* strdup(const char* s){
+- char* s2;
+-
+- s2 = malloc(strlen(s)+1);
+- strcpy(s2,s);
+- return s2;
+-}
+-#endif
+-
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/0002-Fix-invalid-operands-to-binary-expression.patch b/0002-Fix-invalid-operands-to-binary-expression.patch
new file mode 100644
index 000000000000..10478f88e7ac
--- /dev/null
+++ b/0002-Fix-invalid-operands-to-binary-expression.patch
@@ -0,0 +1,16 @@
+--- ppl/ppl_user.cc
++++ ppl/ppl_user.cc
+@@ -320,7 +320,12 @@
+ exact = false;
+ }
+ /* singleton */
+- else r.insert(Constraint(Variable(i)==temp));
++ else {
++ /* integerness check */
++ mpz_class temp2 = mpz_class(temp);
++ if (temp==temp2) r.insert(Constraint(Variable(i)==temp2));
++ else exact = false;
++ }
+ }
+ return exact;
+ }
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fc9f2f177bda
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Maxime Arthaud <maxime@arthaud.me>
+# Author: Vivien Maisonneuve
+# Category: science
+
+pkgname='apron'
+pkgver=0.9.10
+pkgrel=1
+pkgdesc='APRON numerical abstract domain library'
+arch=('i686' 'x86_64')
+url='http://apron.cri.ensmp.fr/library/'
+license=('LGPL2')
+provides=('apron')
+depends=('gmp>=5' 'mpfr>=3' 'ppl')
+makedepends=('sed')
+source=("http://apron.cri.ensmp.fr/library/apron-$pkgver.tgz"
+ '0001-Remove-strdup-implementation.patch'
+ '0002-Fix-invalid-operands-to-binary-expression.patch')
+sha256sums=('b108de2f4a8c4ecac1ff76a6d282946fd3bf1466a126cf5344723955f305ec8e'
+ 'fe8d85b1f2db6dad149209324b32a8e81deab6868147e71bcfe4c8df57303fc9'
+ 'f624c2152ac6c621f92d1cbb58a891701e938d44dc0fde6a1b80b4a7d3c8ba43')
+
+prepare() {
+ cd "$srcdir/apron-$pkgver"
+ sed \
+ -e 's|^APRON_PREFIX *=.*$|APRON_PREFIX=/usr|' \
+ -e 's|^HAS_OCAML *=.*$|HAS_OCAML=|' \
+ -e 's|^HAS_OCAMLOPT *=.*$|HAS_OCAMLOPT=|' \
+ -e 's|^OCAMLFIND *=.*$|OCAMLFIND=|' \
+ -e 's|^# HAS_PPL *=.*$|HAS_PPL=1|' \
+ Makefile.config.model > Makefile.config
+ patch -p0 < ../0001-Remove-strdup-implementation.patch
+ patch -p0 < ../0002-Fix-invalid-operands-to-binary-expression.patch
+}
+
+build() {
+ cd "$srcdir/apron-$pkgver"
+ make -j1
+}
+
+package() {
+ cd "$srcdir/apron-$pkgver"
+ make APRON_PREFIX="$pkgdir"/usr install
+ rm "$pkgdir"/usr/bin/*test* # remove test binaries
+ # remove ocaml stuff
+ rm "$pkgdir"/usr/lib/*.ml
+ rm "$pkgdir"/usr/lib/*.mli
+ rm "$pkgdir"/usr/lib/*.idl
+}