aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/lua-bit32/APKBUILD32
-rw-r--r--main/lua-bit32/Makefile11
2 files changed, 23 insertions, 20 deletions
diff --git a/main/lua-bit32/APKBUILD b/main/lua-bit32/APKBUILD
index db1481a273..be43f84879 100644
--- a/main/lua-bit32/APKBUILD
+++ b/main/lua-bit32/APKBUILD
@@ -7,29 +7,24 @@ url="https://github.com/keplerproject/lua-compat-5.2"
arch="all"
options="!check"
license="MIT"
-source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/lua-compat-5.2/archive/bitlib-$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/lua-compat-5.2/archive/bitlib-$pkgver.tar.gz
+ Makefile
+ "
builddir="$srcdir/lua-compat-5.2-bitlib-$pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
- makedepends="$makedepends lua$_v-dev luarocks$_v"
+ makedepends="$makedepends lua$_v-dev"
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
+ cd "$_builddir"
+ for _i in $_luaversions; do
+ msg "build for Lua $_i"
+ make -f "$srcdir"/Makefile LUAVER=$_i
+ done
}
package() {
@@ -41,14 +36,11 @@ _subpackage() {
pkgdesc="$pkgdesc (for Lua $lver)"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
- local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/bit32/$pkgver-1"
cd "$builddir"
- install -D -m 755 build/lib/lua/$lver/bit32.so \
+ install -D -m 755 $lver/bit32.so \
"$subpkgdir"/usr/lib/lua/$lver/bit32.so
-
- mkdir -p "$rockdir"
- echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
-sha512sums="234807e201197bc27720864a328f5b63a9fe8bf88bf1fb64cd178532c0745a330b23455fcff0e50d365034f3e43af3c835de7f10a685275da66a7a1ca873e90a lua-bit32-5.3.0.tar.gz"
+sha512sums="234807e201197bc27720864a328f5b63a9fe8bf88bf1fb64cd178532c0745a330b23455fcff0e50d365034f3e43af3c835de7f10a685275da66a7a1ca873e90a lua-bit32-5.3.0.tar.gz
+077dd4b397a9e4eb04ac131ceeef148b5f0790970398d69823f1bad485dcb3ab57126fc7b99428c7ec8255dc6b4d4aeee5a88ddf6a7dd9a767886e2fb357265e Makefile"
diff --git a/main/lua-bit32/Makefile b/main/lua-bit32/Makefile
new file mode 100644
index 0000000000..8450f9f482
--- /dev/null
+++ b/main/lua-bit32/Makefile
@@ -0,0 +1,11 @@
+
+
+LUAVER = 5.1
+
+LUAPC := lua$(LUAVER)
+LUA_CFLAGS := $(shell pkg-config --cflags $(LUAPC))
+
+$(LUAVER)/bit32.so: lbitlib.c
+ mkdir -p $(LUAVER)
+ $(CC) -I c-api $(CFLAGS) $(LUA_CFLAGS) -shared -fPIC $(LDFLAGS) -o $@ $<
+