aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2020-04-14 15:47:47 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-04-26 19:30:20 +0000
commit17600a4059813601d3b358fa763e62493d473bf7 (patch)
tree7f2787cb8192f55bdbc65566a0c4e2c49fb12de4
parent1aa91a5d0bacefbdc481ec8c405a6d8963a0c385 (diff)
community/lua-lgi: Remove bashisms to enable build
Lua-lgi package was using some illegal bashisms which should prevent building. There is a commit hook, but somehow it was managed to be skipped and thus the package was not properly build any longer. What is even more worry some, is that these changes did not get automatically get caught. For example, when installing lua-lgi and lua5.1, the lua5.1-lgi package is supposed to be installed. By removing the bashisms we can now properly build lua-lgi again. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
-rw-r--r--community/lua-lgi/APKBUILD51
1 files changed, 21 insertions, 30 deletions
diff --git a/community/lua-lgi/APKBUILD b/community/lua-lgi/APKBUILD
index c735ef2be8b..0f06614a09f 100644
--- a/community/lua-lgi/APKBUILD
+++ b/community/lua-lgi/APKBUILD
@@ -2,33 +2,27 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2 5.3"
pkgname=lua-lgi
+_rockname="${pkgname#lua-*}"
pkgver=0.9.2
-pkgrel=1
+pkgrel=2
pkgdesc="Dynamic Lua binding to GObject libraries using GObject-Introspection"
url="https://github.com/pavouk/lgi"
arch="all"
license="MIT"
-depends=""
-depends_dev=""
makedepends="glib-dev gobject-introspection-dev libffi-dev"
-install=""
subpackages="$pkgname-doc"
for _i in $_luaversions; do
makedepends="$makedepends lua$_i-dev"
- subpackages="$subpackages lua$_i-lgi:split_${_i/./_}"
+ subpackages="$subpackages lua$_i-$_rockname:_split"
done
+subpackages="${subpackages} ${pkgname}-doc"
source="lgi-$pkgver.tar.gz::https://github.com/pavouk/lgi/archive/$pkgver.tar.gz"
_sdir="$srcdir"/lgi-$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
+ default_prepare
+
for _i in $_luaversions; do
cp -r "$_sdir" "$srcdir"/build-$_i
done
@@ -38,16 +32,14 @@ build() {
for _i in $_luaversions; do
msg "build for $_i"
make -C "$srcdir"/build-$_i PREFIX=/usr LUA_VERSION=$_i \
- LUA_CFLAGS="$(pkg-config --cflags lua$_i)" \
- || return 1
+ LUA_CFLAGS="$(pkg-config --cflags lua$_i)"
done
}
package() {
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
- make install PREFIX=/usr DESTDIR="$pkgdir" LUA_VERSION=$_i \
- || return 1
+ make install PREFIX=/usr DESTDIR="$pkgdir" LUA_VERSION=$_i
done
cd "$_sdir"
mkdir -p "$pkgdir"/usr/share/doc/lua-lgi
@@ -55,20 +47,19 @@ package() {
}
_split() {
- local d= _ver=$1
- pkgdesc="Lua $_ver binding to GObject libraries using introspection"
- install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
- depends=
- for d in usr/lib/lua usr/share/lua; do
- if [ -d "$pkgdir"/$d/$_ver ]; then
- mkdir -p "$subpkgdir"/$d
- mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
- fi
- done
-}
+ _luaversion="${subpkgname%-${_rockname}}"
+ _luaversion="${_luaversion#lua*}"
+ pkgdesc="Lua ${_luaversion} binding to GObject libraries using introspection"
+ install_if="lua${_luaversion} ${pkgname}=${pkgver}-r${pkgrel}"
+ depends="${depends} lua${_luaversion}"
-for _i in $_luaversions; do
- eval "split_${_i/./_}() { _split $_i; }"
-done
+ mkdir -p "${subpkgdir}/usr/lib/lua/"
+ mv "${pkgdir}/usr/lib/lua/${_luaversion}" \
+ "${subpkgdir}/usr/lib/lua/"
+
+ mkdir -p "${subpkgdir}/usr/share/lua/"
+ mv "${pkgdir}/usr/share/lua/${_luaversion}" \
+ "${subpkgdir}/usr/share/lua/"
+}
sha512sums="755a96b78530f42da6d4e2664f8e37cb07a356419e7e6448003c3f841c9d98ad18b851715d9eb203ea7eb27b13ec46223fa8a1c90a99fd12960ce85b0a695335 lgi-0.9.2.tar.gz"