summaryrefslogtreecommitdiff
path: root/lang/lua52/patches
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2013-10-30 06:18:09 +0000
committerdholland <dholland@pkgsrc.org>2013-10-30 06:18:09 +0000
commit75737aab7c1d8a7dfa60377ba3a2b441c7291eed (patch)
treea9c8d91a9a039b3bcdf7db23e51528c61b9b5c79 /lang/lua52/patches
parent21eabb41879df6aca034c4dd4916cb9faaf345fd (diff)
downloadpkgsrc-75737aab7c1d8a7dfa60377ba3a2b441c7291eed.tar.gz
Reimport lang/lua as lang/lua52, and bring back the previous Lua 5.1
package as lang/lua51. I've adjusted the depends and switched the PKGNAMEs but these packages are otherwise unchanged. This means that you can't install both at once. There are preliminary patches for that (see tech-pkg) but they aren't quite ready yet. This also doesn't include agc's builtin.mk, although it should be possible to drop it into the lua51 package with only very minor modifications. I don't think the builtin packages will allow having one builtin.mk for both lua51 and lua52, but I'd be happy to be shown wrong about that. Add infrastructure support for Lua module packages (including multiversion support), application packages written in Lua, and a redirecting bl3.mk file for packages that just link Lua in. This is based on the Python infrastructure. The new variable LUA_VERSION_DEFAULT picks which Lua package you get by default; it is set to 52 so as to maintain the status quo. Packages can set LUA_VERSIONS_ACCEPTED and/or LUA_VERSIONS_INCOMPATIBLE. I have found (I think) most or all the packages that don't work with lua51 and will be marking those; I have not tracked down most of the ones that don't work with lua52 yet as I was originally intending to roll back to 5.1 as the default.
Diffstat (limited to 'lang/lua52/patches')
-rw-r--r--lang/lua52/patches/patch-aa53
-rw-r--r--lang/lua52/patches/patch-ab74
-rw-r--r--lang/lua52/patches/patch-ac23
3 files changed, 150 insertions, 0 deletions
diff --git a/lang/lua52/patches/patch-aa b/lang/lua52/patches/patch-aa
new file mode 100644
index 00000000000..66315e4a442
--- /dev/null
+++ b/lang/lua52/patches/patch-aa
@@ -0,0 +1,53 @@
+$NetBSD: patch-aa,v 1.1 2013/10/30 06:18:10 dholland Exp $
+
+--- Makefile.orig 2012-05-17 14:05:54.000000000 +0000
++++ Makefile
+@@ -10,11 +10,11 @@ PLAT= none
+ # so take care if INSTALL_TOP is not an absolute path. See the local target.
+ # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
+ # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
+-INSTALL_TOP= /usr/local
++INSTALL_TOP= ${PREFIX}
+ INSTALL_BIN= $(INSTALL_TOP)/bin
+ INSTALL_INC= $(INSTALL_TOP)/include
+ INSTALL_LIB= $(INSTALL_TOP)/lib
+-INSTALL_MAN= $(INSTALL_TOP)/man/man1
++INSTALL_MAN= $(INSTALL_TOP)/${PKGMANDIR}/man1
+ INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+
+@@ -22,7 +22,7 @@ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+ # you may have to run ranlib on the installed liblua.a.
+ INSTALL= install -p
+ INSTALL_EXEC= $(INSTALL) -m 0755
+-INSTALL_DATA= $(INSTALL) -m 0644
++#INSTALL_DATA= $(INSTALL) -m 0644
+ #
+ # If you don't have "install" you can use "cp" instead.
+ # INSTALL= cp -p
+@@ -41,7 +41,7 @@ PLATS= aix ansi bsd freebsd generic linu
+ # What to install.
+ TO_BIN= lua luac
+ TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
+-TO_LIB= liblua.a
++TO_LIB= liblua.la
+ TO_MAN= lua.1 luac.1
+
+ # Lua version and release.
+@@ -58,11 +58,11 @@ test: dummy
+ src/lua -v
+
+ install: dummy
+- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+- cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
+- cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
++ cd src && $(MKDIR) $(DESTDIR)$(INSTALL_BIN) $(DESTDIR)$(INSTALL_INC) $(DESTDIR)$(INSTALL_LIB) $(DESTDIR)$(INSTALL_MAN) $(DESTDIR)$(INSTALL_LMOD) $(DESTDIR)$(INSTALL_CMOD)
++ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_PROGRAM) $(TO_BIN) $(DESTDIR)$(INSTALL_BIN)
++ cd src && $(INSTALL_DATA) $(TO_INC) $(DESTDIR)$(INSTALL_INC)
++ cd src && $(LIBTOOL) --tag=CC --mode=install $(BSD_INSTALL_LIB) $(TO_LIB) $(DESTDIR)$(INSTALL_LIB)
++ cd doc && $(INSTALL_DATA) $(TO_MAN) $(DESTDIR)$(INSTALL_MAN)
+
+ uninstall:
+ cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
diff --git a/lang/lua52/patches/patch-ab b/lang/lua52/patches/patch-ab
new file mode 100644
index 00000000000..f07b7a55f87
--- /dev/null
+++ b/lang/lua52/patches/patch-ab
@@ -0,0 +1,74 @@
+$NetBSD: patch-ab,v 1.1 2013/10/30 06:18:10 dholland Exp $
+
+--- src/Makefile.orig 2012-12-27 10:51:43.000000000 +0000
++++ src/Makefile
+@@ -6,8 +6,7 @@
+ # Your platform. See PLATS for possible values.
+ PLAT= none
+
+-CC= gcc
+-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
++CFLAGS+= -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+ LIBS= -lm $(SYSLIBS) $(MYLIBS)
+
+@@ -24,23 +23,28 @@ MYLDFLAGS=
+ MYLIBS=
+ MYOBJS=
+
++.SUFFIXES: .lo
++.c.lo:
++ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c $<
++LV= 5:2
++
+ # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
+
+ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+
+-LUA_A= liblua.a
++LUA_A= liblua.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 lbitlib.o lcorolib.o ldblib.o liolib.o \
+ lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.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,14 +60,13 @@ o: $(ALL_O)
+ a: $(ALL_A)
+
+ $(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
+- $(RANLIB) $@
++ ${LIBTOOL} --tag=CC --mode=link $(CC) $(LDFLAGS) -o $@ $(BASE_O) -rpath ${PREFIX}/lib -version-info ${LV} ${LIBS}
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ ${LIBTOOL} --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} --tag=CC --mode=link $(CC) -static -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+
+ clean:
+ $(RM) $(ALL_T) $(ALL_O)
+@@ -95,7 +98,7 @@ ansi:
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_ANSI"
+
+ bsd:
+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -lreadline -lhistory"
+
+ freebsd:
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
diff --git a/lang/lua52/patches/patch-ac b/lang/lua52/patches/patch-ac
new file mode 100644
index 00000000000..bd4b27e7e6a
--- /dev/null
+++ b/lang/lua52/patches/patch-ac
@@ -0,0 +1,23 @@
+$NetBSD: patch-ac,v 1.1 2013/10/30 06:18:10 dholland Exp $
+
+--- src/luaconf.h.orig 2013-03-16 21:10:18.000000000 +0000
++++ src/luaconf.h
+@@ -100,7 +100,9 @@
+ #else /* }{ */
+
+ #define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
++#ifndef LUA_ROOT
+ #define LUA_ROOT "/usr/local/"
++#endif
+ #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
+ #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
+ #define LUA_PATH_DEFAULT \
+@@ -175,7 +177,7 @@
+ ** default definition.
+ */
+ #if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
+- defined(__ELF__) /* { */
++ defined(__ELF__) && !defined(__sun) /* { */
+ #define LUAI_FUNC __attribute__((visibility("hidden"))) extern
+ #define LUAI_DDEC LUAI_FUNC
+ #define LUAI_DDEF /* empty */