# HG changeset patch # User Franz Glasner # Date 1509063802 -7200 # Node ID 08fc189baf67917e83d8f205664058d97317aa9e # Parent 532757223c288db19670399b5d018c7747f245c8 Put some keyword expansion into the port. This is done in the "extract" stage after copying by an inplace sed. diff -r 532757223c28 -r 08fc189baf67 Makefile --- a/Makefile Thu Oct 26 23:04:22 2017 +0200 +++ b/Makefile Fri Oct 27 02:23:22 2017 +0200 @@ -20,9 +20,18 @@ PLIST_FILES= bin/check-ports +HGREVISION:= ${:!hg id -R "${.CURDIR}" -q!} +HGROOT:= ${:!basename "${.CURDIR}"!} +HGPATH:= ${:!hg paths default!} + do-extract: ${MKDIR} ${WRKSRC}/bin ${CP} -R -v ${SRC}/bin/ ${WRKSRC}/bin +.for _f in check-ports + ${SED} -i "" -e "s|@@HGREVISION@@|\$$HGrevision: ${HGREVISION} \$$|" ${WRKSRC}/bin/${_f} + ${SED} -i "" -e "s|@@HGROOT@@|\$$HGroot: ${HGROOT} \$$|" ${WRKSRC}/bin/${_f} + ${SED} -i "" -e "s|@@HGSOURCE@@|\$$HGsource: ${HGPATH}/bin/${_f} \$$|" ${WRKSRC}/bin/${_f} +.endfor do-install: ${INSTALL_SCRIPT} ${WRKSRC}/bin/check-ports ${STAGEDIR}${PREFIX}/bin/check-ports diff -r 532757223c28 -r 08fc189baf67 bin/check-ports --- a/bin/check-ports Thu Oct 26 23:04:22 2017 +0200 +++ b/bin/check-ports Fri Oct 27 02:23:22 2017 +0200 @@ -1,4 +1,7 @@ #!/bin/sh +# +# @@HGSOURCE@@ @@HGREVISION@@ +# # # Local repository with