OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 08-Jun-2008 15:18:43
Branch: HEAD Handle: 2008060814184200
Added files:
openpkg-src/lua-curl lua-curl.patch
Log:
add missing patch to CVS
Summary:
Revision Changes Path
1.1 +85 -0 openpkg-src/lua-curl/lua-curl.patch
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/lua-curl/lua-curl.patch
============================================================================
$ cvs diff -u -r0 -r1.1 lua-curl.patch
--- /dev/null 2008-06-08 15:18:19 +0200
+++ lua-curl.patch 2008-06-08 15:18:43 +0200
@@ -0,0 +1,85 @@
+Index: Makefile
+--- Makefile.orig 2007-02-15 17:08:56 +0100
++++ Makefile 2008-06-08 15:16:36 +0200
+@@ -1,36 +1,34 @@
+ # TODO: support for abi&libtool, installation of lua-curl.h
+
+-LIBNAME=liblua5.1-curl
++LIBNAME=libcurl
+ LIBTOOL=libtool --silent --tag=CC
+-HEADER=/usr/include/curl/curl.h
++HEADER=$(PREFIX)/include/curl/curl.h
+ PREFIX=/usr/local/
+ #LUA=lua50
+-LUA=lua5.1
+-LUADOC= luadoc
++LUA=$(PREFIX)/bin/lua
++LUADOC= $(PREFIX)/bin/luadoc
+ VERSION_INFO=0:0:0
+
+ CONSTANTS:= curlopt.h curl_netrcopt.h curl_form.h curl_authopt.h
+-CURL_CFLAGS:= $(shell curl-config --cflags 2>/dev/null) $(shell getconf
LFS_CFLAGS)
++CURL_CFLAGS:= $(shell curl-config --cflags 2>/dev/null)
+ CURL_LDFLAGS:= $(shell curl-config --libs 2>/dev/null)
+ REALSO:=$(LIBNAME).so.$(subst :,.,$(VERSION_INFO))
+
+ # ------------------------------ lua5.1 stuff
---------------------------------
+-ifeq "$(LUA)" "lua5.1"
+-LUA_CFLAGS := $(shell pkg-config lua5.1 --cflags) $(shell getconf
LFS_CFLAGS)
++LUA_CFLAGS := $(shell pkg-config lua --cflags)
+ # This retrieves the name of the libtool convenience library for Lua
+ # (e.g. "/usr/lib/liblua5.1.la") used by --mode=link.
+-LUA_LIBTOOL_S := $(shell pkg-config lua5.1 --variable=libtool_lib)
++LUA_LIBTOOL_S := $(shell pkg-config lua --variable=libtool_lib)
+ LUA_LIBTOOL_D := $(LUA_LIBTOOL_S)
+ # this is the path where you'll eventually install the module
+-LUA_RPATH:=$(shell pkg-config lua5.1 --define-variable=prefix=$(PREFIX) \
++LUA_RPATH:=$(shell pkg-config lua --define-variable=prefix=$(PREFIX) \
+ --variable=INSTALL_CMOD)
+ # this is the path where you'll eventually install the C header file
+-LUA_HPATH:=$(shell pkg-config lua5.1 --define-variable=prefix=$(PREFIX) \
+- --variable=includedir)/lua5.1
++LUA_HPATH:=$(shell pkg-config lua --define-variable=prefix=$(PREFIX) \
++ --variable=includedir)/lua
+ LUA_DPATH:=$(PREFIX)/share/doc/luacurl/
+ LUA_LPATH:=$(PREFIX)/lib/
+-OBJS:= lua-curl.lo luabind.lo
+-endif
++OBJS:= lua-curl.o luabind.o
+
+ # ------------------------------ lua50 stuff
---------------------------------
+ ifeq "$(LUA)" "lua50"
+@@ -46,7 +44,7 @@
+ endif
+
+ # ------------------------- Here the Makefile
--------------------------------
+-all: $(LIBNAME).la
++all: curl.so
+ constants:$(CONSTANTS)
+ doc: doc/curl.html
+ doc/curl.html: lua-curl.luadoc
+@@ -54,20 +52,16 @@
+ $(LUADOC) -d `pwd`/doc/ `pwd`/doc/*.lua
+ rm -f doc/*.lua doc/index.html
+
+-%.lo: %.c
+- $(LIBTOOL) --mode=compile $(CC) -c -Wall -O2 $(LUA_CFLAGS) $<
++%.o: %.c
++ $(CC) -c -Wall -O2 -fPIC $(CURL_CFLAGS) $(LUA_CFLAGS) $<
+
+ # link objects to make static and dynamic libraries. The .so will be
+ # left in "./.libs/". Note that the Lua library and its dependencies are
+ # not called out on the link line since they are assumed to be part of
+ # whatever our library is linked to. We want to avoid duplicate library
+ # copies, which is a waste of space and can cause run-time problems.
+-$(LIBNAME).la curl.so: constants $(OBJS)
+- $(LIBTOOL) --mode=link $(CC) \
+- -rpath $(LUA_RPATH) -o $(LIBNAME).la \
+- -version-info $(VERSION_INFO) \
+- $(CURL_LDFLAGS) $(OBJS)
+- ln -sf ./.libs/$(REALSO) curl.so
++curl.so: constants $(OBJS)
++ $(CC) -shared -o curl.so $(OBJS) $(CURL_LDFLAGS) -llua
+
+ # If all went well, we can dynamically load the module into Lua. The
+ # following will load the library into the interpreter and call a function.
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]