diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-27 08:13:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-04-27 08:14:22 +0000 |
commit | 8a8d04916305d3f9109c3fe93a028d3113d4aa4f (patch) | |
tree | 56a1e7228478a38e2b683864dbfdb48b61e43e05 | |
parent | 7c2a2e0722a11b7b5aa8c530025854a1c2f3be29 (diff) | |
download | aports-8a8d04916305d3f9109c3fe93a028d3113d4aa4f.tar.bz2 aports-8a8d04916305d3f9109c3fe93a028d3113d4aa4f.tar.xz |
main/lua5.1: fixes for newer libtool
-rw-r--r-- | main/lua5.1/APKBUILD | 52 | ||||
-rw-r--r-- | main/lua5.1/lua-5.1-make.patch | 69 |
2 files changed, 79 insertions, 42 deletions
diff --git a/main/lua5.1/APKBUILD b/main/lua5.1/APKBUILD index b30643429e..20ef64c566 100644 --- a/main/lua5.1/APKBUILD +++ b/main/lua5.1/APKBUILD @@ -2,13 +2,13 @@ pkgname=lua5.1 pkgver=5.1.5 _ver=$pkgver -pkgrel=0 +pkgrel=1 pkgdesc="A powerful light-weight programming language designed for extending applications." url="http://www.lua.org/" arch="all" license="MIT" depends= -makedepends="libtool" +makedepends="libtool autoconf automake" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" source="http://www.lua.org/ftp/lua-$_ver.tar.gz lua-5.1-make.patch @@ -17,7 +17,7 @@ source="http://www.lua.org/ftp/lua-$_ver.tar.gz " _builddir="$srcdir"/lua-$_ver -build() { +prepare() { cd "$_builddir" for i in $source; do case $i in @@ -28,24 +28,46 @@ build() { 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 + # correct lua versioning + sed -i -e 's/\(LIB_VERSION = \).*/\16:4:1/' src/Makefile + + # we use libtool + cat >configure.ac <<EOF +top_buildir=. + +AC_INIT(src/luaconf.h) +AC_PROG_LIBTOOL +AC_OUTPUT() +EOF + libtoolize --force --install && aclocal && autoconf +} + +build() { + cd "$_builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + || return 1 + + cd "$_builddir"/src make CFLAGS=" -DLUA_USE_LINUX $CFLAGS" \ RPATH="/usr/lib" \ LIB_LIBS="-lpthread -lm -ldl" \ V=$pkgver \ - gentoo_all || return 1 + alpine_all || return 1 } package() { cd "$_builddir" - make INSTALL_TOP="$pkgdir"/usr INSTALL_LIB="$pkgdir"/usr/lib \ - V=$pkgver gentoo_install || return 1 + make V=$pkgver \ + INSTALL_TOP="$pkgdir"/usr \ + INSTALL_INC="$pkgdir"/usr/include \ + INSTALL_LIB="$pkgdir"/usr/lib \ + alpine_install || return 1 rm "$pkgdir"/usr/lib/*.la || return 1 for i in "$pkgdir"/usr/bin/*; do @@ -71,6 +93,14 @@ libs() { md5sums="2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz -0145ff6036eb6bfdab427dc8f0c3f3c0 lua-5.1-make.patch +7fa6ce1f09e18415f2ba00db437f2804 lua-5.1-make.patch e60ef15deefb72a5930c498f1184aced lua-5.1-module_paths.patch f2205b897edb31292a1f597a7fd638cb lua-5.1-readline.patch" +sha256sums="2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 lua-5.1.5.tar.gz +99a709038b0910edff3e40a2d368f35abe8eebbd699ee06aea4005de401ce843 lua-5.1-make.patch +1115b6aa00eb4e918156ae70c763534bd2f603ba888da75e4908c19c2ac3e5f7 lua-5.1-module_paths.patch +1f0f90eb8103e338f1188cc884c0c59cc6afd023828c11d86b8145b2a8d1efc2 lua-5.1-readline.patch" +sha512sums="0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9 lua-5.1.5.tar.gz +ec5945f9f73d87fceaaa2418f1dc5c0f1e2ab1392e3a110e9ca737bfd122a951543899cd9b6170771374c35de8dd106f7b51ba9885eae281241c79b47ee58370 lua-5.1-make.patch +123b115389d01d383af8698d2ed66c75bb7c3e2d33de57b8539ae56a9478930a0a72fa5657e78cc1c5b6bef00d07ec3a51e19ec0e419647e84eb158fb5c4795a lua-5.1-module_paths.patch +a99154258419dc2e582804eae97517687e5b8b5f731dc91722193d1ff470b8522af6ff4e7142c9258afe4734cd52e6987d3c2108ac52b1487a262f1e89f2f332 lua-5.1-readline.patch" diff --git a/main/lua5.1/lua-5.1-make.patch b/main/lua5.1/lua-5.1-make.patch index d051a21cb6..2db6367a3e 100644 --- a/main/lua5.1/lua-5.1-make.patch +++ b/main/lua5.1/lua-5.1-make.patch @@ -1,37 +1,47 @@ ---- 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 +--- ./Makefile.orig ++++ ./Makefile +@@ -126,3 +126,18 @@ + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho # (end of Makefile) + +# Use libtool for binary installs, etc. + +export V -+export LIBTOOL = libtool --quiet --tag=CC ++export LIBTOOL = ../libtool --quiet --tag=CC +# See libtool manual about how to set this + -+gentoo_clean: ++alpine_clean: + cd src; $(MAKE) $@ + -+gentoo_test: gentoo_linux -+ test/lua.static test/hello.lua -+ -+gentoo_install: ++alpine_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 +--- ./src/Makefile.orig ++++ ./src/Makefile +@@ -51,10 +51,10 @@ + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files + $(RANLIB) $@ - # (end of Makefile) +-$(LUA_T): $(LUA_O) $(LUA_A) ++origin$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) ++origin$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + clean: +@@ -178,5 +178,34 @@ + lzio.h + print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \ + ltm.h lzio.h lmem.h lopcodes.h lundump.h + -+export LIBTOOL = libtool --quiet --tag=CC -+export LIB_VERSION = 6:1:1 ++ ++export LIBTOOL = ../libtool --quiet --tag=CC ++export LIB_VERSION = 0:0:0 + +# The following rules use libtool for compiling and linking in order to +# provide shared library support. @@ -44,21 +54,18 @@ + +$(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 ++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) + -+lua_test: $(LUA_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) ++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS) + -+$(LUAC_T): $(LUAC_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) ++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME) + -+gentoo_clean: ++alpine_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) ++alpine_all: $(LIB_NAME) $(LUA_T) $(LUAC_T) ++ + + # (end of Makefile) |