aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/luasocket/Makefile7
-rw-r--r--net/luasocket/files/patch-Makefile30
2 files changed, 34 insertions, 3 deletions
diff --git a/net/luasocket/Makefile b/net/luasocket/Makefile
index bf4acee26184..2a3a451d92e6 100644
--- a/net/luasocket/Makefile
+++ b/net/luasocket/Makefile
@@ -15,10 +15,11 @@ USE_GITHUB= yes
GH_ACCOUNT= diegonehab
GH_TAGNAME= v3.0-rc1
-USES= lua:51 gmake pkgconfig
+MAKE_ARGS= LUA_VER=${LUA_VER}
+USES= lua gmake pkgconfig
-CFLAGS+= `pkgconf --cflags lua-${LUA_VER}`
-LDFLAGS+= -shared `pkgconf --libs lua-${LUA_VER}`
+CFLAGS+= `pkgconf --cflags lua-${LUA_VER}`
+LDFLAGS+= -shared `pkgconf --libs lua-${LUA_VER}`
OPTIONS_DEFINE= DOCS
diff --git a/net/luasocket/files/patch-Makefile b/net/luasocket/files/patch-Makefile
new file mode 100644
index 000000000000..646a462ef1ef
--- /dev/null
+++ b/net/luasocket/files/patch-Makefile
@@ -0,0 +1,30 @@
+--- Makefile.orig 2013-06-14 11:27:32 UTC
++++ Makefile
+@@ -23,21 +23,15 @@ print:
+ test:
+ lua test/hello.lua
+
+-install-both:
+- $(MAKE) clean
+- @cd src; $(MAKE) $(PLAT) LUAV=5.1
+- @cd src; $(MAKE) install LUAV=5.1
++install:
+ $(MAKE) clean
+- @cd src; $(MAKE) $(PLAT) LUAV=5.2
+- @cd src; $(MAKE) install LUAV=5.2
++ @cd src; $(MAKE) $(PLAT) LUAV=$(LUA_VER)
++ @cd src; $(MAKE) install LUAV=$(LUA_VER)
+
+-install-both-unix:
+- $(MAKE) clean
+- @cd src; $(MAKE) $(PLAT) LUAV=5.1
+- @cd src; $(MAKE) install-unix LUAV=5.1
++install-unix:
+ $(MAKE) clean
+- @cd src; $(MAKE) $(PLAT) LUAV=5.2
+- @cd src; $(MAKE) install-unix LUAV=5.2
++ @cd src; $(MAKE) $(PLAT) LUAV=$(LUA_VER)
++ @cd src; $(MAKE) install-unix LUAV=$(LUA_VER)
+
+ .PHONY: test
+