From 0e53762189e9aa0b87a316ac7993d2664a4db4cc Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Fri, 17 Jun 2016 20:05:53 +0200 Subject: [PATCH] improve compatibility with luarocks With this patch some information is taken from the luarocks environment: - lua binary (lua, lua5.1, luajit ...) - lua include path - library install path --- Makefile | 1 + luagd-2.0.33r3-1.rockspec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8b14505..e2be388 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,7 @@ OUTFILE=gd.so CFLAGS=-O3 -Wall -fPIC $(OMITFP) CFLAGS+=`$(GDLIBCONFIG) --cflags` `pkg-config $(LUAPKG) --cflags` +CFLAGS+=-I$(LUA_INCDIR) CFLAGS+=-DVERSION=\"$(VERSION)\" GDFEATURES=`$(GDLIBCONFIG) --features |sed -e "s/GD_/-DGD_/g"` diff --git a/luagd-2.0.33r3-1.rockspec b/luagd-2.0.33r3-1.rockspec index eeead43..94b06e9 100644 --- a/luagd-2.0.33r3-1.rockspec +++ b/luagd-2.0.33r3-1.rockspec @@ -33,8 +33,13 @@ build = { type = "make", platforms = { unix = { + build_variables = { + LUA_INCDIR="$(LUA_INCDIR)", + LUABIN = "$(LUA)" }, + install_variables = { + INSTALL_PATH="$(LIBDIR)" }, build_pass = true, - install_pass = false, + install_pass = true, install = { lib = { "gd.so" } }, copy_directories = { "doc", "demos" } }