diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-21 06:02:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-21 06:06:27 +0000 |
commit | 054735fd9e37e2b9ce3f2752b658e6d2fffafda7 (patch) | |
tree | 9fd3acd02fab7d6c719a06fd8fc378a96693ff94 /main/lua | |
parent | 659ace475ea5f55b1faa1a8de4430866bf4b4d85 (diff) | |
download | aports-054735fd9e37e2b9ce3f2752b658e6d2fffafda7.tar.bz2 aports-054735fd9e37e2b9ce3f2752b658e6d2fffafda7.tar.xz |
main/lua5.1: new aport. symlink 'lua' to this
Diffstat (limited to 'main/lua')
-rw-r--r-- | main/lua/APKBUILD | 70 | ||||
-rw-r--r-- | main/lua/lua-5.1-make.patch | 64 | ||||
-rw-r--r-- | main/lua/lua-5.1-module_paths.patch | 30 | ||||
-rw-r--r-- | main/lua/lua-5.1-readline.patch | 10 |
4 files changed, 20 insertions, 154 deletions
diff --git a/main/lua/APKBUILD b/main/lua/APKBUILD index a241434f8c..0bc8db9be1 100644 --- a/main/lua/APKBUILD +++ b/main/lua/APKBUILD @@ -1,67 +1,37 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lua pkgver=5.1.5 -_ver=$pkgver -pkgrel=1 +pkgrel=2 pkgdesc="A powerful light-weight programming language designed for extending applications." url="http://www.lua.org/" arch="all" license="MIT" depends= -makedepends="libtool" -subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" -source="http://www.$pkgname.org/ftp/$pkgname-$_ver.tar.gz - lua-5.1-make.patch - lua-5.1-module_paths.patch - lua-5.1-readline.patch - " +makedepends="lua5.1-dev" +subpackages="$pkgname-dev $pkgname-doc" +source="" -_builddir="$srcdir"/lua-$_ver -build () -{ - cd "$_builddir" - for i in $source; do - case $i in - patch*|*.patch) - msg "Applying $i" - patch -p1 -i "$srcdir"/$i || return 1 - ;; - esac - done - - # correct lua versioning - sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:4:1/' src/Makefile - - # we want packages to find our things - sed -i -e 's:/usr/local:/usr:' etc/lua.pc - - cd src - make CFLAGS=" -DLUA_USE_LINUX $CFLAGS" \ - RPATH="/usr/lib" \ - LIB_LIBS="-lpthread -lm -ldl" \ - V=$pkgver \ - gentoo_all || return 1 +build() { + return 0 } package() { - cd "$_builddir" - make INSTALL_TOP="$pkgdir"/usr INSTALL_LIB="$pkgdir"/usr/lib \ - V=$pkgver gentoo_install || return 1 - rm "$pkgdir"/usr/lib/*.la || return 1 + mkdir -p "$pkgdir"/usr/bin + ln -s lua5.1 "$pkgdir"/usr/bin/lua +} - install -D -m 644 etc/lua.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc - install -D -m 644 doc/lua.1 "$pkgdir"/usr/share/man/man1/lua.1 - install -D -m 644 doc/luac.1 "$pkgdir"/usr/share/man/man1/luac.1 +dev() { + depends="lua5.1-dev" + mkdir -p "$subpkgdir"/usr/lib/pkgconfig + ln -s lua5.1.pc "$subpkgdir"/usr/lib/pkgconfig/lua.pc } -libs() { - pkgdesc="Lua dynamic library runtime" - replaces="lua" - mkdir -p "$subpkgdir"/usr - mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ +doc() { + depends="lua5.2-doc" + mkdir -p "$subpkgdir"/usr/share/man/man1 + ln -s lua5.1.1 "$subpkgdir"/usr/share/man/man1/lua.1 + ln -s luac5.1.1 "$subpkgdir"/usr/share/man/man1/luac.1 } -md5sums="2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz -0145ff6036eb6bfdab427dc8f0c3f3c0 lua-5.1-make.patch -e60ef15deefb72a5930c498f1184aced lua-5.1-module_paths.patch -f2205b897edb31292a1f597a7fd638cb lua-5.1-readline.patch" + + diff --git a/main/lua/lua-5.1-make.patch b/main/lua/lua-5.1-make.patch deleted file mode 100644 index d051a21cb6..0000000000 --- a/main/lua/lua-5.1-make.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200 -+++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100 -@@ -127,3 +127,22 @@ - .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho newer - - # (end of Makefile) -+ -+# Use libtool for binary installs, etc. -+ -+export V -+export LIBTOOL = libtool --quiet --tag=CC -+# See libtool manual about how to set this -+ -+gentoo_clean: -+ cd src; $(MAKE) $@ -+ -+gentoo_test: gentoo_linux -+ test/lua.static test/hello.lua -+ -+gentoo_install: -+ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) -+ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN) -+ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) -+ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB) -+ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.a $(INSTALL_LIB) ---- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100 -+++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100 -@@ -176,3 +176,36 @@ - ltm.h lzio.h lmem.h lopcodes.h lundump.h - - # (end of Makefile) -+ -+export LIBTOOL = libtool --quiet --tag=CC -+export LIB_VERSION = 6:1:1 -+ -+# The following rules use libtool for compiling and linking in order to -+# provide shared library support. -+ -+LIB_NAME = liblua.la -+LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) -+ -+%.lo %.o: %.c -+ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -+ -+$(LIB_NAME): $(LIB_OBJS) -+ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ -+ -rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) -+ -+$(LIB_NAME:.la=.a): $(LIB_OBJS) -+ $(LIBTOOL) --mode=link $(CC) -static -o $(LIB_NAME:.la=.a) $(LIB_OBJS) -+ -+$(LUA_T): $(LUA_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -Wl,-E -o $@ $(LUA_O) $(LUA_LIBS) -llua -+ -+lua_test: $(LUA_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) -+ -+$(LUAC_T): $(LUAC_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) -+ -+gentoo_clean: -+ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac -+ -+gentoo_all: $(LIB_NAME) $(LIB_NAME:.la=.a) $(LUA_T) lua_test $(LUAC_T) diff --git a/main/lua/lua-5.1-module_paths.patch b/main/lua/lua-5.1-module_paths.patch deleted file mode 100644 index 29ac4c3bf4..0000000000 --- a/main/lua/lua-5.1-module_paths.patch +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## src_luaconf.h.dpatch by John V. Belmonte <jbelmonte@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Set Lua's default PATH and CPATH. - -@DPATCH@ -diff -urNad trunk~/src/luaconf.h trunk/src/luaconf.h ---- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500 -+++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500 -@@ -83,13 +83,17 @@ - - #else - #define LUA_ROOT "/usr/local/" -+#define LUA_ROOT2 "/usr/" - #define LUA_LDIR LUA_ROOT "share/lua/5.1/" -+#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" - #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -+#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" - #define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ -- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" -+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ -+ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" - #define LUA_CPATH_DEFAULT \ -- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" -+ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" - #endif - - diff --git a/main/lua/lua-5.1-readline.patch b/main/lua/lua-5.1-readline.patch deleted file mode 100644 index f144861efb..0000000000 --- a/main/lua/lua-5.1-readline.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- lua-5.1.1.orig/src/luaconf.h 2006-04-10 20:27:23.000000000 +0200 -+++ lua-5.1.1/src/luaconf.h 2006-11-15 14:53:07.000000000 +0100 -@@ -36,7 +36,6 @@ - #if defined(LUA_USE_LINUX) - #define LUA_USE_POSIX - #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ --#define LUA_USE_READLINE /* needs some extra libraries */ - #endif - - #if defined(LUA_USE_MACOSX) |