lua-lpeg: add lua5.2 subpackage.
This commit is contained in:
parent
93f07b065c
commit
0b3735ee7e
2 changed files with 36 additions and 7 deletions
|
@ -1,11 +1,12 @@
|
|||
# Template file for 'lua-lpeg'
|
||||
pkgname=lua-lpeg
|
||||
version=1.0.0
|
||||
revision=2
|
||||
hostmakedepends="lua"
|
||||
makedepends="lua-devel"
|
||||
revision=3
|
||||
hostmakedepends="lua lua52"
|
||||
makedepends="lua-devel lua52-devel"
|
||||
depends="lua>=5.3"
|
||||
short_desc="Pattern-matching library for Lua based on Parsing Expression Grammars"
|
||||
_desc="Pattern-matching library for Lua based on Parsing Expression Grammars"
|
||||
short_desc="${_desc} (5.3.x)"
|
||||
maintainer="Tj Vanderpoel (bougyman) <tj@rubyists.com>"
|
||||
license="MIT"
|
||||
homepage="http://www.inf.puc-rio.br/~roberto/lpeg/"
|
||||
|
@ -13,12 +14,39 @@ distfiles="${homepage}/${pkgname#lua-}-${version}.tar.gz"
|
|||
wrksrc="${pkgname#lua-}-${version}"
|
||||
checksum=10190ae758a22a16415429a9eb70344cf29cbda738a6962a9f94a732340abf8e
|
||||
|
||||
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3"
|
||||
do_build() {
|
||||
make CC=$CC CFLAGS="$CFLAGS -fPIC" LUADIR=${XBPS_CROSS_BASE}/usr/include/lua5.3 ${makejobs}
|
||||
post_extract() {
|
||||
mkdir -p lua52
|
||||
mv * lua52 || true
|
||||
cp -a lua52 lua53
|
||||
}
|
||||
|
||||
do_build() {
|
||||
cd ${wrksrc}/lua52
|
||||
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.2 -fPIC" \
|
||||
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.2" ${makejobs}
|
||||
|
||||
cd ${wrksrc}/lua53
|
||||
make CC=$CC DLLFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3 -fPIC" \
|
||||
LUADIR="${XBPS_CROSS_BASE}/usr/include/lua5.3" ${makejobs}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
cd ${wrksrc}/lua52
|
||||
vinstall lpeg.so 755 usr/lib/lua/5.2/
|
||||
vinstall re.lua 644 usr/share/lua/5.2/
|
||||
|
||||
cd ${wrksrc}/lua53
|
||||
vinstall lpeg.so 755 usr/lib/lua/5.3/
|
||||
vinstall re.lua 644 usr/share/lua/5.3/
|
||||
vlicense lpeg.html
|
||||
}
|
||||
|
||||
lua52-lpeg_package() {
|
||||
depends="lua52"
|
||||
short_desc="${_desc} (5.2.x)"
|
||||
pkg_install() {
|
||||
vmove usr/lib/lua/5.2
|
||||
vmove usr/share/lua/5.2
|
||||
vlicense ${wrksrc}/lua52/lpeg.html
|
||||
}
|
||||
}
|
||||
|
|
1
srcpkgs/lua52-lpeg
Symbolic link
1
srcpkgs/lua52-lpeg
Symbolic link
|
@ -0,0 +1 @@
|
|||
lua-lpeg
|
Loading…
Reference in a new issue