diff options
author | Eivind Uggedal <eivind@uggedal.com> | 2014-05-08 08:25:14 +0000 |
---|---|---|
committer | Eivind Uggedal <eivind@uggedal.com> | 2014-05-08 08:40:11 +0000 |
commit | 8bbff0c2b6ddeabb636ba609325e7f9b681460d0 (patch) | |
tree | cda27b8c1b14fe3635d742399402540b17c3487f /testing/nimrod | |
parent | 3f51528a09596b8234e0521f766b309eec9d6776 (diff) | |
download | aports-8bbff0c2b6ddeabb636ba609325e7f9b681460d0.tar.bz2 aports-8bbff0c2b6ddeabb636ba609325e7f9b681460d0.tar.xz |
testing/nimrod: readline in interactive mode
The nimrod interactive mode (nimrod i) loads readline.so
at run time.
The various patches for compilation on musl was also reworked.
Diffstat (limited to 'testing/nimrod')
-rw-r--r-- | testing/nimrod/APKBUILD | 22 | ||||
-rw-r--r-- | testing/nimrod/no-fmtmsg.patch | 22 | ||||
-rw-r--r-- | testing/nimrod/no-posix-spawn-usevfork.patch | 32 |
3 files changed, 43 insertions, 33 deletions
diff --git a/testing/nimrod/APKBUILD b/testing/nimrod/APKBUILD index d11d332d41..ec0e76af2e 100644 --- a/testing/nimrod/APKBUILD +++ b/testing/nimrod/APKBUILD @@ -1,12 +1,12 @@ # Maintainer: Eivind Uggedal <eivind@uggedal.com> pkgname=nimrod pkgver=0.9.4 -pkgrel=0 +pkgrel=1 pkgdesc="Statically typed, imperative programming language" url="http://nimrod-lang.org" arch="all" license="MIT" -depends="" +depends="readline" depends_dev="" makedepends="zlib-dev" install="" @@ -15,6 +15,7 @@ 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 + no-fmtmsg.patch prefix-install.patch " @@ -29,10 +30,8 @@ prepare() { 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 | //' + find $_csources -name \*_posix.c | xargs sed -i '/fmtmsg.h/d' + sed -i '$i#define POSIX_SPAWN_USEVFORK 0' $_csources/c_code/nimbase.h } build() { @@ -42,7 +41,7 @@ build() { mv $_csources/bin/nimrod bin/nimrod || return 1 ./bin/nimrod c koch || return 1 - ./koch boot -d:release + ./koch boot -d:release -d:useGnuReadline } package() { @@ -53,13 +52,16 @@ package() { md5sums="3093b7c52ccbc1f1da30b016c17f3daa nimrod-0.9.4.tar.gz 55c98a8ad0a0d3bf99b39ba6f51311fb nimrod-csources-0.9.4.tar.gz -39c10f3c58de5c0e673b63c1c6d68cfe no-posix-spawn-usevfork.patch +db4b13d5b1ba80187792255e9655f2b4 no-posix-spawn-usevfork.patch +4cee2a023d1af4dbf62c19863855ee10 no-fmtmsg.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 +2b2b6912be7950825eedf860d9461b84d19fdcf0ed2dc84ca138c5053cf5520e no-posix-spawn-usevfork.patch +51ac658f3ceff0526680b0325d77d3da87728f28eebb412c8de5b1235e408112 no-fmtmsg.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 +0a10e77fc224b791455929310bb2746c760b90daaec00a8fb6f0f65ec65b53a37b4297f669370c7f6155218f5ba686138e52e2d408518a55eae8afa0db5eab8c no-posix-spawn-usevfork.patch +47b1d98a1f6a962fd6aa9a3d5d978ca5cd60462bcafb97dc449238c5fab665957bfa64819b7402f707f0497f64d0f1e223f8f6402fe9448c6193b1ab26873118 no-fmtmsg.patch d3f478218edb38d664d3e035b4595f4a4e2b384bf085aac891f9438ee133039f26e4ef5f00ee54e48a583c35b265b97b3ebc759cefdab1ec79eb92e364441aa6 prefix-install.patch" diff --git a/testing/nimrod/no-fmtmsg.patch b/testing/nimrod/no-fmtmsg.patch new file mode 100644 index 0000000000..4d0933d78c --- /dev/null +++ b/testing/nimrod/no-fmtmsg.patch @@ -0,0 +1,22 @@ +diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim +index e206447cc57a..75116246eca8 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 not defined(haiku) and not defined(linux): + var + MM_HARD* {.importc, header: "<fmtmsg.h>".}: cint + ## Source of the condition is hardware. +@@ -1816,7 +1816,7 @@ proc feholdexcept*(a1: ptr Tfenv): cint {.importc, header: "<fenv.h>".} + proc fesetenv*(a1: ptr Tfenv): cint {.importc, header: "<fenv.h>".} + proc feupdateenv*(a1: ptr Tfenv): cint {.importc, header: "<fenv.h>".} + +-when not defined(haiku): ++when not defined(haiku) and not defined(linux): + proc fmtmsg*(a1: int, a2: cstring, a3: cint, + a4, a5, a6: cstring): cint {.importc, header: "<fmtmsg.h>".} + diff --git a/testing/nimrod/no-posix-spawn-usevfork.patch b/testing/nimrod/no-posix-spawn-usevfork.patch index ebd820ba3d..ebb70a632e 100644 --- a/testing/nimrod/no-posix-spawn-usevfork.patch +++ b/testing/nimrod/no-posix-spawn-usevfork.patch @@ -1,27 +1,13 @@ diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim -index e206447cc57a..302263f724e8 100644 +index e206447cc57a..1af768d82a5c 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 +@@ -1737,7 +1737,7 @@ when hasSpawnH: + POSIX_SPAWN_SETSIGDEF* {.importc, header: "<spawn.h>".}: cint + POSIX_SPAWN_SETSIGMASK* {.importc, header: "<spawn.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: +- when defined(linux): ++ when not defined(linux): + # better be safe than sorry; Linux has this flag, macosx doesn't, don't + # know about the other OSes + var POSIX_SPAWN_USEVFORK* {.importc, header: "<spawn.h>".}: cint |