Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2014 08:50:19 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r339332 - head/mail/imapfilter
Message-ID:  <201401100850.s0A8oJIB005217@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Jan 10 08:50:19 2014
New Revision: 339332
URL: http://svnweb.freebsd.org/changeset/ports/339332

Log:
  Port to lua 5.2, avoid patching when MAKE_ARGS can do the same jobs

Modified:
  head/mail/imapfilter/Makefile

Modified: head/mail/imapfilter/Makefile
==============================================================================
--- head/mail/imapfilter/Makefile	Fri Jan 10 08:47:02 2014	(r339331)
+++ head/mail/imapfilter/Makefile	Fri Jan 10 08:50:19 2014	(r339332)
@@ -13,9 +13,9 @@ COMMENT=	IMAP mail filtering utility
 
 LICENSE=	MIT
 
-LIB_DEPENDS=	pcre:${PORTSDIR}/devel/pcre
+LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
 
-USE_LUA=	5.1
+USES=		lua
 USE_OPENSSL=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include -I${LUA_INCDIR}
 LDFLAGS+=	-L${LOCALBASE}/lib -L${LUA_LIBDIR}
@@ -40,18 +40,13 @@ PLIST_FILES=	bin/imapfilter \
 		%%EXAMPLESDIR%%/config.lua \
 		%%EXAMPLESDIR%%/extend.lua
 PLIST_DIRS=	%%DATADIR%% %%EXAMPLESDIR%%
-
-.include <bsd.port.pre.mk>
-
-post-patch:
-	${REINPLACE_CMD} -Ee ' \
-	    s|^(PREFIX =).*|\1${PREFIX}|; \
-	    s|^(MYCFLAGS =).*|\1${CPPFLAGS}|; \
-	    s|^(MYLDFLAGS =).*|\1${LDFLAGS}|; \
-	    s|^(BINDIR =).*|\1${PREFIX}/bin|; \
-	    s|^(SHAREDIR =).*|\1${DATADIR}|; \
-	    s|^(MANDIR =).*|\1${MANPREFIX}/man|' \
-	    ${WRKSRC}/src/Makefile
+MAKE_ARGS=	PREFIX=${PREFIX} \
+		MYCFLAGS="${CPPFLAGS}" \
+		MYLDFLAGS="${LDFLAGS}" \
+		BINDIR=${PREFIX}/bin \
+		SHAREDIR=${DATADIR} \
+		MANDIR=${MANPREFIX}/man \
+		LIBLUA=-llua-${LUA_VER}
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}/${PREFIX}/bin/imapfilter
@@ -59,9 +54,7 @@ post-install:
 	cd ${WRKSRC}/samples && \
 		${INSTALL_DATA} config.lua extend.lua \
 			${STAGEDIR}/${EXAMPLESDIR}
-.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${STAGEDIR}/${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}/${DOCSDIR}
-.endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401100850.s0A8oJIB005217>