aboutsummaryrefslogtreecommitdiff
path: root/games/cowsay
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2021-01-21 22:26:51 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2021-01-21 22:26:51 +0000
commit9f918ff4e42ce3457e7365dc820548d270fadd97 (patch)
tree7e827a8e3080a12e4487f96349fd692274394d4e /games/cowsay
parent6089334c745f963362cb00532d44a76383cc7176 (diff)
downloadports-9f918ff4e42ce3457e7365dc820548d270fadd97.tar.gz
ports-9f918ff4e42ce3457e7365dc820548d270fadd97.zip
Fix build artifacts in games/cowsay
`cowsay -h` still reported 3.03 (this was an upstream error) and the manpage contained STAGEDIR paths; fix that with some sed-work. I've added comments in the makefile explaining how we're mulching this ancient perl script. Note that this uses `${SED} -i` rather than `${REINPLACE_CMD}` because that's what the port was already doing. I didn't want to change style at the same time. PR: 245324 Approved by: maintainer timeout (2 weeks)
Notes
Notes: svn path=/head/; revision=562252
Diffstat (limited to 'games/cowsay')
-rw-r--r--games/cowsay/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/games/cowsay/Makefile b/games/cowsay/Makefile
index f9e47d76c27d..10399c04d9d8 100644
--- a/games/cowsay/Makefile
+++ b/games/cowsay/Makefile
@@ -4,7 +4,7 @@
PORTNAME= cowsay
PORTVERSION= 3.04
DISTVERSIONPREFIX= cowsay-
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MAINTAINER= lifanov@FreeBSD.org
@@ -27,7 +27,17 @@ post-patch:
do-install:
cd ${WRKSRC}; ${SH} install.sh ${STAGEDIR}${PREFIX}
+ # The sources have not had their version updated in the last release;
+ # normally this would be a patch (replacing the relevant "3.03" by
+ # something like %%PORTVERSION%%) and then a substitution, but there
+ # is no future release planned anyway.
+ ${SED} -i '' 's,3\.03,${PORTVERSION}_${PORTREVISION},' ${STAGEDIR}${PREFIX}/bin/cowsay
+ # Since we called install.sh with a **stage** path, that is the path
+ # that gets edited into the script and manpage; remove the stage
+ # bit from both so that after installation cowsay uses, and the manpage
+ # mentions, the prefix path, not the stage path.
@${SED} -i '' 's,${STAGEDIR},,' ${STAGEDIR}${PREFIX}/bin/cowsay
+ @${SED} -i '' 's,${STAGEDIR},,' ${STAGEDIR}${PREFIX}/man/man1/cowsay.1
${INSTALL_DATA} ${FILESDIR}/box.cow ${STAGEDIR}${PREFIX}/share/cows
${INSTALL_DATA} ${FILESDIR}/jkh.cow ${STAGEDIR}${PREFIX}/share/cows
${INSTALL_DATA} ${FILESDIR}/tux-stab.cow ${STAGEDIR}${PREFIX}/share/cows