diff options
author | Xuanrui Qi | 2019-04-27 00:40:09 -0400 |
---|---|---|
committer | Xuanrui Qi | 2019-04-27 00:40:09 -0400 |
commit | 785d620c9236ebb6ffb01ae04a6cf758b8ff721a (patch) | |
tree | 37f8c50d2f2715e823b3998ca70bf57196e1af79 | |
download | aur-785d620c9236ebb6ffb01ae04a6cf758b8ff721a.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | Makefile-runtime.patch | 23 | ||||
-rw-r--r-- | Makefile.patch | 37 | ||||
-rw-r--r-- | PKGBUILD | 48 |
4 files changed, 126 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bc11a51869f3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = compcert + pkgdesc = The formally verified C compiler + pkgver = 3.5 + pkgrel = 1 + url = http://compcert.inria.fr/download.html + arch = x86_64 + license = custom:INRIA Non-Commercial License Agreement + makedepends = coq>=8.6.1 + makedepends = ocaml>=4.0.2 + makedepends = ocaml-menhir>=20161201 + makedepends = ocaml-menhir<=20181113 + depends = gcc + depends = glibc + source = http://compcert.inria.fr/release/compcert-3.5.tgz + sha1sums = 375705b2a02062d3af0906cb53d9a08a25382097 + +pkgname = compcert + diff --git a/Makefile-runtime.patch b/Makefile-runtime.patch new file mode 100644 index 000000000000..77aa1f4d0bbd --- /dev/null +++ b/Makefile-runtime.patch @@ -0,0 +1,23 @@ +--- runtime/Makefile 2019-04-27 00:16:12.285242632 -0400 ++++ runtime/Makefile.fixed 2019-04-27 00:17:03.020157520 -0400 +@@ -70,16 +70,16 @@ + + ifeq ($(strip $(HAS_RUNTIME_LIB)),true) + install:: +- install -d $(LIBDIR) +- install -m 0644 $(LIB) $(LIBDIR) ++ install -d $(DESTDIR)/$(LIBDIR) ++ install -m 0644 $(LIB) $(DESTDIR)/$(LIBDIR) + else + install:: + endif + + ifeq ($(strip $(HAS_STANDARD_HEADERS)),true) + install:: +- install -d $(LIBDIR)/include +- install -m 0644 $(INCLUDES) $(LIBDIR)/include ++ install -d $(DESTDIR)/$(LIBDIR)/include ++ install -m 0644 $(INCLUDES) $(DESTDIR)/$(LIBDIR)/include + else + install:: + endif diff --git a/Makefile.patch b/Makefile.patch new file mode 100644 index 000000000000..0a61b414c764 --- /dev/null +++ b/Makefile.patch @@ -0,0 +1,37 @@ +--- Makefile 2019-03-28 19:51:22.546637034 -0400 ++++ Makefile.fixed 2019-04-27 00:14:54.922847839 -0400 +@@ -238,23 +238,23 @@ + @$(COQDEP) $^ > .depend + + install: +- install -d $(BINDIR) +- install -m 0755 ./ccomp $(BINDIR) +- install -d $(SHAREDIR) +- install -m 0644 ./compcert.ini $(SHAREDIR) +- install -d $(MANDIR)/man1 +- install -m 0644 ./doc/ccomp.1 $(MANDIR)/man1 ++ install -d $(DESTDIR)/$(BINDIR) ++ install -m 0755 ./ccomp $(DESTDIR)/$(BINDIR) ++ install -d $(DESTDIR)/$(SHAREDIR) ++ install -m 0644 ./compcert.ini $(DESTDIR)/$(SHAREDIR) ++ install -d $(DESTDIR)/$(MANDIR)/man1 ++ install -m 0644 ./doc/ccomp.1 $(DESTDIR)/$(MANDIR)/man1 + $(MAKE) -C runtime install + ifeq ($(CLIGHTGEN),true) +- install -m 0755 ./clightgen $(BINDIR) ++ install -m 0755 ./clightgen $(DESTDIR)/$(BINDIR) + endif + ifeq ($(INSTALL_COQDEV),true) +- install -d $(COQDEVDIR) ++ install -d $(DESTDIR)/$(COQDEVDIR) + for d in $(DIRS); do \ +- install -d $(COQDEVDIR)/$$d && \ +- install -m 0644 $$d/*.vo $(COQDEVDIR)/$$d/; \ ++ install -d $(DESTDIR)/$(COQDEVDIR)/$$d && \ ++ install -m 0644 $$d/*.vo $(DESTDIR)/$(COQDEVDIR)/$$d/; \ + done +- install -m 0644 ./VERSION $(COQDEVDIR) ++ install -m 0644 ./VERSION $(DESTDIR)/$(COQDEVDIR) + @(echo "To use, pass the following to coq_makefile or add the following to _CoqProject:"; echo "-R $(COQDEVDIR) compcert") > $(COQDEVDIR)/README + endif + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4cf5e4f3b584 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Xuanrui Qi <me@xuanruiqi.com> +pkgname=compcert +_dirname=CompCert +pkgver=3.5 +pkgrel=1 +pkgdesc="The formally verified C compiler" +arch=('x86_64') +url="http://compcert.inria.fr/download.html" +license=('custom:INRIA Non-Commercial License Agreement') +depends=('gcc') +makedepends=('coq>=8.6.1' 'ocaml>=4.0.2' + 'ocaml-menhir>=20161201' 'ocaml-menhir<=20181113' + 'ocaml-findlib' # See: https://github.com/AbsInt/CompCert/issues/281 + ) +source=("http://compcert.inria.fr/release/$pkgname-$pkgver.tgz" + "Makefile.patch" + "Makefile-runtime.patch") +sha1sums=('375705b2a02062d3af0906cb53d9a08a25382097' + '12abd465a238501777573391c551deb1637a9384' + '810e5efc65179168764221d4d7fd83b8340f61bb') + +prepare() { + cd $srcdir/$_dirname-$pkgver + + # Fix missing $DESTDIR references in Makefile + # Until upstream fixes this, we're forced to use this patch + patch -Np0 -i ../Makefile.patch + patch -Np0 -i ../Makefile-runtime.patch +} + +build() { + cd $srcdir/$_dirname-$pkgver + + # Some useful options: + # -clightgen: builds and installs the clightgen tool + # -install-coqdev: also installs the Coq development, implied by -clightgen, useful + # if you will use tools such as Princeton VST) + ./configure -prefix /usr $CARCH-linux + + make all +} + +package() { + cd $srcdir/$_dirname-$pkgver + make DESTDIR=$pkgdir install + + install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} |