0

Initial commit

This commit is contained in:
eleksir
2023-11-19 18:01:40 +03:00
commit 80ec8a7529
586 changed files with 29486 additions and 0 deletions

6
lua/README Normal file
View File

@@ -0,0 +1,6 @@
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 the version 5.1.x of lua, the one compatible
with the software that needs lua on slackbuilds.org.

122
lua/lua.SlackBuild Executable file
View File

@@ -0,0 +1,122 @@
#!/bin/sh
# Slackware build script for lua
# Copyright 2023 Sergei Fedosoff <eleksir@gmail.com>
# All rights reserved.
#
# * Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright notice
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=lua
VERSION=${VERSION:-5.1.5}
BUILD=${BUILD:-2}
TAG=${TAG:-_EXs}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/EXs}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -rdynamic"
LIBDIRSUFFIX="64"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xf $CWD/$PRGNAM-${VERSION}.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
patch --verbose -p1 -i $CWD/path${LIBDIRSUFFIX}.patch
#sed -i 's/CFLAGS= -O2 -Wall $(MYCFLAGS)/CFLAGS= $(SLKCFLAGS) $(MYCFLAGS)/' src/Makefile
export SLKCFLAGS
export SLKLDFLAGS="-rdynamic -Wl,--export-dynamic -Wl,-E -Wl,--no-as-needed -Wl,-O2"
make -j$(nproc) linux \
INSTALL_TOP=/usr \
INSTALL_LIB=/usr/lib${LIBDIRSUFFIX} \
INSTALL_LMOD=/usr/share/lua/5.1 \
INSTALL_CMOD=/usr/lib${LIBDIRSUFFIX}/lua/5.1
make -j$(nproc) linux install \
INSTALL_TOP=$PKG/usr \
INSTALL_LIB=$PKG/usr/lib${LIBDIRSUFFIX} \
INSTALL_LMOD=$PKG/usr/share/lua/5.1 \
INSTALL_CMOD=$PKG/usr/lib${LIBDIRSUFFIX}/lua/5.1
# Now let's build the shared library
mkdir -p shared
cd shared
ar -x $PKG/usr/lib${LIBDIRSUFFIX}/liblua.a
gcc -ldl -lreadline -lhistory -lncurses -lm -shared *.o -o liblua.so.$VERSION
install -Dpm 0755 liblua.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}
( cd $PKG/usr/lib${LIBDIRSUFFIX}
ln -s liblua.so.$VERSION liblua.so.5.1
ln -s liblua.so.$VERSION liblua.so.5
ln -s liblua.so.$VERSION liblua.so
)
cd ..
# and install the pkgconfig file
install -Dpm 0644 etc/lua.pc $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/lua.pc
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/{extras,html}
cp -a COPYRIGHT HISTORY INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
cp -a doc/*.html doc/logo.gif doc/lua.css $PKG/usr/doc/$PRGNAM-$VERSION/html
cp -a etc test $PKG/usr/doc/$PRGNAM-$VERSION/extras
install -Dpm 0644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
install -Dpm 0644 $CWD/slack-desc $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

10
lua/lua.info Normal file
View File

@@ -0,0 +1,10 @@
PRGNAM="lua"
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"

56
lua/path.patch Normal file
View File

@@ -0,0 +1,56 @@
diff -ruNp lua-5.1.5/Makefile lua-5.1.5.new/Makefile
--- lua-5.1.5/Makefile 2012-02-10 13:50:23.000000000 +0400
+++ lua-5.1.5.new/Makefile 2023-11-07 02:08:47.410419337 +0300
@@ -9,7 +9,7 @@ PLAT= none
# Where to install. The installation starts in the src and doc directories,
# so take care if INSTALL_TOP is not an absolute path.
-INSTALL_TOP= /usr/local
+INSTALL_TOP= /usr
INSTALL_BIN= $(INSTALL_TOP)/bin
INSTALL_INC= $(INSTALL_TOP)/include
INSTALL_LIB= $(INSTALL_TOP)/lib
diff -ruNp lua-5.1.5/etc/lua.pc lua-5.1.5.new/etc/lua.pc
--- lua-5.1.5/etc/lua.pc 2012-02-10 13:50:30.000000000 +0400
+++ lua-5.1.5.new/etc/lua.pc 2023-11-07 02:10:11.503423636 +0300
@@ -8,7 +8,7 @@ V= 5.1
R= 5.1.5
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
-prefix= /usr/local
+prefix= /usr
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
INSTALL_LIB= ${prefix}/lib
diff -ruNp lua-5.1.5/src/Makefile lua-5.1.5.new/src/Makefile
--- lua-5.1.5/src/Makefile 2012-02-14 00:41:22.000000000 +0400
+++ lua-5.1.5.new/src/Makefile 2023-11-07 02:07:21.778414960 +0300
@@ -8,14 +8,14 @@
PLAT= none
CC= gcc
-CFLAGS= -O2 -Wall $(MYCFLAGS)
+CFLAGS= $(SLKCFLAGS) $(MYCFLAGS)
AR= ar rcu
RANLIB= ranlib
RM= rm -f
LIBS= -lm $(MYLIBS)
MYCFLAGS=
-MYLDFLAGS=
+MYLDFLAGS=$(SLKLDFLAGS)
MYLIBS=
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
diff -ruNp lua-5.1.5/src/luaconf.h lua-5.1.5.new/src/luaconf.h
--- lua-5.1.5/src/luaconf.h 2008-02-11 19:25:08.000000000 +0300
+++ lua-5.1.5.new/src/luaconf.h 2023-11-07 02:09:40.687422060 +0300
@@ -94,7 +94,7 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
#define LUA_PATH_DEFAULT \

83
lua/path64.patch Normal file
View File

@@ -0,0 +1,83 @@
diff -ruNp lua-5.1.5/Makefile lua-5.1.5.new/Makefile
--- lua-5.1.5/Makefile 2012-02-10 13:50:23.000000000 +0400
+++ lua-5.1.5.new/Makefile 2023-11-07 01:55:13.408377728 +0300
@@ -9,16 +9,16 @@ PLAT= none
# Where to install. The installation starts in the src and doc directories,
# so take care if INSTALL_TOP is not an absolute path.
-INSTALL_TOP= /usr/local
+INSTALL_TOP= /usr
INSTALL_BIN= $(INSTALL_TOP)/bin
INSTALL_INC= $(INSTALL_TOP)/include
-INSTALL_LIB= $(INSTALL_TOP)/lib
+INSTALL_LIB= $(INSTALL_TOP)/lib64
INSTALL_MAN= $(INSTALL_TOP)/man/man1
#
# You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+INSTALL_CMOD= $(INSTALL_TOP)/lib64/lua/$V
# How to install. If your install program does not support "-p", then you
# may have to run ranlib on the installed liblua.a (do "make ranlib").
diff -ruNp lua-5.1.5/etc/lua.pc lua-5.1.5.new/etc/lua.pc
--- lua-5.1.5/etc/lua.pc 2012-02-10 13:50:30.000000000 +0400
+++ lua-5.1.5.new/etc/lua.pc 2023-11-07 01:55:13.408377728 +0300
@@ -8,17 +8,17 @@ V= 5.1
R= 5.1.5
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
-prefix= /usr/local
+prefix= /usr
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
-INSTALL_LIB= ${prefix}/lib
+INSTALL_LIB= ${prefix}/lib64
INSTALL_MAN= ${prefix}/man/man1
INSTALL_LMOD= ${prefix}/share/lua/${V}
-INSTALL_CMOD= ${prefix}/lib/lua/${V}
+INSTALL_CMOD= ${prefix}/lib64/lua/${V}
# canonical vars
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=${exec_prefix}/lib64
includedir=${prefix}/include
Name: Lua
diff -ruNp lua-5.1.5/src/Makefile lua-5.1.5.new/src/Makefile
--- lua-5.1.5/src/Makefile 2012-02-14 00:41:22.000000000 +0400
+++ lua-5.1.5.new/src/Makefile 2023-11-07 02:04:00.088404650 +0300
@@ -8,14 +8,14 @@
PLAT= none
CC= gcc
-CFLAGS= -O2 -Wall $(MYCFLAGS)
+CFLAGS= $(SLKCFLAGS) $(MYCFLAGS)
AR= ar rcu
RANLIB= ranlib
RM= rm -f
LIBS= -lm $(MYLIBS)
MYCFLAGS=
-MYLDFLAGS=
+MYLDFLAGS=$(SLKLDFLAGS)
MYLIBS=
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
diff -ruNp lua-5.1.5/src/luaconf.h lua-5.1.5.new/src/luaconf.h
--- lua-5.1.5/src/luaconf.h 2008-02-11 19:25:08.000000000 +0300
+++ lua-5.1.5.new/src/luaconf.h 2023-11-07 01:55:13.409377728 +0300
@@ -94,9 +94,9 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr"
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
-#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+#define LUA_CDIR LUA_ROOT "lib64/lua/5.1/"
#define LUA_PATH_DEFAULT \
"./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"

19
lua/slack-desc Normal file
View File

@@ -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------------------------------------------------------|
lua: lua (a powerful, fast, light-weight, embeddable scripting language)
lua:
lua: Lua combines simple procedural syntax with powerful data description
lua: constructs based on associative arrays and extensible semantics.
lua: Lua is dynamically typed, runs by interpreting bytecode for a
lua: register-based virtual machine, and has automatic memory management
lua: with incremental garbage collection, making it ideal for
lua: configuration, scripting, and rapid prototyping.
lua:
lua:
lua: