void-packages/srcpkgs/lua/template
Jürgen Buchmüller b8918e2a7d lua: update to 5.3.1
+ Rename lua and lua-devel to lua52 and lua52-devel
+ Modify packages depending on lua52 accordingly:
+ Many packages auto-detect lua52 files
+ Some packages need hints where / how to find lua52
+ One package (xmoto) downgraded to lua51, because it wouldn't find lua52
+ One package (vim) upgraded to lua (5.3.1)

There may be more packages upgradable without problems.
I didn't want to change too much in this move without the
respective package maintainers first taking a look.

Most notably conky-cli wouldn't work with lua52. I upgraded it
to 1.10.0 (same as conky) and tried to keep the flags the same
for the change from gnu-configure to cmake.
2015-10-02 11:24:59 +02:00

45 lines
1.3 KiB
Bash

# Template file for 'lua'
pkgname=lua
version=5.3.1
revision=1
wrksrc=lua-${version}
build_pie=yes
makedepends="ncurses-devel readline-devel"
short_desc="Powerful, fast, lightweight, embeddable scripting language"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.lua.org"
license="MIT"
distfiles="http://www.lua.org/ftp/lua-$version.tar.gz"
checksum=072767aad6cc2e62044a66e8562f51770d941e972dc1e4068ba719cd8bffac17
do_build() {
sed "s/%VER%/${version%.*}/g;s/%REL%/${version}/g" ${FILESDIR}/lua.pc > lua.pc
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
CC="$CC" RANLIB="$RANLIB" \
INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux
}
do_install() {
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
TO_LIB="liblua.a liblua.so liblua.so.${version%.*} liblua.so.${version}" \
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
vinstall lua.pc 644 usr/lib/pkgconfig
# Install the documentation
vmkdir usr/share/doc/lua
cp -R doc/* ${DESTDIR}/usr/share/doc/lua
vlicense doc/readme.html
}
lua-devel_package() {
depends="${makedepends} lua>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/doc
}
}