aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/obsolete/lua
diff options
context:
space:
mode:
authorGraham Gower <graham.gower@gmail.com>2010-10-10 20:24:34 +0000
committerKhem Raj <raj.khem@gmail.com>2010-10-13 21:30:27 -0700
commitbe5bc791c9808a4d39fedb4a8c4140a054f95cf9 (patch)
treef00c8da3ef9e6f1035713e525aeed6629e74441b /recipes/obsolete/lua
parentf105fe72e26fbbc91a092e1e75886239ec5d8104 (diff)
downloadopenembedded-be5bc791c9808a4d39fedb4a8c4140a054f95cf9.tar.gz
openembedded-be5bc791c9808a4d39fedb4a8c4140a054f95cf9.tar.bz2
openembedded-be5bc791c9808a4d39fedb4a8c4140a054f95cf9.zip
lua, lua-gtk2: move to obsolete.
Lua fails to build. There are newer recipes (lua5.1) in tree, only lua-gtk2 uses this old recipe and nothing uses lua-gtk2. mipsel-oe-linux-gcc -march=mips32 -o ../../bin/luac -L/mnt/oe/tmp/sysroots/mipsel-oe-linux/usr/lib -Wl,-rpath-link,/mnt/oe/tmp/sysroots/mipsel-oe-linux/usr/lib -Wl,-O1 -Wl,-E luac.o print.o lopcodes.o -L../../lib -llua -llualib -lm -ldl -lreadline luac.o: In function `strip': luac.c:(.text+0xa8): undefined reference to `luaM_realloc' luac.c:(.text+0xc4): undefined reference to `luaM_realloc' luac.c:(.text+0xdc): undefined reference to `luaM_realloc' luac.o: In function `main': luac.c:(.text+0x3f8): undefined reference to `lua_open' luac.c:(.text+0x438): undefined reference to `lua_tostring' luac.c:(.text+0x4cc): undefined reference to `luaM_realloc' luac.c:(.text+0x4f4): undefined reference to `luaM_realloc' collect2: ld returned 1 exit status make[1]: *** [../../bin/luac] Error 1 Signed-off-by: Graham Gower <graham.gower@gmail.com> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/obsolete/lua')
-rw-r--r--recipes/obsolete/lua/lua-gtk2/lua-gtk2-0.3_fixbuild.patch352
-rw-r--r--recipes/obsolete/lua/lua-gtk2_0.3.bb27
-rw-r--r--recipes/obsolete/lua/lua_5.0.2.bb18
3 files changed, 397 insertions, 0 deletions
diff --git a/recipes/obsolete/lua/lua-gtk2/lua-gtk2-0.3_fixbuild.patch b/recipes/obsolete/lua/lua-gtk2/lua-gtk2-0.3_fixbuild.patch
new file mode 100644
index 0000000000..1115b6ffb6
--- /dev/null
+++ b/recipes/obsolete/lua/lua-gtk2/lua-gtk2-0.3_fixbuild.patch
@@ -0,0 +1,352 @@
+diff -NbBur lua-gtk2-0.3_orig/configure lua-gtk2-0.3/configure
+--- lua-gtk2-0.3_orig/configure 2005-08-16 19:32:07.000000000 +0200
++++ lua-gtk2-0.3/configure 2006-05-14 02:52:39.000000000 +0200
+@@ -2,25 +2,19 @@
+
+ # examine system
+
+-CFLAGS="$(pkg-config gtk+-2.0 --cflags) $(pkg-config lua50 --cflags) -I build-linux -I src"
++CFLAGS="-g -Wall -DLINUX -Os -fomit-frame-pointer -Wall $(pkg-config gtk+-2.0 --cflags) $(pkg-config lua50 --cflags) -I build-linux -I src"
+ VERSION="0.3"
+-
+-if which gcc-4.0 > /dev/null; then
+- GCC=gcc-4.0
+-elif which gcc > /dev/null; then
+- GCC=gcc
+-else
+- @echo "No GCC found."
+- exit 1
+-fi
+-
+-if true; then
+- CFLAGS2="-DLINUX"
+- LIBS="" # -lgtk-x11-2.0"
+-else
+- CFLAGS2="-DWIN32"
+- LIBS=""
+-fi
++PREFIX="/usr/local"
++GCC=arm-linux-gcc
++HGCC=gcc
++
++#if true; then
++# CFLAGS2="-DLINUX"
++# LIBS="" # -lgtk-x11-2.0"
++#else
++# CFLAGS2="-DWIN32"
++# LIBS=""
++#fi
+
+
+ # build makefile
+@@ -28,13 +22,14 @@
+ cat > Makefile <<EOF
+ # automatically generated makefile
+
+-# CFLAGS :=-DLINUX -Os -fomit-frame-pointer -Wall $CFLAGS
++#CFLAGS := \-DLINUX -Os -fomit-frame-pointer -Wall $CFLAGS
+ # CFLAGS :=-DLINUX -O2 -fomit-frame-pointer -Wall $CFLAGS
+-CFLAGS :=$CFLAGS2 -g -Wall $CFLAGS
++CFLAGS =$CFLAGS
+ HASH :=hash2
+ ODIR :=build-linux/
+ VERSION :=$VERSION
+ CC :=$GCC
++HGCC :=$HGCC
+
+ all: \${ODIR}libluagtk2.so \${ODIR}main
+
+@@ -46,6 +41,8 @@
+ @\${CC} -shared -o \$@ $^ /usr/lib/libffi.a $LIBS
+
+ \${ODIR}generate: \${ODIR}generate.o \${ODIR}\${HASH}.o
++ @echo \$@
++ @\${HGCC} -Wall -c -g -o \$@ $^
+
+ \${ODIR}main.o: src/main.c
+ @echo \$@
+@@ -99,9 +96,9 @@
+ rm -f \${ODIR}file2c \${ODIR}override.luac \${ODIR}main
+
+ install: all
+- mkdir -p ~/.lua50
+- cp gtk2.lua ~/.lua50
+- ln -sf \$(PWD)/build-linux/libluagtk2.so ~/.lua50
++ install -d \$(DESTDIR)/\$(PREFIX)/lib/lua50
++ install gtk2.lua \$(DESTDIR)/\$(PREFIX)/lib/lua50
++ install \$(PWD)/build-linux/libluagtk2.so \$(DESTDIR)/\$(PREFIX)/lib/lua50
+
+ tar:
+ (cd ..; ln -s lua-gtk2 lua-gtk2-\${VERSION}; tar czvhf lua-gtk2-\${VERSION}.tar.gz \\
+diff -NbBur lua-gtk2-0.3_orig/configure_orig lua-gtk2-0.3/configure_orig
+--- lua-gtk2-0.3_orig/configure_orig 1970-01-01 01:00:00.000000000 +0100
++++ lua-gtk2-0.3/configure_orig 2006-05-13 18:22:03.000000000 +0200
+@@ -0,0 +1,114 @@
++#! /bin/sh
++
++# examine system
++
++CFLAGS="$(pkg-config gtk+-2.0 --cflags) $(pkg-config lua50 --cflags) -I build-linux -I src"
++VERSION="0.3"
++
++if which gcc-4.0 > /dev/null; then
++ GCC=gcc-4.0
++elif which gcc > /dev/null; then
++ GCC=gcc
++else
++ @echo "No GCC found."
++ exit 1
++fi
++
++if true; then
++ CFLAGS2="-DLINUX"
++ LIBS="" # -lgtk-x11-2.0"
++else
++ CFLAGS2="-DWIN32"
++ LIBS=""
++fi
++
++
++# build makefile
++
++cat > Makefile <<EOF
++# automatically generated makefile
++
++# CFLAGS :=-DLINUX -Os -fomit-frame-pointer -Wall $CFLAGS
++# CFLAGS :=-DLINUX -O2 -fomit-frame-pointer -Wall $CFLAGS
++CFLAGS :=$CFLAGS2 -g -Wall $CFLAGS
++HASH :=hash2
++ODIR :=build-linux/
++VERSION :=$VERSION
++CC :=$GCC
++
++all: \${ODIR}libluagtk2.so \${ODIR}main
++
++Makefile: configure
++ ./configure
++
++\${ODIR}libluagtk2.so: \${ODIR}libluagtk2.o \${ODIR}\${HASH}.o \${ODIR}hash.o \${ODIR}_funclist.o \${ODIR}_structlist.o \${ODIR}_enumlist.o \${ODIR}_override.o
++ @echo \$@
++ @\${CC} -shared -o \$@ $^ /usr/lib/libffi.a $LIBS
++
++\${ODIR}generate: \${ODIR}generate.o \${ODIR}\${HASH}.o
++
++\${ODIR}main.o: src/main.c
++ @echo \$@
++ @\${CC} -Wall -c -g -o \$@ $^ -I /usr/include/lua50
++
++\${ODIR}main: \${ODIR}main.o
++ @echo \$@
++ @\${CC} -o \$@ $^ -llua50 -llualib50
++
++\${ODIR}libluagtk2.o: src/libluagtk2.c \${ODIR}_typelist.c src/structinfo.h src/hash.h
++
++\${ODIR}_funclist.c: data/gtkdata.funcs \${ODIR}generate
++ @echo \$@
++ @\${ODIR}generate -s 4096 -o \$@ -p funclist_ -d $<
++
++\${ODIR}_structlist.c: data/gtkdata.structs.c
++ cp -f \$< \$@
++
++\${ODIR}_typelist.c: data/gtkdata.types.c
++ cp -f \$< \$@
++
++\${ODIR}_enumlist.c: data/gtkdata.enums src/extra_enum
++ @echo \$@
++ @cat $^ | \${ODIR}generate -s 1201 -o \$@ -p enumlist_ -d -f -
++
++\${ODIR}_override.c: \${ODIR}override.luac \${ODIR}file2c
++ @echo \$@
++ @\${ODIR}file2c < \$^ > \$@
++
++data/gtkdata.structs.c:
++ (cd data; ../script/gen-list.pl)
++
++build-linux/%.o: build-linux/%.c
++ @echo \$@
++ @\${CC} \${CFLAGS} -c -o \$@ \$<
++
++build-linux/%.o: src/%.c
++ @echo \$@
++ @\${CC} \${CFLAGS} -c -o \$@ \$<
++
++build-linux/%.s: src/%.c
++ @echo \$@
++ @\${CC} \${CFLAGS} -S -o \$@ \$<
++
++build-linux/%.luac: src/%.lua
++ @echo \$@
++ @luac -s -o \$@ \$<
++
++clean:
++ rm -f \${ODIR}libluagtk2.so \${ODIR}generate \${ODIR}_*.c \${ODIR}*.o
++ rm -f \${ODIR}file2c \${ODIR}override.luac \${ODIR}main
++
++install: all
++ mkdir -p ~/.lua50
++ cp gtk2.lua ~/.lua50
++ ln -sf \$(PWD)/build-linux/libluagtk2.so ~/.lua50
++
++tar:
++ (cd ..; ln -s lua-gtk2 lua-gtk2-\${VERSION}; tar czvhf lua-gtk2-\${VERSION}.tar.gz \\
++ lua-gtk2-\${VERSION} --exclude old --exclude "build-*" --exclude foreign --exclude lua50 \\
++ --exclude test-dll; rm lua-gtk2-\${VERSION})
++
++EOF
++
++mkdir -p build-linux build-win32
++
+diff -NbBur lua-gtk2-0.3_orig/gtk2.lua lua-gtk2-0.3/gtk2.lua
+--- lua-gtk2-0.3_orig/gtk2.lua 2005-08-16 19:26:14.000000000 +0200
++++ lua-gtk2-0.3/gtk2.lua 1970-01-01 01:00:00.000000000 +0100
+@@ -1,16 +0,0 @@
+-
+--- if compiled in, _gtk is set.
+-if _gtk == nil then
+-
+- local init, err = loadlib(os.getenv("HOME") .. "/.lua50/libluagtk2.so",
+- "luaopen_gtk2")
+- if err then
+- print(err)
+- return
+- end
+- gtk = init()
+-
+-else
+- gtk = _gtk
+-end
+-
+diff -NbBur lua-gtk2-0.3_orig/gtk2.lua.in lua-gtk2-0.3/gtk2.lua.in
+--- lua-gtk2-0.3_orig/gtk2.lua.in 1970-01-01 01:00:00.000000000 +0100
++++ lua-gtk2-0.3/gtk2.lua.in 2006-05-15 01:20:24.000000000 +0200
+@@ -0,0 +1,16 @@
++
++-- if compiled in, _gtk is set.
++if _gtk == nil then
++
++ local init, err = loadlib("PREFIX/lib/lua50/libluagtk2.so",
++ "luaopen_gtk2")
++ if err then
++ print(err)
++ return
++ end
++ gtk = init()
++
++else
++ gtk = _gtk
++end
++
+diff -NbBur lua-gtk2-0.3_orig/Makefile lua-gtk2-0.3/Makefile
+--- lua-gtk2-0.3_orig/Makefile 2005-08-16 19:32:08.000000000 +0200
++++ lua-gtk2-0.3/Makefile 2006-05-16 03:09:41.000000000 +0200
+@@ -1,31 +1,46 @@
+ # automatically generated makefile
+
+-# CFLAGS :=-DLINUX -Os -fomit-frame-pointer -Wall -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include//lua50 -I build-linux -I src
+-# CFLAGS :=-DLINUX -O2 -fomit-frame-pointer -Wall -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include//lua50 -I build-linux -I src
+-CFLAGS :=-DLINUX -g -Wall -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include//lua50 -I build-linux -I src
++PACKAGE_CFLAGS =-g -Wall -DLINUX -Os -fomit-frame-pointer -Wall -DXTHREADS -DXUSE_MTSAFE_API `pkg-config --cflags gtk+-2.0`
+ HASH :=hash2
+ ODIR :=build-linux/
+ VERSION :=0.3
+-CC :=gcc-4.0
++CC :=arm-linux-gcc
++HGCC :=gcc
++PREFIX := /usr/local
++LIBDIR := $(PREFIX)/lib/
+
+-all: ${ODIR}libluagtk2.so ${ODIR}main
++all: ${ODIR}libluagtk2.so ${ODIR}main gtk2.lua
+
+-Makefile: configure
+- ./configure
++%.lua %.lua.in:
++ sed 's:PREFIX:$(PREFIX):' < '$@.in' > $@
+
+ ${ODIR}libluagtk2.so: ${ODIR}libluagtk2.o ${ODIR}${HASH}.o ${ODIR}hash.o ${ODIR}_funclist.o ${ODIR}_structlist.o ${ODIR}_enumlist.o ${ODIR}_override.o
+ @echo $@
+- @${CC} -shared -o $@ $^ /usr/lib/libffi.a
++ @${CC} -shared -o $@ $^ ${LIBDIR}/libffi.a
+
+-${ODIR}generate: ${ODIR}generate.o ${ODIR}${HASH}.o
++${ODIR}file2c:
++ @echo $@
++ @${HGCC} -o $@ src/file2c.c
++
++${ODIR}generate.o:
++ @echo $@
++ @${HGCC} -c -o $@ src/generate.c
++
++${ODIR}${HASH}_host.o:
++ @echo $@
++ @${HGCC} -c -o $@ src/${HASH}.c
++
++${ODIR}generate: ${ODIR}generate.o ${ODIR}${HASH}_host.o
++ @echo $@
++ @${HGCC} -Wall -g -o $@ $^
+
+ ${ODIR}main.o: src/main.c
+ @echo $@
+- @${CC} -Wall -c -g -o $@ $^ -I /usr/include/lua50
++ @${HGCC} $(CFLAGS) -Wall -c -g -o $@ $^ -I /usr/include/lua50
+
+ ${ODIR}main: ${ODIR}main.o
+ @echo $@
+- @${CC} -o $@ $^ -llua50 -llualib50
++ @${HGCC} $(CFLAGS) $(PACKAGE_CFLAGS) -o $@ $^ -llua -llualib
+
+ ${ODIR}libluagtk2.o: src/libluagtk2.c ${ODIR}_typelist.c src/structinfo.h src/hash.h
+
+@@ -52,15 +67,15 @@
+
+ build-linux/%.o: build-linux/%.c
+ @echo $@
+- @${CC} ${CFLAGS} -c -o $@ $<
++ @${CC} $(PACKAGE_CFLAGS) $(CFLAGS) -c -o $@ $<
+
+ build-linux/%.o: src/%.c
+ @echo $@
+- @${CC} ${CFLAGS} -c -o $@ $<
++ @${CC} $(PACKAGE_CFLAGS) $(CFLAGS) -c -o $@ $<
+
+ build-linux/%.s: src/%.c
+ @echo $@
+- @${CC} ${CFLAGS} -S -o $@ $<
++ @${CC} $(PACKAGE_CFLAGS) $(CFLAGS) -S -o $@ $<
+
+ build-linux/%.luac: src/%.lua
+ @echo $@
+@@ -68,12 +83,13 @@
+
+ clean:
+ rm -f ${ODIR}libluagtk2.so ${ODIR}generate ${ODIR}_*.c ${ODIR}*.o
+- rm -f ${ODIR}file2c ${ODIR}override.luac ${ODIR}main
++ rm -f ${ODIR}file2c ${ODIR}override.luac ${ODIR}main gtk2.lua
+
+ install: all
+- mkdir -p ~/.lua50
+- cp gtk2.lua ~/.lua50
+- ln -sf $(PWD)/build-linux/libluagtk2.so ~/.lua50
++ install -d $(DESTDIR)/$(PREFIX)/share/lua
++ install gtk2.lua $(DESTDIR)/$(PREFIX)/share/lua
++ install -d $(DESTDIR)/$(PREFIX)/lib/lua50
++ install $(PWD)/build-linux/libluagtk2.so $(DESTDIR)/$(PREFIX)/lib/lua50
+
+ tar:
+ (cd ..; ln -s lua-gtk2 lua-gtk2-${VERSION}; tar czvhf lua-gtk2-${VERSION}.tar.gz \
+diff -NbBur lua-gtk2-0.3_orig/src/libluagtk2.c lua-gtk2-0.3/src/libluagtk2.c
+--- lua-gtk2-0.3_orig/src/libluagtk2.c 2005-08-16 18:22:00.000000000 +0200
++++ lua-gtk2-0.3/src/libluagtk2.c 2006-05-15 01:31:09.000000000 +0200
+@@ -27,9 +27,9 @@
+
+ static const char *dll_list[] = {
+ #ifdef LINUX
+- "/usr/lib/libgtk-x11-2.0.so",
+- "/usr/lib/libgdk-x11-2.0.so",
+- "/usr/lib/libpango-1.0.so",
++ "/usr/lib/libgtk-x11-2.0.so.0",
++ "/usr/lib/libgdk-x11-2.0.so.0",
++ "/usr/lib/libpango-1.0.so.0",
+ #endif
+ #ifdef WIN32
+ "C:/GTK/bin/libgtk-win32-2.0-0.dll",
diff --git a/recipes/obsolete/lua/lua-gtk2_0.3.bb b/recipes/obsolete/lua/lua-gtk2_0.3.bb
new file mode 100644
index 0000000000..355ef93c58
--- /dev/null
+++ b/recipes/obsolete/lua/lua-gtk2_0.3.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "GTK bindings for LUA"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+DEPENDS = "gtk+ lua-native perl-native readline libffi"
+RDEPENDS_${PN} = "lua"
+PR = "r1"
+
+inherit gpe
+
+SRC_URI = "http://luaforge.net/frs/download.php/989/${P}.tar.gz \
+ file://lua-gtk2-0.3_fixbuild.patch"
+
+FILES_${PN} = "${datadir}/lua ${libdir}/lua50"
+
+CFLAGS_append = " -I '${S}/build-linux' -I src -DLINUX -I${STAGING_INCDIR} -L${STAGING_LIBDIR} -L${STAGING_LIBDIR_NATIVE}"
+
+do_compile () {
+ oe_runmake PREFIX='${prefix}' HGCC='${BUILD_CC}' LIBDIR='${STAGING_LIBDIR}' ODIR='build-linux/' CFLAGS='${CFLAGS}'
+}
+
+do_configure_append () {
+ cd ${S} && mkdir build-linux
+}
+
+SRC_URI[md5sum] = "a2788c45d60ef8ce30168811d7e72334"
+SRC_URI[sha256sum] = "b3dd85e34b22cf757eafb6ef15c5505d5ec5e71803caef4b69ddc7fd5d46fabe"
diff --git a/recipes/obsolete/lua/lua_5.0.2.bb b/recipes/obsolete/lua/lua_5.0.2.bb
new file mode 100644
index 0000000000..e23ed89fff
--- /dev/null
+++ b/recipes/obsolete/lua/lua_5.0.2.bb
@@ -0,0 +1,18 @@
+require lua.inc
+
+DEPENDS += "readline"
+PR = "r5"
+SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
+ file://debian.patch \
+ file://make.patch \
+ file://advanced-readline.patch"
+# http://lua-users.org/files/wiki_insecure/power_patches/5.0/advanced-readline.patch"
+S = "${WORKDIR}/lua-${PV}"
+
+require lua-build.inc
+inherit binconfig
+NATIVE_INSTALL_WORKS = 1
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "dea74646b7e5c621fef7174df83c34b1"
+SRC_URI[sha256sum] = "a6c85d85f912e1c321723084389d63dee7660b81b8292452b190ea7190dd73bc"