svn commit: r391976 - head/Mk/Uses
Jimmy Olgeni
olgeni at FreeBSD.org
Tue Jul 14 10:44:51 UTC 2015
Author: olgeni
Date: Tue Jul 14 10:44:50 2015
New Revision: 391976
URL: https://svnweb.freebsd.org/changeset/ports/391976
Log:
Improvements in erlang.mk:
- Replace %%PORTVERSION%% in all source files
- Fix vsn tag in app files, whatever its format
Modified:
head/Mk/Uses/erlang.mk
Modified: head/Mk/Uses/erlang.mk
==============================================================================
--- head/Mk/Uses/erlang.mk Tue Jul 14 09:14:41 2015 (r391975)
+++ head/Mk/Uses/erlang.mk Tue Jul 14 10:44:50 2015 (r391976)
@@ -79,17 +79,19 @@ do-install: do-install-erlang
post-patch-erlang:
@${FIND} ${WRKSRC} -name .gitignore -delete
-# Attempt to remove all traces of {vsn, git}; replace with actual PORTVERSION
+# Attempt to remove all traces of {vsn, ....}; replace with actual PORTVERSION
@if [ -f ${WRKSRC}/src/${ERL_APP_NAME}.app.src ]; then \
- ${REINPLACE_CMD} -i '' -e 's/{ *vsn, *git *}/{vsn, "${PORTVERSION}"}/' \
+ ${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \
${WRKSRC}/src/${ERL_APP_NAME}.app.src; \
fi
@if [ -f ${WRKSRC}/ebin/${ERL_APP_NAME}.app ]; then \
- ${REINPLACE_CMD} -i '' -e 's/{ *vsn, *git *}/{vsn, "${PORTVERSION}"}/' \
+ ${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \
${WRKSRC}/ebin/${ERL_APP_NAME}.app; \
fi
@${GREP} -l "%%LOCALBASE%%" $$(${FIND} ${WRKSRC}) \
| ${XARGS} ${REINPLACE_CMD} -i '' -e "s@%%LOCALBASE%%@${LOCALBASE}@"
+ @${GREP} -l "%%PORTVERSION%%" $$(${FIND} ${WRKSRC}) \
+ | ${XARGS} ${REINPLACE_CMD} -i '' -e "s@%%PORTVERSION%%@${PORTVERSION}@"
# Always try to build with the system version of rebar and rebar3
@if [ -f ${WRKSRC}/rebar.config ]; then \
${REINPLACE_CMD} -i '' -e "s at ./rebar3@${REBAR3_CMD}@; s at ./rebar@${REBAR_CMD}@" \
More information about the svn-ports-all
mailing list