mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
main/lua-lgi: add lua 5.2 support
This commit is contained in:
parent
3627ff4db6
commit
ddca8a87ea
@ -1,20 +1,26 @@
|
||||
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
_luaversions="5.1 5.2"
|
||||
pkgname=lua-lgi
|
||||
pkgver=0.7.2
|
||||
pkgrel=0
|
||||
pkgdesc="Lua binding using gobject-introspection"
|
||||
pkgrel=1
|
||||
pkgdesc="Dynamic Lua binding to GObject libraries using GObject-Introspection"
|
||||
url="http://github.com/pavouk/lgi"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
depends=""
|
||||
depends="lua5.1-lgi"
|
||||
depends_dev=""
|
||||
makedepends="lua-dev gtk+-dev gobject-introspection-dev libffi-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/./_}"
|
||||
done
|
||||
|
||||
source="lgi-$pkgver.tar.gz::https://github.com/pavouk/lgi/archive/$pkgver.tar.gz"
|
||||
|
||||
_builddir="$srcdir"/lgi-$pkgver
|
||||
_sdir="$srcdir"/lgi-$pkgver
|
||||
prepare() {
|
||||
local i
|
||||
cd "$_builddir"
|
||||
@ -23,20 +29,48 @@ prepare() {
|
||||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
|
||||
esac
|
||||
done
|
||||
for _i in $_luaversions; do
|
||||
cp -r "$_sdir" "$srcdir"/build-$_i
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
make PREFIX=/usr
|
||||
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
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
make install PREFIX=/usr DESTDIR="$pkgdir"
|
||||
for _i in $_luaversions; do
|
||||
cd "$srcdir"/build-$_i
|
||||
make install PREFIX=/usr DESTDIR="$pkgdir" LUA_VERSION=$_i \
|
||||
|| return 1
|
||||
done
|
||||
cd "$_sdir"
|
||||
mkdir -p "$pkgdir"/usr/share/doc/lua-lgi
|
||||
cp -r docs/* samples "$pkgdir"/usr/share/doc/lua-lgi/
|
||||
}
|
||||
|
||||
_split() {
|
||||
local d= _ver=$1
|
||||
pkgdesc="Lua $_ver binding to GObject libraries using introspection"
|
||||
replaces="$pkgname"
|
||||
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
|
||||
}
|
||||
|
||||
for _i in $_luaversions; do
|
||||
eval "split_${_i/./_}() { _split $_i; }"
|
||||
done
|
||||
|
||||
md5sums="f41902695c3d8ef40312d7c654885bf3 lgi-0.7.2.tar.gz"
|
||||
sha256sums="76a590f36fe1389d69d116e15ceb6983eab346a16702e8f41604ac73de3b1446 lgi-0.7.2.tar.gz"
|
||||
sha512sums="e661e13d6f539c2c434a6b0db9e622ee4af3c039a6488617954643f0b46a908068a14e6d37ff44437fbe5b4cb62863699107ab533aca121d4b8d584ca83c35fc lgi-0.7.2.tar.gz"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user