wok-next annotate lua/receipt @ rev 20738

Up scons (3.0.1); add scons2 (2.5.1)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 29 21:13:51 2018 +0300 (2018-05-29)
parents b19ddba309f9
children 05e408d1554a
rev   line source
al@19808 1 # SliTaz package receipt v2.
pankso@634 2
pankso@634 3 PACKAGE="lua"
al@19808 4 VERSION="5.3.4"
pascal@741 5 CATEGORY="development"
al@19808 6 SHORT_DESC="Powerful, fast, light-weight, embeddable scripting language"
pankso@634 7 MAINTAINER="pankso@slitaz.org"
pascal@15379 8 LICENSE="MIT"
al@19645 9 WEB_SITE="https://www.lua.org/"
al@20659 10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/general/lua.html"
al@19645 11
pankso@634 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19645 13 WGET_URL="https://www.lua.org/ftp/$TARBALL"
pankso@634 14
pascal@15379 15 BUILD_DEPENDS="readline-dev"
al@19808 16 SPLIT="liblua lua-dev"
pascal@15379 17
al@20519 18 compile_rules() {
al@20519 19 sed -i '/#define LUA_ROOT/ s:/usr/local/:/usr/:' src/luaconf.h
al@19645 20
pankso@15990 21 case "$ARCH" in
pankso@15990 22 arm)
al@19645 23 make CC=${HOST_SYSTEM}-gcc posix
al@19645 24 ;;
pankso@15990 25 i486)
al@20519 26 sed -i "s|-O2|-Os -march=$ARCH|" src/Makefile
al@20519 27 make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux
al@20519 28 ;;
al@20519 29 x86_64)
al@20519 30 sed -i 's|-O2|-Os -march=nocona|' src/Makefile
al@19645 31 make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux
al@19645 32 ;;
pankso@15990 33 esac &&
al@19645 34
al@19645 35 make \
pankso@10835 36 INSTALL_TOP=$DESTDIR/usr \
al@19645 37 INSTALL_DATA="cp -d" \
al@19645 38 INSTALL_MAN=$DESTDIR/usr/share/man/man1 \
al@19808 39 TO_LIB="liblua.so liblua.so.${VERSION%.*} liblua.so.$VERSION" \
al@20519 40 install || return 1
al@19645 41
al@20519 42 cook_pick_docs doc/*
al@19645 43
al@20519 44 mkdir -p $install/usr/lib/pkgconfig
al@19645 45 cp $stuff/lua.pc $install/usr/lib/pkgconfig
pankso@634 46 }
pankso@634 47
al@19808 48 testsuite() {
al@19808 49 readelf -h $install/usr/bin/lua
al@19808 50 }
al@19808 51
al@20519 52 genpkg_rules() {
al@19808 53 case $PACKAGE in
al@19808 54 lua)
al@19808 55 copy bin/
al@20659 56 DEPENDS="readline"
al@19808 57 ;;
al@19808 58 liblua)
al@19808 59 copy *.so*
al@19808 60 CAT="libs|library"
al@19808 61 ;;
al@19808 62 *-dev)
al@19808 63 copy @dev
al@19808 64 ;;
al@19808 65 esac
pankso@634 66 }