diff options
author | Cooper Pierce | 2021-07-10 19:10:46 -0400 |
---|---|---|
committer | Cooper Pierce | 2021-07-10 19:28:51 -0400 |
commit | 65c29b844f456c486c1832dd091d1fbc2babfe8a (patch) | |
tree | 678e6efa4f4b3f10d1de9228a6a607a629622710 | |
download | aur-c0-bin.tar.gz |
Release for r771
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | fno-common.patch | 14 |
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2c780c71d9e2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = c0-bin + pkgdesc = A small safe subset of the C programming language, augmented with contracts + pkgver = 0.771 + pkgrel = 1 + url = http://c0.cs.cmu.edu + arch = x86_64 + arch = i686 + license = MIT + depends = libpng>=1.2 + depends = zlib>=1.2 + depends = gcc>=5.1 + depends = ncurses5-compat-libs>=6.0 + provides = cc0 + source = c0-bin::https://c0.cs.cmu.edu/downloads/aux/cc0-r771.tgz + source = fno-common.patch + md5sums = e03e3c90b07603d899acedfc445faaf4 + md5sums = 41a1d89191c6420779cf05a1f55339ab + +pkgname = c0-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..13ec2f163c92 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Cooper Pierce <cppierce@andrew.cmu.edu> +# Contributor: Derek Brown <derekbro@andrew.cmu.edu> +pkgname=c0-bin +pkgver=0.771 +pkgrel=1 +pkgdesc="A small safe subset of the C programming language, augmented with contracts" +url="http://c0.cs.cmu.edu" +arch=('x86_64' 'i686') +license=('MIT') +depends=('libpng>=1.2' 'zlib>=1.2' 'gcc>=5.1' 'ncurses5-compat-libs>=6.0') +conflicts=('c0' 'c0-git') +provides=('cc0') +source=("$pkgname::https://c0.cs.cmu.edu/downloads/aux/cc0-r771.tgz" "fno-common.patch") +md5sums=('e03e3c90b07603d899acedfc445faaf4' + '41a1d89191c6420779cf05a1f55339ab') + +prepare() { + cd "cc0.r771" + patch --forward --strip=1 --input="${srcdir}/fno-common.patch" +} + +package() { + # Create Installation Folder Structure + mkdir -p ${pkgdir}/usr/lib/c0 + cp -r ${srcdir}/cc0.r771/* ${pkgdir}/usr/lib/c0 + + mkdir -p ${pkgdir}/usr/bin + + bins=('cc0' 'coin' 'codex' 'wrappergen') + for bin in "${bins[@]}"; do + chmod +x ${pkgdir}/usr/lib/c0/bin/${bin}.bin + echo -e "#!/bin/sh\n/usr/lib/c0/bin/${bin}.bin \$@" >> ${pkgdir}/usr/bin/${bin} + chmod +x ${pkgdir}/usr/bin/${bin} + done +} diff --git a/fno-common.patch b/fno-common.patch new file mode 100644 index 000000000000..e152bb495b7e --- /dev/null +++ b/fno-common.patch @@ -0,0 +1,14 @@ +diff '--color=auto' --unified --recursive --text cc0.r771/lib/cc0main.c cc0.r771.new/lib/cc0main.c +--- cc0.r771/lib/cc0main.c 2021-01-12 12:20:49.000000000 -0500 ++++ cc0.r771.new/lib/cc0main.c 2021-07-01 19:56:59.398515215 -0400 +@@ -16,8 +16,8 @@ + char **c0_argv; + + // Defined externally by CC0 +-long map_length; +-const char* source_map[0]; ++extern long map_length; ++extern const char* source_map[0]; + + FILE *really_fopen(const char *filename, const char *mode, + char *error) |