diff options
Diffstat (limited to 'dev-lua/luacrypto/files/20120413-makefile.patch')
-rw-r--r-- | dev-lua/luacrypto/files/20120413-makefile.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/dev-lua/luacrypto/files/20120413-makefile.patch b/dev-lua/luacrypto/files/20120413-makefile.patch new file mode 100644 index 000000000..b085bc669 --- /dev/null +++ b/dev-lua/luacrypto/files/20120413-makefile.patch @@ -0,0 +1,71 @@ +From: hasufell <julian.ospald@googlemail.com> +Date: Fri Apr 13 19:03:38 UTC 2012 +Subject: build system + +--- config ++++ config +@@ -1,22 +1,17 @@ +-# Installation directories +-# System's libraries directory (where binary libraries are installed) +-LUA_LIBDIR= /usr/lib/lua/5.1 +-# Lua includes directory +-LUA_INC= /usr/include/lua5.1 +- +-# OS dependent +-LIB_OPTION= -shared #for Linux +-#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X +- + # Lua version number (first and second digits of target version) + LUA_VERSION_NUM= 514 +-LIBNAME= $T.so ++LIBNAME = liblua$T.so ++ ++# Lua flags ++LUA_CPPFLAGS = $(shell pkg-config --cflags lua) + +-OPENSSL_LIBS= -lcrypto -lssl +-OPENSSL_INCS= -I/usr/include/openssl ++# Openssl flags ++OPENSSL_LIBS = $(shell pkg-config --libs openssl) ++OPENSSL_CPPFLAGS = $(shell pkg-config --cflags openssl) + + # Compilation directives +-WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings +-INCS= -I$(LUA_INC) +-CFLAGS= -shared $(WARN) $(OPENSSL_INCS) $(INCS) +-CC= gcc ++CC ?= gcc ++CFLAGS += -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings ++CPPFLAGS += $(OPENSSL_CPPFLAGS) $(LUA_CPPFLAGS) ++LDFLAGS += -shared -Wl,-soname,${LIBNAME} ++LIBS += $(OPENSSL_LIBS) +--- Makefile ++++ Makefile +@@ -4,6 +4,10 @@ + + include $(CONFIG) + ++PREFIX ?= /usr/local ++LIBDIR ?= lib ++LUAINCDIR = $(shell pkg-config --variable=includedir lua) ++ + OBJS= src/l$T.o + SRCS= src/l$T.h src/l$T.c + TESTS=tests/*.lua +@@ -11,11 +15,13 @@ + lib: src/$(LIBNAME) + + src/$(LIBNAME): $(OBJS) +- export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) $(OPENSSL_LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o src/$(LIBNAME) $(OBJS) $(LIBS) + + install: src/$(LIBNAME) +- mkdir -p $(LUA_LIBDIR) +- cp src/$(LIBNAME) $(LUA_LIBDIR) ++ install -d ${DESTDIR}${LUAINCDIR} ++ install -m644 src/lcrypto.h ${DESTDIR}${LUAINCDIR}/lcrypto.h ++ install -d ${DESTDIR}${PREFIX}/${LIBDIR} ++ install -m755 src/$(LIBNAME) ${DESTDIR}${PREFIX}/${LIBDIR}/$(LIBNAME) + + clean: + rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O) |