aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-struct/makefile.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-17 08:58:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-17 08:58:50 +0000
commit3fc6ec8458cc9489822debf2f095b915cc9dcf4c (patch)
tree1f426f7824301b748f0ba5ec5f3dc23c8e2ee075 /main/lua-struct/makefile.patch
parent4572b9e0de756fca391d855fd418bf6c744217f2 (diff)
downloadaports-3fc6ec8458cc9489822debf2f095b915cc9dcf4c.tar.bz2
aports-3fc6ec8458cc9489822debf2f095b915cc9dcf4c.tar.xz
main/lua-struct: move from testing
Diffstat (limited to 'main/lua-struct/makefile.patch')
-rw-r--r--main/lua-struct/makefile.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/lua-struct/makefile.patch b/main/lua-struct/makefile.patch
new file mode 100644
index 0000000000..9d3867fe1c
--- /dev/null
+++ b/main/lua-struct/makefile.patch
@@ -0,0 +1,22 @@
+--- ./makefile.orig
++++ ./makefile
+@@ -1,6 +1,5 @@
+-# point it to where the compiler can find the Lua header files (lua.h, etc.)
+-# LUADIR = ../lua
+-LUADIR = /usr/include/lua5.1/
++LUAPC?=lua5.1
++LUA_CFLAGS = $(shell pkg-config --cflags $(LUAPC))
+
+ # define your own "large" integer type; not defining a proper type
+ # will default to 'long', which may cause problems with 'size_t'
+@@ -16,8 +15,8 @@
+ -Wshadow \
+ -Wwrite-strings
+
+-CFLAGS = -D_POSIX_SOURCE $(CWARNS) $(INTTYPE) -O2 -I$(LUADIR)
+-CC = gcc
++OPT_CFLAGS ?= -O2
++CFLAGS = -D_POSIX_SOURCE $(CWARNS) $(INTTYPE) $(OPT_CFLAGS) $(LUA_CFLAGS)
+
+ struct.so: struct.c makefile
+ $(CC) $(CFLAGS) -shared -fpic -o struct.so struct.c