Browse Source

lua: added autotools based build system

user/amery/next/uclibc
Christian Wiese 13 years ago
parent
commit
77a3cd12e2
  1. 36
      lua/lua/ar.patch
  2. 2560
      lua/lua/lua-5.1.4-autotoolize.patch
  3. 36
      lua/lua/lua.conf
  4. 37
      lua/lua/no-readline.diff

36
lua/lua/ar.patch

@ -1,36 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../lua/ar.patch
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- ./src/Makefile.orig 2009-05-12 23:25:09.000000000 +0000
+++ ./src/Makefile 2009-05-12 23:25:41.000000000 +0000
@@ -9,7 +9,7 @@
CC= gcc
CFLAGS= -O2 -Wall $(MYCFLAGS)
-AR= ar rcu
+AR= ar
RANLIB= ranlib
RM= rm -f
LIBS= -lm $(MYLIBS)
@@ -48,7 +48,7 @@
a: $(ALL_A)
$(LUA_A): $(CORE_O) $(LIB_O)
- $(AR) $@ $?
+ $(AR) rcu $@ $?
$(RANLIB) $@
$(LUA_T): $(LUA_O) $(LUA_A)

2560
lua/lua/lua-5.1.4-autotoolize.patch

File diff suppressed because it is too large Load Diff

36
lua/lua/lua.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../lua/lua.conf
# Copyright (C) 2008 - 2011 The OpenSDE Project
# Copyright (C) 2008 - 2012 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -13,40 +13,14 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# FIXME also build and install swig runtime
# we patch in autotools support
autogen=1
# choose platform
var_append makeopt ' ' 'linux'
# packages support
pkginstalled readline || var_append patchfiles ' ' "$confdir/no-readline.diff"
# adjust installation path
var_append makeinstopt ' ' "INSTALL_TOP=$root/$prefix"
lua_conf() {
local LUA_ROOT="${prefix:+/$prefix}/"
local LUA_LDIR="LUA_ROOT \"${luadatadir#$LUA_ROOT}/\""
local LUA_CDIR="LUA_ROOT \"${lualibdir#$LUA_ROOT}/\""
LUA_ROOT="\"$LUA_ROOT\""
sed -i -e "s,^\(#define LUA_ROOT[ \t]\+\)[^ \t].*,\1$LUA_ROOT," \
-e "s,^\(#define LUA_LDIR[ \t]\+\)[^ \t].*,\1$LUA_LDIR," \
-e "s,^\(#define LUA_CDIR[ \t]\+\)[^ \t].*,\1$LUA_CDIR," \
src/luaconf.h
}
hook_add premake 3 lua_conf
# create missing directories and copy documentation
# create missing directories
lua_postmake() {
for x in "$lualibdir" "$luadatadir" "$libdir/pkgconfig"; do
for x in "$lualibdir" "$luadatadir"; do
mkdir -p "$root$x"
done
cp -v doc/* "$root$docdir"
sed -e "s:/usr/local:/$prefix:" etc/lua.pc > "$root$libdir/pkgconfig/lua.pc"
}
hook_add postmake 3 lua_postmake

37
lua/lua/no-readline.diff

@ -1,37 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../lua/no-readline.diff
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- ./src/luaconf.h.orig 2009-05-12 23:27:14.000000000 +0000
+++ ./src/luaconf.h 2009-05-12 23:27:36.000000000 +0000
@@ -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)
--- ./src/Makefile.orig 2009-05-12 23:26:21.000000000 +0000
+++ ./src/Makefile 2009-05-12 23:26:53.000000000 +0000
@@ -96,7 +96,7 @@
$(MAKE) all MYCFLAGS=
linux:
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lncurses"
macosx:
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
Loading…
Cancel
Save