diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2014-05-07 12:05:55 +0000 |
---|---|---|
committer | Eivind Uggedal <eivind@uggedal.com> | 2014-05-07 12:06:16 +0000 |
commit | c4eb3bed53bb58376f314489840b349eb589e3ec (patch) | |
tree | 68611f44743fc56b28aa6bccbe30d5118d1d24fc | |
parent | 36ccefdc9ad5f1e8558201c3ca2eaa0a1bf48d42 (diff) | |
download | aports-c4eb3bed53bb58376f314489840b349eb589e3ec.tar.bz2 aports-c4eb3bed53bb58376f314489840b349eb589e3ec.tar.xz |
testing/nimrod: new aport
-rw-r--r-- | testing/nimrod/APKBUILD | 65 | ||||
-rw-r--r-- | testing/nimrod/no-posix-spawn-usevfork.patch | 27 | ||||
-rw-r--r-- | testing/nimrod/prefix-install.patch | 38 |
3 files changed, 130 insertions, 0 deletions
diff --git a/testing/nimrod/APKBUILD b/testing/nimrod/APKBUILD new file mode 100644 index 0000000000..d11d332d41 --- /dev/null +++ b/testing/nimrod/APKBUILD @@ -0,0 +1,65 @@ +# Maintainer: Eivind Uggedal <eivind@uggedal.com> +pkgname=nimrod +pkgver=0.9.4 +pkgrel=0 +pkgdesc="Statically typed, imperative programming language" +url="http://nimrod-lang.org" +arch="all" +license="MIT" +depends="" +depends_dev="" +makedepends="zlib-dev" +install="" +subpackages="$pkgname-doc" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/Araq/Nimrod/archive/v$pkgver.tar.gz + $pkgname-csources-$pkgver.tar.gz::https://github.com/nimrod-code/csources/archive/v$pkgver.tar.gz + no-posix-spawn-usevfork.patch + prefix-install.patch + " + +_builddir="$srcdir/Nimrod-$pkgver" +_csources="$srcdir/csources-$pkgver" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + + find $_csources -name \*_posix.c | + xargs sed -i -e '/fmtmsg.h/d' + find $_csources -name \*_osproc.c | + xargs sed -i -e 's/POSIX_SPAWN_USEVFORK | //' +} + +build() { + cd "$_builddir" + + ( cd $_csources && sh build.sh ) || return 1 + mv $_csources/bin/nimrod bin/nimrod || return 1 + + ./bin/nimrod c koch || return 1 + ./koch boot -d:release +} + +package() { + cd "$_builddir" + + ./koch install "$pkgdir" +} + +md5sums="3093b7c52ccbc1f1da30b016c17f3daa nimrod-0.9.4.tar.gz +55c98a8ad0a0d3bf99b39ba6f51311fb nimrod-csources-0.9.4.tar.gz +39c10f3c58de5c0e673b63c1c6d68cfe no-posix-spawn-usevfork.patch +dc7532c75b502e4416f0d4a5ff45462d prefix-install.patch" +sha256sums="5439aed82272ce8247929c34f806306f2f6d747805cb3754c39e688533ecea28 nimrod-0.9.4.tar.gz +e0b1a2d36e05dfea29948a76bdb052de183dd9bd99a8fecf0fce9ddad00476c4 nimrod-csources-0.9.4.tar.gz +8701cdcead5a2d5bb4e70fcf92f8ef2937e00d4b5cd77c6e9a4b538847ea4668 no-posix-spawn-usevfork.patch +b9cc03e794765b5fefc4733e3b1b5c3e9df3324f4656a3fef3215180a609bde4 prefix-install.patch" +sha512sums="2834fbb1452da6b31a8f86e9af5c12bec877f47d5f01626975c1b849b350021c838bcd86132307c1159c7e285172e85b7d670fb5b4ce6fdc5d0e8f2499d6e4e6 nimrod-0.9.4.tar.gz +6b9da8df83069ac778ba94ce14ab4b72e66ae7b5afe077f40ed71923b5af2c5121490d70cf6a3a7975f1249f4e0db748d3cd86aead71afde96a4619fadc3aea4 nimrod-csources-0.9.4.tar.gz +642455585a53d8d5666c8cbff437890699fda4a5f8ce9f3d9d8a6d3b7a712abad203a1787d7c7b48283f146cacbbafd521e6ba430b0e2bf550cd1ada0f21b661 no-posix-spawn-usevfork.patch +d3f478218edb38d664d3e035b4595f4a4e2b384bf085aac891f9438ee133039f26e4ef5f00ee54e48a583c35b265b97b3ebc759cefdab1ec79eb92e364441aa6 prefix-install.patch" diff --git a/testing/nimrod/no-posix-spawn-usevfork.patch b/testing/nimrod/no-posix-spawn-usevfork.patch new file mode 100644 index 0000000000..ebd820ba3d --- /dev/null +++ b/testing/nimrod/no-posix-spawn-usevfork.patch @@ -0,0 +1,27 @@ +diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim +index e206447cc57a..302263f724e8 100644 +--- a/lib/posix/posix.nim ++++ b/lib/posix/posix.nim +@@ -846,7 +846,7 @@ var + FE_UPWARD* {.importc, header: "<fenv.h>".}: cint + FE_DFL_ENV* {.importc, header: "<fenv.h>".}: cint + +-when not defined(haiku): ++when false: + var + MM_HARD* {.importc, header: "<fmtmsg.h>".}: cint + ## Source of the condition is hardware. +diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim +index 6e250f9d547a..bc21f963e73f 100644 +--- a/lib/pure/osproc.nim ++++ b/lib/pure/osproc.nim +@@ -722,8 +722,7 @@ elif not defined(useNimRtl): + chck posix_spawnattr_setsigmask(attr, mask) + chck posix_spawnattr_setpgroup(attr, 0'i32) + +- chck posix_spawnattr_setflags(attr, POSIX_SPAWN_USEVFORK or +- POSIX_SPAWN_SETSIGMASK or ++ chck posix_spawnattr_setflags(attr, POSIX_SPAWN_SETSIGMASK or + POSIX_SPAWN_SETPGROUP) + + if not data.optionPoParentStreams: diff --git a/testing/nimrod/prefix-install.patch b/testing/nimrod/prefix-install.patch new file mode 100644 index 0000000000..b4581ffb5b --- /dev/null +++ b/testing/nimrod/prefix-install.patch @@ -0,0 +1,38 @@ +diff --git a/tools/niminst/install.tmpl b/tools/niminst/install.tmpl +index 437e13dfb5e9..786746b4f126 100644 +--- a/tools/niminst/install.tmpl ++++ b/tools/niminst/install.tmpl +@@ -28,28 +28,12 @@ if [ $# -eq 1 ] ; then + echo "sh deinstall.sh DIR" + exit 1 + ;; +- "/usr/bin") +- bindir=/usr/bin +- configdir=/etc +- libdir=/usr/lib/?proj +- docdir=/usr/share/?proj/doc +- datadir=/usr/share/?proj/data +- ;; +- "/usr/local/bin") +- bindir=/usr/local/bin +- configdir=/etc +- libdir=/usr/local/lib/?proj +- docdir=/usr/local/share/?proj/doc +- datadir=/usr/local/share/?proj/data +- ;; + *) +- bindir="$1/?proj/bin" +- configdir="$1/?proj/config" +- libdir="$1/?proj/lib" +- docdir="$1/?proj/doc" +- datadir="$1/?proj/data" +- +- mkdir -p $1/?proj ++ bindir="$1"/usr/bin ++ configdir="$1"/etc ++ libdir="$1"/usr/lib/?proj ++ docdir="$1"/usr/share/doc/?proj ++ datadir="$1"/usr/share/?proj/data + mkdir -p $bindir + mkdir -p $configdir + ;; |