aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-14 22:08:57 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-14 22:09:46 +0200
commit3da808516c9f9f0916a8e7b623e789ec76d11073 (patch)
treeafb3d34551775ad4100eb7215d4e555221a002d2 /testing
parentec4a015b1a6c7b1ae8de18ab073a869326c0aeb5 (diff)
downloadaports-3da808516c9f9f0916a8e7b623e789ec76d11073.tar.bz2
aports-3da808516c9f9f0916a8e7b623e789ec76d11073.tar.xz
testing/lua-bit32: new aport
https://github.com/keplerproject/lua-compat-5.2 Lua 5.2 bit manipulation library
Diffstat (limited to 'testing')
-rw-r--r--testing/lua-bit32/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/lua-bit32/APKBUILD b/testing/lua-bit32/APKBUILD
new file mode 100644
index 0000000000..9178ac54cd
--- /dev/null
+++ b/testing/lua-bit32/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-bit32
+_pkgname=lua-compat-5.2
+pkgver=5.3.0
+pkgrel=0
+pkgdesc="Lua 5.2 bit manipulation library"
+url="https://github.com/keplerproject/lua-compat-5.2"
+arch="all"
+license="MIT"
+makedepends=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/bitlib-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-bitlib-$pkgver"
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev luarocks$_v"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+build() {
+ cd "$builddir"
+
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver..."
+
+ luarocks-$lver \
+ CC="$CC" \
+ CFLAGS="$CFLAGS -fPIC" \
+ LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \
+ LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \
+ make --tree=./build rockspecs/bit32-$pkgver-1.rockspec
+ 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"
+
+ cd "$builddir"
+ install -D -m 755 build/lib/lua/$lver/bit32.so \
+ "$subpkgdir"/usr/lib/lua/$lver/bit32.so
+}
+
+sha512sums="234807e201197bc27720864a328f5b63a9fe8bf88bf1fb64cd178532c0745a330b23455fcff0e50d365034f3e43af3c835de7f10a685275da66a7a1ca873e90a lua-bit32-5.3.0.tar.gz"