aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-ldbus/fix-makefile.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-09-04 16:31:57 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-10-19 07:11:12 +0000
commit6d17e81c6bc6642e906d1d296c6872d838fda37c (patch)
tree9172a062517a4aa8ea12e638dbd932e7161ae849 /main/lua-ldbus/fix-makefile.patch
parent0c6084ac8df8f078abb1849662dd38284d02fb0f (diff)
downloadaports-6d17e81c6bc6642e906d1d296c6872d838fda37c.tar.bz2
aports-6d17e81c6bc6642e906d1d296c6872d838fda37c.tar.xz
main/lua-ldbus: new aport
Diffstat (limited to 'main/lua-ldbus/fix-makefile.patch')
-rw-r--r--main/lua-ldbus/fix-makefile.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/main/lua-ldbus/fix-makefile.patch b/main/lua-ldbus/fix-makefile.patch
new file mode 100644
index 0000000000..781efe7c2a
--- /dev/null
+++ b/main/lua-ldbus/fix-makefile.patch
@@ -0,0 +1,43 @@
+--- ldbus-9f6db626600eb7e04000368da947e0c5cd175fb5.orig/src/Makefile
++++ ldbus-9f6db626600eb7e04000368da947e0c5cd175fb5/src/Makefile
+@@ -1,22 +1,32 @@
+-LUA_LIBDIR = /usr/local/lib/lua/5.3
++LUA_VERSION ?= 5.3
++LUA_LIBDIR = /usr/local/lib/lua/$(LUA_VERSION)
+
++O = obj$(LUA_VERSION)
+ CFLAGS += -Wall -Wextra --pedantic -Wno-long-long
+-CFLAGS += `pkg-config --cflags lua5.3 dbus-1`
++CFLAGS += `pkg-config --cflags lua$(LUA_VERSION) dbus-1`
+ CFLAGS += -fPIC
+ CFLAGS += -I ../vendor/compat-5.3/c-api
+
+ LIBS = `pkg-config --libs dbus-1`
+
+-OBJS = ldbus.o error.o pending_call.o connection.o bus.o message.o message_iter.o timeout.o watch.o ../vendor/compat-5.3/c-api/compat-5.3.o
++OBJS = $(addprefix $(O)/, ldbus.o error.o pending_call.o connection.o bus.o message.o message_iter.o timeout.o watch.o compat-5.3.o)
+
+-all: ldbus.so
++all: $(O)/ldbus.so
+
+-ldbus.so: $(OBJS)
+- $(CC) -o ldbus.so -shared $(CFLAGS) $^ $(LIBS)
++$(O)/compat-5.3.o: ../vendor/compat-5.3/c-api/compat-5.3.c
++ @mkdir -p $(O)
++ $(CC) -c -o $@ $(CFLAGS) $<
+
++$(O)/%.o: %.c
++ @mkdir -p $(O)
++ $(CC) -c -o $@ $(CFLAGS) $<
++
++$(O)/ldbus.so: $(OBJS)
++ $(CC) -o $@ -shared $(CFLAGS) $^ $(LIBS)
++
+ clean:
+ rm -f -- ldbus.so $(OBJS)
+
+-install: ldbus.so
++install: $(O)/ldbus.so
+ mkdir -p $(LUA_LIBDIR)
+- cp ldbus.so $(LUA_LIBDIR)
++ cp $(O)/ldbus.so $(LUA_LIBDIR)