ports/opt (3.0): [notify] lua51: initial import Please update your ports that require this older version of lua to use lua51 for depends on, and make sure it searches for lua5.1 instead of lua on pkg-config
commit 2b1ca3f91aab3b9f530f12e2ba4e377c1e8f63f6 Author: Danny Rawlins <monster.romster@gmail.com> Date: Thu May 30 17:07:34 2013 +1000 [notify] lua51: initial import Please update your ports that require this older version of lua to use lua51 for depends on, and make sure it searches for lua5.1 instead of lua on pkg-config diff --git a/lua51/.footprint b/lua51/.footprint new file mode 100644 index 0000000..b4ee277 --- /dev/null +++ b/lua51/.footprint @@ -0,0 +1,29 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/lua5.1 +-rwxr-xr-x root/root usr/bin/luac5.1 +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/lua5.1/ +-rw-r--r-- root/root usr/include/lua5.1/lauxlib.h +-rw-r--r-- root/root usr/include/lua5.1/lua.h +-rw-r--r-- root/root usr/include/lua5.1/lua.hpp +-rw-r--r-- root/root usr/include/lua5.1/luaconf.h +-rw-r--r-- root/root usr/include/lua5.1/lualib.h +drwxr-xr-x root/root usr/lib/ +lrwxrwxrwx root/root usr/lib/liblua.so.5.1 -> liblua5.1.so +lrwxrwxrwx root/root usr/lib/liblua.so.5.1.5 -> liblua5.1.so +-rw-r--r-- root/root usr/lib/liblua5.1.a +lrwxrwxrwx root/root usr/lib/liblua5.1.so -> liblua5.1.so.5.1.5 +lrwxrwxrwx root/root usr/lib/liblua5.1.so.5.1 -> liblua5.1.so.5.1.5 +-rwxr-xr-x root/root usr/lib/liblua5.1.so.5.1.5 +drwxr-xr-x root/root usr/lib/lua/ +drwxr-xr-x root/root usr/lib/lua/5.1/ +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/lua5.1.pc +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man1/ +-rw-r--r-- root/root usr/man/man1/lua5.1.1.gz +-rw-r--r-- root/root usr/man/man1/luac5.1.1.gz +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/lua/ +drwxr-xr-x root/root usr/share/lua/5.1/ diff --git a/lua51/.md5sum b/lua51/.md5sum new file mode 100644 index 0000000..de74b47 --- /dev/null +++ b/lua51/.md5sum @@ -0,0 +1,3 @@ +249582bf1fd861ccf492d2c35a9fe732 lua-5.1-cflags.diff +2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz +fa25feb70ef9fec975b1c20da5098b3c lua.diff diff --git a/lua51/Pkgfile b/lua51/Pkgfile new file mode 100644 index 0000000..7b25f56 --- /dev/null +++ b/lua51/Pkgfile @@ -0,0 +1,51 @@ +# Description: A programming language designed for extending applications. +# URL: http://www.lua.org/ +# Maintainer: Danny Rawlins, monster dot romster at gmail dot com +# Packager: Tilman Sauerbeck, tilman at crux dot nu +# Depends on: readline + +name=lua51 +version=5.1.5 +release=1 +source=(http://www.lua.org/ftp/lua-$version.tar.gz + lua.diff lua-5.1-cflags.diff) + +build() { + cd lua-$version + + patch -p1 -i $SRC/lua.diff + patch -p1 -i $SRC/lua-5.1-cflags.diff + export CFLAGS="$CFLAGS -fPIC" + + sed \ + -e 's|llua|llua5.1|' \ + -e 's|/include|/include/lua5.1|' \ + -i etc/lua.pc + + sed -r \ + -e '/^LUA_(SO|A|T)=/ s/lua/lua5.1/' \ + -e '/^LUAC_T=/ s/luac/luac5.1/' \ + -i src/Makefile + + make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux + + install -d $PKG/usr/include/lua5.1 $PKG/usr/man/man1 $PKG/usr/lib + + make \ + TO_BIN="lua5.1 luac5.1" \ + TO_LIB="liblua5.1.a liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.$version" \ + INSTALL_DATA='cp -d' \ + INSTALL_TOP="$PKG/usr" \ + INSTALL_INC="$PKG/usr/include/lua5.1" \ + INSTALL_MAN="$PKG/usr/man/man1" \ + install + + install -m 0644 -D etc/lua.pc $PKG/usr/lib/pkgconfig/lua5.1.pc + + # fixups + ln -s liblua5.1.so $PKG/usr/lib/liblua.so.5.1 + ln -s liblua5.1.so $PKG/usr/lib/liblua.so.$version + cd $PKG/usr/man/man1 + mv lua.1 lua5.1.1 + mv luac.1 luac5.1.1 +} diff --git a/lua51/lua-5.1-cflags.diff b/lua51/lua-5.1-cflags.diff new file mode 100644 index 0000000..db658ae --- /dev/null +++ b/lua51/lua-5.1-cflags.diff @@ -0,0 +1,13 @@ +diff -Naur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile +--- lua-5.1.orig/src/Makefile 2006-02-16 16:45:09.000000000 +0100 ++++ lua-5.1/src/Makefile 2006-03-01 14:55:29.000000000 +0100 +@@ -8,7 +8,8 @@ + PLAT= none + + CC= gcc +-CFLAGS= -O2 -Wall $(MYCFLAGS) ++CFLAGS ?= -O2 -Wall ++CFLAGS += $(MYCFLAGS) + AR= ar rcu + RANLIB= ranlib + RM= rm -f diff --git a/lua51/lua.diff b/lua51/lua.diff new file mode 100644 index 0000000..d8650c3 --- /dev/null +++ b/lua51/lua.diff @@ -0,0 +1,66 @@ +diff -ur lua-5.1.4/etc/lua.pc lua-5.1.4-new/etc/lua.pc +--- lua-5.1.4/etc/lua.pc 2008-08-08 14:46:11.000000000 +0200 ++++ lua-5.1.4-new/etc/lua.pc 2012-02-23 18:25:34.000000000 +0100 +@@ -8,6 +8,6 @@ + + # 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 -ur lua-5.1.4/src/luaconf.h lua-5.1.4-new/src/luaconf.h +--- lua-5.1.4/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100 ++++ lua-5.1.4-new/src/luaconf.h 2012-02-23 18:25:34.000000000 +0100 +@@ -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 \ +diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile +--- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100 ++++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100 +@@ -23,6 +23,7 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.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 +@@ -36,7 +37,7 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) + ALL_A= $(LUA_A) + + default: $(PLAT) +@@ -51,6 +52,11 @@ + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +--- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200 ++++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100 +@@ -53,7 +53,7 @@ + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ V=$(V) R=$(R) + + test: dummy + src/lua test/hello.lua
participants (1)
-
crux@crux.nu