aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-11-25 08:04:27 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-11-25 08:05:20 +0000
commit813dd96e24bc89891bb82454af34c910f5a26827 (patch)
tree8607b3c3d1b2677d65cbd079aa110b8033bfe6a1 /main
parent9f0f0d9a0679bffa14141a444612c48f20c7bb64 (diff)
downloadaports-813dd96e24bc89891bb82454af34c910f5a26827.tar.bz2
aports-813dd96e24bc89891bb82454af34c910f5a26827.tar.xz
main/lua-expat: add support for Lua 5.2 and claim maintainership
Diffstat (limited to 'main')
-rw-r--r--main/lua-expat/APKBUILD70
-rw-r--r--main/lua-expat/newconfig26
2 files changed, 49 insertions, 47 deletions
diff --git a/main/lua-expat/APKBUILD b/main/lua-expat/APKBUILD
index e62eb085c3..3d62111a66 100644
--- a/main/lua-expat/APKBUILD
+++ b/main/lua-expat/APKBUILD
@@ -1,34 +1,62 @@
# Contributor: Mika Havela <mika.havela@gmail.com>
-# Maintainer: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+_luaversions="5.1 5.2"
pkgname=lua-expat
-_name=luaexpat
+_name=expat
pkgver=1.3.0
-pkgrel=0
-pkgdesc="LuaExpat is a SAX XML parser based on the Expat library. LuaExpat is free software and uses the same license as Lua 5.0."
-url="http://luaforge.net/projects/luaexpat/"
+pkgrel=1
+pkgdesc="SAX XML parser based on the Expat library"
+url="https://matthewwild.co.uk/projects/luaexpat/"
arch="all"
license="MIT"
-depends="lua"
-makedepends="lua-dev expat-dev"
+depends=""
+makedepends="expat-dev"
install=
-source="http://matthewwild.co.uk/projects/$_name/$_name-$pkgver.tar.gz
-newconfig"
-replaces="luaexpat"
+subpackages=
+for _i in $_luaversions; do
+ makedepends="$makedepends lua${_i}-dev"
+ subpackages="$subpackages lua${_i}-$_name:_split${_i/./}"
+ depends="$depends lua${_i}-$_name"
+done
+
+source="http://matthewwild.co.uk/projects/luaexpat/luaexpat-$pkgver.tar.gz"
+
+_builddir="$srcdir"/luaexpat-1.3.0
build() {
- cd "$srcdir/$_name-$pkgver"
- mv ../newconfig ./config
- make LUA_V=5.1 || return 1
+ cd "$srcdir"
+ for _i in $_luaversions; do
+ cp -r "$_builddir" "$srcdir"/build-$_i || return 1
+ cd "$srcdir"/build-$_i
+ make LUA_V=$_i || return 1
+ done
}
package() {
- cd "$srcdir/$_name-$pkgver"
- make LUA_V=5.1 DESTDIR="$pkgdir" install
+ cd "$srcdir"
+ for _i in $_luaversions; do
+ (cd "$srcdir"/build-$_i && make install LUA_V=$_i \
+ DESTDIR="$pkgdir") \
+ || return 1
+ done
}
-md5sums="3c20b5795e7107f847f8da844fbfe2da luaexpat-1.3.0.tar.gz
-eb947b7aa99b487289b02c1ab1b8ccd3 newconfig"
-sha256sums="d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3 luaexpat-1.3.0.tar.gz
-3744a9bd14aa64a9751642a263d94155a43834e4d0be694cdb6e522b1a37ea4e newconfig"
-sha512sums="91884653310e2dc89ade6d1653875ac8607640a21853d3ccb1fd0f833812e41981fad5c40101732ec249104d2c50c9a332208d1e44423b8428065a223c60b4ae luaexpat-1.3.0.tar.gz
-84bc640c1f18669fccf3cac2cd25106005504fd663bd2bd2afc72bcdc2a3fe4cdc13314bf5c849eca0ffe48d80d7c58c6739862b8e5978bc8326432b876b44b5 newconfig"
+_split() {
+ local d= _ver=$1
+ pkgdesc="$pkgdesc for Lua $_ver"
+ 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="3c20b5795e7107f847f8da844fbfe2da luaexpat-1.3.0.tar.gz"
+sha256sums="d060397960d87b2c89cf490f330508b7def1a0677bdc120531c571609fc57dc3 luaexpat-1.3.0.tar.gz"
+sha512sums="91884653310e2dc89ade6d1653875ac8607640a21853d3ccb1fd0f833812e41981fad5c40101732ec249104d2c50c9a332208d1e44423b8428065a223c60b4ae luaexpat-1.3.0.tar.gz"
diff --git a/main/lua-expat/newconfig b/main/lua-expat/newconfig
deleted file mode 100644
index 7d8d6331fc..0000000000
--- a/main/lua-expat/newconfig
+++ /dev/null
@@ -1,26 +0,0 @@
-LUA_LIBDIR= usr/lib/lua/5.1
-LUA_DIR= usr/share/lua/5.1
-LUA_INC= /usr/include
-EXPAT_INC= /usr/include
-
-# OS dependent
-LIB_OPTION= -shared
-
-LIBNAME= $T.so.$V
-LUA_VERSION_NUM= 514
-COMPAT_DIR= ../compat/src
-
-# Compilation parameters
-CWARNS = -Wall -pedantic \
- -Waggregate-return \
- -Wcast-align \
- -Wmissing-prototypes \
- -Wstrict-prototypes \
- -Wnested-externs \
- -Wpointer-arith \
- -Wshadow \
- -Wwrite-strings
-
-CFLAGS = $(CWARNS) -ansi -O2 -I$(LUA_INC) \
- -I$(COMPAT_DIR) -I$(EXPAT_INC)
-CC = gcc