2460f86706
Only the lua binary depends on libreadline and ncurses, not the library, so lua53-devel doesn't need to depend on their devel packages. The package has listed these dependencies explicitly for a long time (at least before 2013), so it being there until today seems to be more of a historical artifact then for an actual reason. While we are here, remove ncurses-devel from makedepends, since it's no longer used by the lua build system (this doesn't make a huge difference, because readline-devel still pulls it in). 53
86 lines
2.2 KiB
Bash
86 lines
2.2 KiB
Bash
# Template file for 'lua53'
|
|
pkgname=lua53
|
|
version=5.3.5
|
|
revision=7
|
|
wrksrc=lua-${version}
|
|
makedepends="readline-devel"
|
|
short_desc="Powerful, fast, lightweight, embeddable scripting language (5.3.x)"
|
|
maintainer="q66 <daniel@octaforge.org>"
|
|
license="MIT"
|
|
homepage="https://www.lua.org"
|
|
distfiles="https://www.lua.org/ftp/lua-${version}.tar.gz"
|
|
checksum=0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
|
|
|
|
alternatives="
|
|
lua:lua:/usr/bin/lua5.3
|
|
lua:luac:/usr/bin/luac5.3
|
|
lua:lua.1:/usr/share/man/man1/lua5.3.1
|
|
lua:luac.1:/usr/share/man/man1/luac5.3.1
|
|
"
|
|
|
|
pre_build() {
|
|
# 5.3.5 has 5.3.4 in the Makefile
|
|
vsed "s/^R= \$V.4/R= \$V.5/" -i Makefile
|
|
}
|
|
|
|
do_build() {
|
|
sed -i src/Makefile -r \
|
|
-e '/^LUA_(SO|A|T)=/ s;lua;lua5.3;' \
|
|
-e '/^LUAC_T=/ s;luac;luac5.3;'
|
|
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
|
|
CC="$CC" RANLIB="$RANLIB" \
|
|
INSTALL_DATA="cp -d" LUA_SO=liblua5.3.so ${makejobs} linux
|
|
}
|
|
|
|
do_install() {
|
|
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
|
|
TO_BIN="lua5.3 luac5.3" \
|
|
TO_LIB="liblua5.3.a liblua5.3.so liblua5.3.so.${version%.*} liblua5.3.so.${version}" \
|
|
INSTALL_INC="${DESTDIR}/usr/include/lua5.3" \
|
|
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
|
|
|
|
sed ${FILESDIR}/lua.pc \
|
|
-e "s;%VER%;${version%.*};g;s;%REL%;${version};g" \
|
|
> lua5.3.pc
|
|
|
|
vinstall lua5.3.pc 644 usr/lib/pkgconfig
|
|
|
|
# Install the documentation
|
|
rm -f doc/*.1
|
|
vmkdir usr/share/doc/lua5.3
|
|
cp -R doc/* ${DESTDIR}/usr/share/doc/lua5.3
|
|
|
|
vlicense doc/readme.html
|
|
|
|
# Rename man pages
|
|
mv ${DESTDIR}/usr/share/man/man1/lua{,5.3}.1
|
|
mv ${DESTDIR}/usr/share/man/man1/luac{,5.3}.1
|
|
}
|
|
|
|
lua53-devel_package() {
|
|
depends="lua53>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
alternatives="
|
|
lua-devel:lua:/usr/share/doc/lua5.3
|
|
lua-devel:lua.pc:/usr/lib/pkgconfig/lua5.3.pc
|
|
"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/share/doc
|
|
}
|
|
}
|
|
|
|
lua_package() {
|
|
depends="lua53>=${version}_${revision}"
|
|
short_desc+=" (transitional dummy package)"
|
|
build_style=meta
|
|
}
|
|
|
|
lua-devel_package() {
|
|
depends="lua53-devel>=${version}_${revision}"
|
|
short_desc+=" - development files (transitional dummy package)"
|
|
build_style=meta
|
|
}
|