summaryrefslogtreecommitdiff
path: root/lang/lua52
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-01-17 01:37:59 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-01-17 01:37:59 +0000
commitce179c4f7e20c4a2120b13dffae09a5e31796149 (patch)
tree7bbcefecae6ee8f8408c7190f21926a7bbf62575 /lang/lua52
parentAdd a forgot post-patch for libedit support (diff)
Link on libedit instead of readline
Reduce overlinking on liblua Enforce libedit from ports
Notes
Notes: svn path=/head/; revision=377209
Diffstat (limited to 'lang/lua52')
-rw-r--r--lang/lua52/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/lang/lua52/Makefile b/lang/lua52/Makefile
index 79efb17512e5..20af2d0f39ac 100644
--- a/lang/lua52/Makefile
+++ b/lang/lua52/Makefile
@@ -3,7 +3,7 @@
PORTNAME= lua
PORTVERSION= 5.2.3
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang
MASTER_SITES= http://www.lua.org/ftp/
PKGNAMESUFFIX= 52
@@ -14,7 +14,7 @@ COMMENT= Small, compilable scripting language providing easy access to C code
LICENSE= MIT
LUA_VER= 5.2
-USES= readline
+LIB_DEPENDS= libedit.so.0:${PORTSDIR}/devel/libedit
USE_LDCONFIG= yes
# Overriding __MAKE_CONF makes sure that we don't re-parse
@@ -26,10 +26,12 @@ USE_LDCONFIG= yes
MAKE_ARGS= __MAKE_CONF=${NONEXISTENT}
# liblua.so requires libm, so make sure it has an explicit dependency
# so that applications need not second-guess lua's dependencies.
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -lm -pthread
BUILD_WRKSRC= ${WRKSRC}/src
MAKE_ARGS+= MYCFLAGS="${CFLAGS} ${CPPFLAGS} -DLUA_USE_LINUX" \
- MYLDFLAGS="${LDFLAGS} -Wl,-E -lreadline" \
+ MYLDFLAGS="${LDFLAGS}" \
+ MYLIBS="-Wl,-E -L${LOCALBASE}/lib -ledit" \
CC="${CC}" \
LUA_T=lua52 \
LUAC_T=luac52 \
@@ -62,7 +64,9 @@ CFLAGS_powerpc= -fPIC
post-patch:
@${REINPLACE_CMD} -e 's,rand *(,random(,g' \
${WRKSRC}/src/lmathlib.c
- @${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}|" \
+ @${REINPLACE_CMD} -e "/LUA_ROOT/s|/usr/local|${LUA_PREFIX}| ; \
+ s,readline/,editline/,g ; \
+ /history\.h/d" \
${WRKSRC}/src/luaconf.h
post-install: