diff options
author | olgeni <olgeni@FreeBSD.org> | 2015-07-14 18:44:50 +0800 |
---|---|---|
committer | olgeni <olgeni@FreeBSD.org> | 2015-07-14 18:44:50 +0800 |
commit | 422ca6187a8e3d8d33912e3a06e24febe9f94102 (patch) | |
tree | cafc2bc4730ebdb2116cda8b4bdacf2d8610232d /Mk/Uses | |
parent | 5fc47f11fe3724c021f36d39d4be8cda8f4d3880 (diff) | |
download | freebsd-ports-gnome-422ca6187a8e3d8d33912e3a06e24febe9f94102.tar.gz freebsd-ports-gnome-422ca6187a8e3d8d33912e3a06e24febe9f94102.tar.zst freebsd-ports-gnome-422ca6187a8e3d8d33912e3a06e24febe9f94102.zip |
Improvements in erlang.mk:
- Replace %%PORTVERSION%% in all source files
- Fix vsn tag in app files, whatever its format
Diffstat (limited to 'Mk/Uses')
-rw-r--r-- | Mk/Uses/erlang.mk | 8 |
1 files changed, 5 insertions, 3 deletions
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}@" \ |