aboutsummaryrefslogtreecommitdiff
path: root/databases/tokyotyrant
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-04-21 21:41:24 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-04-21 21:41:24 +0000
commitdfeaf523bb5d51da8a7c4625fe81628d1cb53140 (patch)
treec56d5f6c7713720bb8d6198a882cd37f293a946b /databases/tokyotyrant
parent65d07d6bf4616a4b8fa00f202908bc953f5a92d4 (diff)
downloadports-dfeaf523bb5d51da8a7c4625fe81628d1cb53140.tar.gz
ports-dfeaf523bb5d51da8a7c4625fe81628d1cb53140.zip
Switch to lua 5.2
Obtained from: pkgsrc
Notes
Notes: svn path=/head/; revision=351723
Diffstat (limited to 'databases/tokyotyrant')
-rw-r--r--databases/tokyotyrant/Makefile17
-rw-r--r--databases/tokyotyrant/files/patch-scrext.c16
2 files changed, 23 insertions, 10 deletions
diff --git a/databases/tokyotyrant/Makefile b/databases/tokyotyrant/Makefile
index 78ab05b6a1f5..5340d604f7e7 100644
--- a/databases/tokyotyrant/Makefile
+++ b/databases/tokyotyrant/Makefile
@@ -3,6 +3,7 @@
PORTNAME= tokyotyrant
PORTVERSION= 1.1.41
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://fallabs.com/${PORTNAME}/
@@ -22,21 +23,17 @@ OPTIONS_DEFINE= LUA
LDFLAGS+= -L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MLUA}
-CONFIGURE_ARGS+= --enable-lua
-LDFLAGS+= -L${LUA_LIBDIR}
-CFLAGS+= -I${LUA_INCDIR}
-USE_LUA= yes
-.else
-CONFIGURE_ARGS+= --disable-lua
-.endif
+LUA_CONFIGURE_ENABLE= lua
+LUA_LDFLAGS+= -L${LUA_LIBDIR}
+LUA_CFLAGS+= -I${LUA_INCDIR}
+LUA_CPPFLAGS+= -I${LUA_INCDIR}
+LUA_USES= lua
# Since gnomehack only works for "(libdir)" case, we need to patch it
# manually.
post-patch:
${REINPLACE_CMD} -e 's|@libdir@/pkgconfig|@prefix@/libdata/pkgconfig|g' \
${WRKSRC}/Makefile.in
+ ${REINPLACE_CMD} -e 's|llua|llua-${LUA_VER}|g' ${WRKSRC}/configure
.include <bsd.port.mk>
diff --git a/databases/tokyotyrant/files/patch-scrext.c b/databases/tokyotyrant/files/patch-scrext.c
new file mode 100644
index 000000000000..1a0d19c3df8e
--- /dev/null
+++ b/databases/tokyotyrant/files/patch-scrext.c
@@ -0,0 +1,16 @@
+--- ./scrext.c.orig 2010-08-05 08:24:33.000000000 +0200
++++ ./scrext.c 2014-04-21 21:45:57.464501296 +0200
+@@ -153,6 +153,13 @@
+ #include "lualib.h"
+ #include "lauxlib.h"
+
++#ifdef LUA_VERSION_NUM
++# if (LUA_VERSION_NUM >= 502)
++#undef lua_objlen
++#define lua_objlen lua_rawlen
++# endif
++#endif
++
+ #define SERVVAR "_serv_" // global variable name for server resources
+ #define ITERVAR "_iter_" // global variable name for iterator
+ #define MRMAPVAR "_mrmap_" // global variable name for mapreduce mapper