diff options
author | B. Watson <urchlay@slackware.uk> | 2024-10-21 22:07:33 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-11-02 19:28:38 +0700 |
commit | 3c78fca82dba5a85f1a3e8b176c25e773f86fac9 (patch) | |
tree | b996a57fff2fd62c6a3ca4fba21e8e1a01e5f6fd /development | |
parent | 9e39a4192f23b3552a55454310096fd8163dec7e (diff) |
development/lua51: Added (compatibility package).
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/lua51/README | 9 | ||||
-rw-r--r-- | development/lua51/lua51.SlackBuild | 129 | ||||
-rw-r--r-- | development/lua51/lua51.info | 10 | ||||
-rw-r--r-- | development/lua51/lua51.pc | 31 | ||||
-rw-r--r-- | development/lua51/slack-desc | 19 |
5 files changed, 198 insertions, 0 deletions
diff --git a/development/lua51/README b/development/lua51/README new file mode 100644 index 000000000000..3729dbc97f24 --- /dev/null +++ b/development/lua51/README @@ -0,0 +1,9 @@ +lua51 (embeddable scripting language; older version) + +Lua is a free software light-weight programming language designed +for extending applications. Lua is also frequently used as a +general-purpose, stand-alone scripting language. + +This package is for version 5.1.x of lua, the one compatible +with the software that needs lua51 on slackbuilds.org. It won't +conflict with the regular lua package. diff --git a/development/lua51/lua51.SlackBuild b/development/lua51/lua51.SlackBuild new file mode 100644 index 000000000000..6fb1927a8753 --- /dev/null +++ b/development/lua51/lua51.SlackBuild @@ -0,0 +1,129 @@ +#!/bin/bash + +# Slackware build script for Lua + +# Written by Menno Duursma +# Modified by the SlackBuilds.org project +# Modified by Aaron W. Hsu +# Updated by Matteo Bernardini +# Renamed lua => lua51 and updated by B. Watson + +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=lua51 +SRCNAM=lua +VERSION=${VERSION:-5.1.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . + +V=5.1 +PKGBIN=$PKG/usr/bin +LIB=lib$LIBDIRSUFFIX +PKGLIB=$PKG/usr/$LIB +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +PKGMAN1=$PKG/usr/man/man1 +PKGINC=$PKG/usr/include + +# Fix up a to-be-installed header and the pkgconfig file +sed -i "s|/usr/local|/usr|" src/luaconf.h +sed -i "s|lib/lua|$LIB/lua|" src/luaconf.h +sed -i "s|/usr/local|/usr|" etc/lua.pc +sed -i "s|prefix}/lib|prefix}/$LIB|g" etc/lua.pc + +runmake() { + make $1 \ + CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" \ + INSTALL_TOP=$2/usr \ + INSTALL_LIB=$2/usr/$LIB \ + INSTALL_LMOD=$2/usr/share/lua/$V \ + INSTALL_CMOD=$2/usr/$LIB/lua/$V +} + +runmake linux "" +runmake install $PKG + +for bin in lua luac; do + newbin=${bin}51 + mv $PKGBIN/$bin $PKGBIN/$newbin + strip $PKGBIN/$newbin + ln -s $newbin $PKGBIN/${bin}$V + mv $PKGMAN1/$bin.1 $PKGMAN1/$newbin.1 +done + +mkdir $PKGINC/lua$V +mv $PKGINC/*.h* $PKGINC/lua$V + +gzip -9 $PKG/usr/man/man*/* + +# Now let's build the shared library +mkdir -p shared +cd shared + mv $PKGLIB/liblua.a $PKGLIB/liblua$V.a + ar -x $PKGLIB/liblua$V.a + gcc -ldl -lreadline -lhistory -lncurses -lm -shared *.o -o liblua$V.so.$VERSION + strip liblua$V.so.$VERSION + cp -a liblua$V.so.$VERSION $PKGLIB + for ext in .so.$V .so.5 .so; do + ln -s liblua$V.so.$VERSION $PKGLIB/liblua$V$ext + done +cd .. + +# and install the pkgconfig file +mkdir -p $PKGLIB/pkgconfig +cat $CWD/lua51.pc > $PKGLIB/pkgconfig/lua51.pc +ln -s lua51.pc $PKGLIB/pkgconfig/lua$V.pc + +mkdir -p $PKGDOC/{extras,html} +cp -a COPYRIGHT HISTORY README $PKGDOC +cp -a doc/*.html doc/logo.gif doc/lua.css $PKGDOC/html +cp -a etc test $PKGDOC/extras +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/lua51/lua51.info b/development/lua51/lua51.info new file mode 100644 index 000000000000..913f96b7856c --- /dev/null +++ b/development/lua51/lua51.info @@ -0,0 +1,10 @@ +PRGNAM="lua51" +VERSION="5.1.5" +HOMEPAGE="http://www.lua.org" +DOWNLOAD="http://www.lua.org/ftp/lua-5.1.5.tar.gz" +MD5SUM="2e115fe26e435e33b0d5c022e4490567" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Matteo Bernardini" +EMAIL="ponce@slackbuilds.org" diff --git a/development/lua51/lua51.pc b/development/lua51/lua51.pc new file mode 100644 index 000000000000..80fbc5d1f4d4 --- /dev/null +++ b/development/lua51/lua51.pc @@ -0,0 +1,31 @@ +# lua.pc -- pkg-config data for Lua + +# vars from install Makefile + +# grep '^V=' ../Makefile +V= 5.1 +# grep '^R=' ../Makefile +R= 5.1.5 + +# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +prefix= /usr +INSTALL_BIN= ${prefix}/bin +INSTALL_INC= ${prefix}/include/lua${V} +INSTALL_LIB= ${prefix}/lib64 +INSTALL_MAN= ${prefix}/man/man1 +INSTALL_LMOD= ${prefix}/share/lua/${V} +INSTALL_CMOD= ${prefix}/lib64/lua/${V} + +# canonical vars +exec_prefix=${prefix} +libdir=${exec_prefix}/lib64 +includedir=${prefix}/include/lua${V} + +Name: Lua +Description: An Extensible Extension Language +Version: ${R} +Requires: +Libs: -L${libdir} -llua${V} -lm +Cflags: -I${includedir} + +# (end of lua.pc) diff --git a/development/lua51/slack-desc b/development/lua51/slack-desc new file mode 100644 index 000000000000..add4cca02713 --- /dev/null +++ b/development/lua51/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +lua51: lua51 (embeddable scripting language; older version) +lua51: +lua51: Lua is a free software light-weight programming language designed +lua51: for extending applications. Lua is also frequently used as a +lua51: general-purpose, stand-alone scripting language. +lua51: +lua51: This package is for version 5.1.x of lua, the one compatible +lua51: with the software that needs lua51 on slackbuilds.org. +lua51: +lua51: +lua51: |