wok-next diff lua53/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lua53/receipt	Sat Nov 21 14:32:44 2020 +0100
     1.3 @@ -0,0 +1,74 @@
     1.4 +# SliTaz package receipt v2.
     1.5 +
     1.6 +PACKAGE="lua53"
     1.7 +VERSION="5.3.5"
     1.8 +CATEGORY="development"
     1.9 +SHORT_DESC="Powerful, fast, light-weight, embeddable scripting language"
    1.10 +MAINTAINER="devel@slitaz.org"
    1.11 +LICENSE="MIT"
    1.12 +WEB_SITE="https://www.lua.org/"
    1.13 +LFS="http://www.linuxfromscratch.org/blfs/view/svn/general/lua.html"
    1.14 +
    1.15 +TARBALL="lua-$VERSION.tar.gz"
    1.16 +WGET_URL="https://www.lua.org/ftp/$TARBALL"
    1.17 +TARBALL_SHA1="112eb10ff04d1b4c9898e121d6bdf54a81482447"
    1.18 +# Integrity check: https://www.lua.org/ftp/
    1.19 +
    1.20 +BUILD_DEPENDS="readline-dev"
    1.21 +SPLIT="lib$PACKAGE $PACKAGE-dev $PACKAGE"
    1.22 +
    1.23 +COPY_dev="@dev luac53 luac" # move luac compiler to dev
    1.24 +
    1.25 +DEPENDS_liblua53=" "
    1.26 +DEPENDS_std="readline"
    1.27 +DEPENDS_dev="$PACKAGE lib$PACKAGE"
    1.28 +
    1.29 +PROVIDE_std="lua"
    1.30 +
    1.31 +compile_rules() {
    1.32 +	# Lua 5.3.5 has wrong release version in its Makefile. Fix it.
    1.33 +	sed -i 's/^R= \$V.4/R= \$V.5/' Makefile
    1.34 +	# actually logo.gif is png file
    1.35 +	mv $src/doc/logo.gif $src/doc/logo.png
    1.36 +	sed -i 's|logo\.gif|logo.png|' $src/doc/*.html
    1.37 +	chmod u+w $src/doc/lua.1 # 444->644
    1.38 +
    1.39 +	sed -i '/#define LUA_ROOT/ s:/usr/local/:/usr/:' src/luaconf.h
    1.40 +
    1.41 +	sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua53/' \
    1.42 +		-e '/^LUAC_T=/ s/luac/luac53/' -i src/Makefile
    1.43 +
    1.44 +	case $ARCH in
    1.45 +		x86_64) CFLAGS="$CFLAGS -fPIC";;
    1.46 +	esac
    1.47 +
    1.48 +	make \
    1.49 +		MYCFLAGS="$CFLAGS -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" \
    1.50 +		MYLDFLAGS="$LDFLAGS" \
    1.51 +		linux &&
    1.52 +	make \
    1.53 +		INSTALL_TOP=$install/usr \
    1.54 +		INSTALL_DATA="cp -d" \
    1.55 +		INSTALL_INC=$install/usr/include/lua5.3 \
    1.56 +		INSTALL_MAN=$install/usr/share/man/man1 \
    1.57 +		TO_BIN='lua53 luac53' \
    1.58 +		TO_LIB="liblua53.so liblua53.so.5.3 liblua53.so.$VERSION" \
    1.59 +		install || return 1
    1.60 +
    1.61 +	cook_pick_docs doc/*.html doc/*.css doc/*.png
    1.62 +
    1.63 +	mkdir -p $install/usr/lib/pkgconfig
    1.64 +	sed "s|@RELEASE@|$VERSION|" $stuff/lua.pc.in >$install/usr/lib/pkgconfig/lua53.pc
    1.65 +}
    1.66 +
    1.67 +testsuite() {
    1.68 +	$install/usr/bin/lua53 -v
    1.69 +}
    1.70 +
    1.71 +post_install_lua53() {
    1.72 +	ln -sf lua53 "$1/usr/bin/lua"
    1.73 +}
    1.74 +# post_install_lua53_dev() {
    1.75 +# 	ln -sf luac53   "$1/usr/bin/luac"
    1.76 +# 	ln -sf lua53.pc "$1/usr/lib/pkgconfig/lua.pc"
    1.77 +# }