From 422ca6187a8e3d8d33912e3a06e24febe9f94102 Mon Sep 17 00:00:00 2001 From: olgeni Date: Tue, 14 Jul 2015 10:44:50 +0000 Subject: Improvements in erlang.mk: - Replace %%PORTVERSION%% in all source files - Fix vsn tag in app files, whatever its format --- Mk/Uses/erlang.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Mk/Uses') diff --git a/Mk/Uses/erlang.mk b/Mk/Uses/erlang.mk index 22c772438f63..2fa42f6c1825 100644 --- a/Mk/Uses/erlang.mk +++ b/Mk/Uses/erlang.mk @@ -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@./rebar3@${REBAR3_CMD}@; s@./rebar@${REBAR_CMD}@" \ -- cgit