lua51: adopt, fix pkg-config

This commit is contained in:
q66 2020-06-30 21:33:01 +02:00
parent 3057653146
commit b5a787d972
2 changed files with 29 additions and 5 deletions

View file

@ -0,0 +1,21 @@
V=%VER%
R=%REL%
prefix=/usr
INSTALL_BIN=${prefix}/bin
INSTALL_INC=${prefix}/include
INSTALL_LIB=${prefix}/lib
INSTALL_MAN=${prefix}/man/man1
INSTALL_LMOD=${prefix}/share/lua/${V}
INSTALL_CMOD=${prefix}/lib/lua/${V}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/lua${V}
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua${V}
Libs.private: -lm -ldl
Cflags: -I${includedir}

View file

@ -1,11 +1,11 @@
# Template file for 'lua51' # Template file for 'lua51'
pkgname=lua51 pkgname=lua51
version=5.1.5 version=5.1.5
revision=9 revision=10
wrksrc="lua-${version}" wrksrc="lua-${version}"
makedepends="ncurses-devel readline-devel" makedepends="ncurses-devel readline-devel"
short_desc="Powerful, fast, lightweight, embeddable scripting language (5.1.x)" short_desc="Powerful, fast, lightweight, embeddable scripting language (5.1.x)"
maintainer="Orphaned <orphan@voidlinux.org>" maintainer="q66 <daniel@octaforge.org>"
license="MIT" license="MIT"
homepage="https://www.lua.org" homepage="https://www.lua.org"
distfiles="https://www.lua.org/ftp/lua-$version.tar.gz" distfiles="https://www.lua.org/ftp/lua-$version.tar.gz"
@ -21,7 +21,7 @@ alternatives="
do_build() { do_build() {
export CFLAGS="$CFLAGS -fPIC" export CFLAGS="$CFLAGS -fPIC"
sed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc vsed -e 's:llua:llua5.1:' -e 's:/include:/include/lua5.1:' -i etc/lua.pc
sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' -e '/^LUAC_T=/ s/luac/luac5.1/' -i src/Makefile sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' -e '/^LUAC_T=/ s/luac/luac5.1/' -i src/Makefile
make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \ make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" \
CC="$CC" RANLIB="$RANLIB" \ CC="$CC" RANLIB="$RANLIB" \
@ -35,7 +35,10 @@ do_install() {
INSTALL_INC="${DESTDIR}/usr/include/lua5.1" \ INSTALL_INC="${DESTDIR}/usr/include/lua5.1" \
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
vinstall etc/lua.pc 644 usr/lib/pkgconfig lua5.1.pc sed ${FILESDIR}/lua.pc \
-e "s;%VER%;${version%.*};g;s;%REL%;${version};g" \
> lua5.1.pc
vinstall lua5.1.pc 644 usr/lib/pkgconfig
# Install the documentation # Install the documentation
rm -f doc/*.1 rm -f doc/*.1
@ -50,7 +53,7 @@ do_install() {
} }
lua51-devel_package() { lua51-devel_package() {
depends="ncurses-devel readline-devel>=6.3 lua51>=${version}_${revision}" depends="${makedepends} lua51>=${version}_${revision}"
short_desc+=" - development files" short_desc+=" - development files"
alternatives=" alternatives="
lua-devel:lua:/usr/include/lua5.1 lua-devel:lua:/usr/include/lua5.1