summaryrefslogtreecommitdiffstats
path: root/development/luarocks/luarocks.SlackBuild
diff options
context:
space:
mode:
author Evandro Alves Rodrigues <evandrofisico@gmail.com>2024-10-23 12:07:24 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-10-23 13:15:05 +0700
commit3b8942387fdf225c5cb8b466cf43050c2741cea7 (patch)
tree9a3fe54cd2ab2ed79e9190f7a277c9e2ddc9247c /development/luarocks/luarocks.SlackBuild
parent0b176174550a22664aa1da4de63d5e68f79372cc (diff)
downloadslackbuilds-3b8942387fdf225c5cb8b466cf43050c2741cea7.tar.gz
slackbuilds-3b8942387fdf225c5cb8b466cf43050c2741cea7.tar.xz
development/luarocks: Fix for newer lua.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to '')
-rw-r--r--development/luarocks/luarocks.SlackBuild44
1 files changed, 35 insertions, 9 deletions
diff --git a/development/luarocks/luarocks.SlackBuild b/development/luarocks/luarocks.SlackBuild
index 43f9860aec..c0d017985f 100644
--- a/development/luarocks/luarocks.SlackBuild
+++ b/development/luarocks/luarocks.SlackBuild
@@ -22,11 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20241023 lwf: Modified by SlackBuilds.org, BUILD=2:
+# - support lua5.1 and lua 5.4 for 15.0 and 15.1
+
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM="luarocks"
VERSION=${VERSION:-2.4.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -79,15 +83,37 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --with-lua-lib=/usr/lib$LIBDIRSUFFIX
+# CFLAGS="$SLKCFLAGS" \
+# CXXFLAGS="$SLKCFLAGS" \
+# ./configure \
+# --prefix=/usr \
+# --sysconfdir=/etc \
+# --versioned-rocks-dir \
+# --with-lua-lib=/usr/lib$LIBDIRSUFFIX
+# make build
+# make install DESTDIR=$PKG
+
+sed -i '/Invalid Lua version/d' configure
+
+runmake ()
+(
+ args=(--prefix=/usr
+ --sysconfdir=/etc
+ --lua-version="$(pkg-config --variable=V "$1")"
+ --with-lua-lib=/usr/lib$LIBDIRSUFFIX
+ --with-lua-include=/usr/include/"$2"
+ --versioned-rocks-dir)
+ if [[ "$3" != "" ]] ; then args=("${args[@]}" --lua-suffix="$3") ; fi
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure "${args[@]}"
+ make build
+ make install DESTDIR=$PKG
+)
+
+pkg-config --exists lua51 && runmake lua51 "lua5.1" "51"
+runmake lua "" ""
-make build
-make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true