aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-01-05 14:53:28 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-01-05 14:54:04 +0100
commitc3f8048d04d82379a19f10760fe2801c3a0669ba (patch)
tree5440221aaf912b714d335d7f979a419605648577
parentba01dda3b383b59969819d20506faa39f648f34a (diff)
downloadaports-c3f8048d04d82379a19f10760fe2801c3a0669ba.tar.gz
aports-c3f8048d04d82379a19f10760fe2801c3a0669ba.tar.bz2
aports-c3f8048d04d82379a19f10760fe2801c3a0669ba.tar.xz
testing/lua-lcurses: new aport
https://lcurses.github.io/lcurses Lua bindings for Curses Resolves #8369 (https://bugs.alpinelinux.org/issues/8369)
-rw-r--r--testing/lua-lcurses/APKBUILD72
-rw-r--r--testing/lua-lcurses/bootstrap.patch17
2 files changed, 89 insertions, 0 deletions
diff --git a/testing/lua-lcurses/APKBUILD b/testing/lua-lcurses/APKBUILD
new file mode 100644
index 0000000000..e69cebdde0
--- /dev/null
+++ b/testing/lua-lcurses/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-lcurses
+_rockname=${pkgname#lua-}
+pkgver=9.0.0
+pkgrel=0
+pkgdesc="Lua bindings for Curses"
+url="https://lcurses.github.io/lcurses"
+arch="all"
+license="MIT"
+depends="lua"
+makedepends="autoconf automake libtool ncurses-dev"
+subpackages=""
+options="!check" # FIXME requires lua-specl that we don't have yet
+source="$pkgname-$pkgver.tar.gz::https://github.com/lcurses/$_rockname/archive/release-v$pkgver.tar.gz
+ bootstrap.patch"
+builddir="$srcdir/$_rockname-release-v$pkgver"
+
+_luaversions="5.1 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+prepare() {
+ default_prepare
+
+ cd "$builddir"
+ ./bootstrap --skip-git
+
+ local lver; for lver in $_luaversions; do
+ cp -r "$builddir" "$builddir-$lver"
+ done
+}
+
+build() {
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver"
+
+ cd "$builddir-$lver"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ LUA=lua$lver \
+ LUA_INCLUDE=$(pkg-config --cflags-only-I lua$lver)
+ make
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+ local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_rockname/$pkgver-1"
+
+ cd "$builddir-$lver"
+ make DESTDIR="$subpkgdir" install
+
+ rm -r "$subpkgdir"/usr/share/doc
+
+ mkdir -p "$rockdir"
+ echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
+}
+
+sha512sums="4c6b4cf95f1ec91ac7c990c102c7e25716bb8083a25cc03812df04466dff4717d46fcabebdc37abc2596245ef3b072821294368d8a060db72f3c7922938c8371 lua-lcurses-9.0.0.tar.gz
+b9d861ba7aa66d16a92bc3f5086daecfc26d150e7aa787ffbf13cf0bd09eba00e602c509010d4942a25f186857abbbe85ae76f7bae5f1dc7fb43d376e0656cc0 bootstrap.patch"
diff --git a/testing/lua-lcurses/bootstrap.patch b/testing/lua-lcurses/bootstrap.patch
new file mode 100644
index 0000000000..62cbd87650
--- /dev/null
+++ b/testing/lua-lcurses/bootstrap.patch
@@ -0,0 +1,17 @@
+Don't require dependencies for running tests and generating documentation.
+
+--- a/bootstrap.conf
++++ b/bootstrap.conf
+@@ -13,11 +13,7 @@
+ # List of programs, minimum versions, and download urls required to
+ # bootstrap, maintain and release this project.
+
+-buildreq='
+- git - http://git-scm.com
+- ldoc 1.4.2 http://rocks.moonscript.org/manifests/steved/ldoc-1.4.2-1.rockspec
+- specl 14.1.0 http://rocks.moonscript.org/manifests/gvvaughan/specl-14.1.0-1.rockspec
+-'
++buildreq=''
+
+ # List of slingshot files to link into stdlib tree before autotooling.
+ slingshot_files='