pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
import lua 5.4.6-rc1, updated patches and targets
Module Name: pkgsrc-wip
Committed By: nikita <nikita%NetBSD.org@localhost>
Pushed By: nikita
Date: Sun May 7 14:25:04 2023 +0200
Changeset: dcfb9527d0b5f6a8302d14b686dcdf27b302403f
Added Files:
lua54/ALTERNATIVES
lua54/DESCR
lua54/Makefile
lua54/PLIST
lua54/buildlink3.mk
lua54/distinfo
lua54/files/lua.pc.in
lua54/patches/patch-src_Makefile
lua54/version.mk
Log Message:
import lua 5.4.6-rc1, updated patches and targets
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dcfb9527d0b5f6a8302d14b686dcdf27b302403f
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lua54/ALTERNATIVES | 2 +
lua54/DESCR | 10 +++++
lua54/Makefile | 96 ++++++++++++++++++++++++++++++++++++++++
lua54/PLIST | 20 +++++++++
lua54/buildlink3.mk | 30 +++++++++++++
lua54/distinfo | 6 +++
lua54/files/lua.pc.in | 21 +++++++++
lua54/patches/patch-src_Makefile | 81 +++++++++++++++++++++++++++++++++
lua54/version.mk | 6 +++
9 files changed, 272 insertions(+)
diffs:
diff --git a/lua54/ALTERNATIVES b/lua54/ALTERNATIVES
new file mode 100644
index 0000000000..6ce7c7a510
--- /dev/null
+++ b/lua54/ALTERNATIVES
@@ -0,0 +1,2 @@
+bin/lua @PREFIX@/bin/lua5.4
+bin/luac @PREFIX@/bin/luac5.4
diff --git a/lua54/DESCR b/lua54/DESCR
new file mode 100644
index 0000000000..7251be1958
--- /dev/null
+++ b/lua54/DESCR
@@ -0,0 +1,10 @@
+Lua is a powerful, fast, lightweight, embeddable scripting language.
+
+Lua combines simple procedural syntax with powerful data description
+constructs based on associative arrays and extensible semantics. Lua is
+dynamically typed, runs by interpreting bytecode for a register-based
+virtual machine, and has automatic memory management with incremental
+garbage collection, making it ideal for configuration, scripting, and
+rapid prototyping.
+
+This version is the current stable release.
diff --git a/lua54/Makefile b/lua54/Makefile
new file mode 100644
index 0000000000..ef16864c27
--- /dev/null
+++ b/lua54/Makefile
@@ -0,0 +1,96 @@
+# $NetBSD: Makefile,v 1.4 2022/03/06 07:46:10 nia Exp $
+
+DISTNAME= lua-${LUA_VERSION}-rc1
+PKGNAME= lua54-${LUA_VERSION}
+CATEGORIES= lang lua
+MASTER_SITES= https://www.lua.org/work/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://www.lua.org/
+COMMENT= Lightweight, embeddable scripting language (v5.4)
+LICENSE= mit
+
+.include "../../wip/lua54/version.mk"
+
+CONFLICTS+= lua-[0-9]*
+
+USE_TOOLS+= gmake
+USE_LIBTOOL= yes
+
+WRKSRC= ${WRKDIR}/lua-${LUA_VERSION}
+
+.include "../../mk/bsd.prefs.mk"
+
+MAKE_FLAGS+= MYCFLAGS="-DLUA_USE_READLINE"
+MAKE_FLAGS+= INSTALL_TOP=${PREFIX}
+MAKE_FLAGS+= INSTALL_INC=${PREFIX}/include/lua-5.4
+MAKE_FLAGS+= INSTALL_MAN=${PREFIX}/${PKGMANDIR}/man1
+
+# Address pkg/47587 lua not linked to pthread causes issues with modules
+PTHREAD_OPTS+= native
+
+.include "../../mk/pthread.buildlink3.mk"
+
+.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "native"
+CFLAGS+= -pthread
+LDFLAGS+= -pthread
+.endif
+
+.if ${OPSYS:M*BSD*} || ${OPSYS} == "DragonFly"
+BUILD_TARGET= bsd
+.elif ${OPSYS} == "Linux"
+BUILD_TARGET= linux
+.elif ${OPSYS} == "Darwin"
+BUILD_TARGET= macosx
+.elif ${OPSYS} == "SunOS"
+BUILD_TARGET= solaris
+.elif ${OPSYS} == "AIX"
+BUILD_TARGET= aix
+.else
+BUILD_TARGET= posix
+.endif
+
+DOCDIR= ${PREFIX}/share/doc/lua-5.4
+
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_FILES.prefix+= src/luaconf.h
+SUBST_SED.prefix+= -e "s,/usr/local,${PREFIX},g"
+
+PKGCONFIG_OVERRIDE= lua.pc
+INSTALLATION_DIRS+= bin lib include/lua-5.4
+INSTALLATION_DIRS+= ${PKGMANDIR}/man1
+INSTALLATION_DIRS+= lib/pkgconfig share/doc/lua-5.4
+
+pre-configure:
+ sed -e 's,@PREFIX@,${PREFIX},g' \
+ -e 's,@VER@,${PKGVERSION_NOREV:R},g' \
+ -e 's,@REV@,${PKGVERSION_NOREV},g' \
+ ${FILESDIR}/lua.pc.in > ${WRKSRC}/lua.pc
+ cp ${WRKSRC}/doc/lua.1 ${WRKSRC}/doc/lua5.4.1
+ cp ${WRKSRC}/doc/luac.1 ${WRKSRC}/doc/luac5.4.1
+
+do-install:
+ ${LIBTOOL} --quiet --tag=CC --mode=install \
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/lua ${DESTDIR}${PREFIX}/bin/lua5.4
+ ${LIBTOOL} --quiet --tag=CC --mode=install \
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/luac ${DESTDIR}${PREFIX}/bin/luac5.4
+ ${LIBTOOL} --quiet --tag=CC --mode=install \
+ ${INSTALL_LIB} ${WRKSRC}/src/liblua5.4.la ${DESTDIR}${PREFIX}/lib
+ cd ${WRKSRC}/src && ${INSTALL_DATA} lua.h luaconf.h lualib.h lauxlib.h lua.hpp \
+ ${DESTDIR}${PREFIX}/include/lua-5.4
+ cd ${WRKSRC}/doc && ${INSTALL_MAN} lua.1 luac.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.[a-z][a-z][a-z] \
+ ${WRKSRC}/doc/*.html ${DESTDIR}${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/lua.pc \
+ ${DESTDIR}${PREFIX}/lib/pkgconfig/lua-5.4.pc
+
+.include "../../mk/readline.buildlink3.mk"
+.if ${READLINE_TYPE} == "editline"
+MAKE_FLAGS+= MYLIBS="-L${BUILDLINK_PREFIX.editlinereadline} -ledit"
+.else
+MAKE_FLAGS+= MYLIBS="-L${BUILDLINK_PREFIX.editlinereadline} -lreadline"
+.endif
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/lua54/PLIST b/lua54/PLIST
new file mode 100644
index 0000000000..b4480a3cc7
--- /dev/null
+++ b/lua54/PLIST
@@ -0,0 +1,20 @@
+@comment $NetBSD: PLIST,v 1.1 2020/06/30 13:16:14 nia Exp $
+bin/lua5.4
+bin/luac5.4
+include/lua-5.4/lauxlib.h
+include/lua-5.4/lua.h
+include/lua-5.4/lua.hpp
+include/lua-5.4/luaconf.h
+include/lua-5.4/lualib.h
+lib/liblua5.4.la
+lib/pkgconfig/lua-5.4.pc
+man/man1/lua.1
+man/man1/luac.1
+share/doc/lua-5.4/contents.html
+share/doc/lua-5.4/index.css
+share/doc/lua-5.4/logo.gif
+share/doc/lua-5.4/lua.css
+share/doc/lua-5.4/manual.css
+share/doc/lua-5.4/manual.html
+share/doc/lua-5.4/osi-certified-72x60.png
+share/doc/lua-5.4/readme.html
diff --git a/lua54/buildlink3.mk b/lua54/buildlink3.mk
new file mode 100644
index 0000000000..ae1929f04e
--- /dev/null
+++ b/lua54/buildlink3.mk
@@ -0,0 +1,30 @@
+# $NetBSD: buildlink3.mk,v 1.4 2023/03/25 18:55:47 wiz Exp $
+
+BUILDLINK_TREE+= lua54
+
+.if !defined(LUA54_BUILDLINK3_MK)
+LUA54_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.lua54+= lua54>=5.4.0<5.5
+BUILDLINK_PKGSRCDIR.lua54?= ../../lang/lua54
+
+.if defined(BUILDLINK_DEPMETHOD.lua)
+BUILDLINK_DEPMETHOD.lua54?= ${BUILDLINK_DEPMETHOD.lua}
+.endif
+
+# -llua -> -llua5.4
+BUILDLINK_TRANSFORM+= l:lua:lua5.4
+BUILDLINK_INCDIRS.lua54+= include/lua-5.4
+
+.if defined(USE_CMAKE) || defined(BUILD_USES_CMAKE)
+# used by FindLua.cmake
+CMAKE_ARGS+= -DLua_FIND_VERSION_EXACT=ON
+CMAKE_ARGS+= -DLua_FIND_VERSION_COUNT=2
+CMAKE_ARGS+= -DLua_FIND_VERSION_MAJOR=5
+CMAKE_ARGS+= -DLua_FIND_VERSION_MINOR=4
+.endif
+
+.include "../../mk/readline.buildlink3.mk"
+.endif # LUA54_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -lua54
diff --git a/lua54/distinfo b/lua54/distinfo
new file mode 100644
index 0000000000..f22278b4ec
--- /dev/null
+++ b/lua54/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.9 2022/03/06 07:46:10 nia Exp $
+
+BLAKE2s (lua-5.4.6-rc1.tar.gz) = 00c28c837b3b582bcc6fbd7e4e0f08c26fc1bf18a4cbf1c12e85bfa43e494f0c
+SHA512 (lua-5.4.6-rc1.tar.gz) = d90c6903355ee1309cb0d92a8a024522ff049091a117ea21efb585b5de35776191cd67d17a65b18c2f9d374795b7c944f047576f0e3fe818d094b26f0e4845c5
+Size (lua-5.4.6-rc1.tar.gz) = 363329 bytes
+SHA1 (patch-src_Makefile) = 01f6e222c3c72e12162e2c1032b8c7ef95ffe79b
diff --git a/lua54/files/lua.pc.in b/lua54/files/lua.pc.in
new file mode 100644
index 0000000000..5eb471137c
--- /dev/null
+++ b/lua54/files/lua.pc.in
@@ -0,0 +1,21 @@
+# $NetBSD: lua.pc.in,v 1.1 2020/06/30 13:16:14 nia Exp $
+# lua.pc is not any longer distributed, but is still required by other packages.
+
+prefix= @PREFIX@
+INSTALL_BIN= ${prefix}/bin
+INSTALL_INC= ${prefix}/include
+INSTALL_LIB= ${prefix}/lib
+INSTALL_MAN= ${prefix}/man/man1
+INSTALL_LMOD= ${prefix}/share/lua/@VER@
+INSTALL_CMOD= ${prefix}/lib/lua/@VER@
+
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/lua-5.4
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: @REV@
+Requires:
+Libs: -L${libdir} -llua5.4 -lm
+Cflags: -I${includedir}
diff --git a/lua54/patches/patch-src_Makefile b/lua54/patches/patch-src_Makefile
new file mode 100644
index 0000000000..a2ed6a465c
--- /dev/null
+++ b/lua54/patches/patch-src_Makefile
@@ -0,0 +1,81 @@
+$NetBSD: patch-src_Makefile,v 1.4 2021/10/27 13:02:40 nia Exp $
+
+- Don't override CC/CFLAGS/LDFLAGS.
+- Use libtool to build shared libraries.
+
+--- src/Makefile.orig 2023-02-03 11:43:14.000000000 +0100
++++ src/Makefile 2023-05-07 14:17:04.851265572 +0200
+@@ -6,9 +6,8 @@
+ # Your platform. See PLATS for possible values.
+ PLAT= guess
+
+-CC= gcc -std=gnu99
+-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+-LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
++CFLAGS+= -std=gnu99 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
++LDFLAGS+= $(SYSLDFLAGS) $(MYLDFLAGS)
+ LIBS= -lm $(SYSLIBS) $(MYLIBS)
+
+ AR= ar rcu
+@@ -32,16 +31,16 @@
+
+ PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
+
+-LUA_A= liblua.a
++LUA_A= liblua5.4.la
+ CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
+ LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
+-BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
++BASE_O= $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) $(MYOBJS:.o=.lo)
+
+ LUA_T= lua
+-LUA_O= lua.o
++LUA_O= lua.lo
+
+ LUAC_T= luac
+-LUAC_O= luac.o
++LUAC_O= luac.lo
+
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+@@ -56,15 +55,19 @@
+
+ a: $(ALL_A)
+
++.SUFFIXES: .lo
++
++.c.lo:
++ $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $<
++
+ $(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
+- $(RANLIB) $@
++ $(LIBTOOL) --quiet --tag=CC --mode=link $(CC) -o $@ $(LDFLAGS) $(BASE_O) -rpath $(PREFIX)/lib -version-info 5:4 $(LIBS)
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ $(LIBTOOL) --quiet --tag=CC --mode=link $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++ $(LIBTOOL) --quiet --tag=CC --mode=link $(CC) -static -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+
+ test:
+ ./$(LUA_T) -v
+@@ -146,16 +149,6 @@
+ # Targets that do not create files (not all makes understand .PHONY).
+ .PHONY: all $(PLATS) help test clean default o a depend echo
+
+-# Compiler modules may use special flags.
+-llex.o:
+- $(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c
+-
+-lparser.o:
+- $(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c
+-
+-lcode.o:
+- $(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c
+-
+ # DO NOT DELETE
+
+ lapi.o: lapi.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
diff --git a/lua54/version.mk b/lua54/version.mk
new file mode 100644
index 0000000000..075caf7e69
--- /dev/null
+++ b/lua54/version.mk
@@ -0,0 +1,6 @@
+# $NetBSD: version.mk,v 1.5 2022/03/06 07:46:10 nia Exp $
+
+LUA_VERSION= 5.4.6
+
+LUA_VERSION_MAJOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
+LUA_VERSION_MINOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
Home |
Main Index |
Thread Index |
Old Index