git: cef4e41b8650 - main - games/cowsay: Move man pages to share/man

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Sat, 09 Mar 2024 08:31:22 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cef4e41b8650d47fff624df0d7a8bb9363d833a5

commit cef4e41b8650d47fff624df0d7a8bb9363d833a5
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-03-09 07:22:15 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-03-09 08:31:02 +0000

    games/cowsay: Move man pages to share/man
    
    Approved by:    portmgr (blanket)
---
 games/cowsay/Makefile               |  4 ++--
 games/cowsay/files/patch-install.sh | 17 +++++++++++++++++
 games/cowsay/pkg-plist              |  4 ++--
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/games/cowsay/Makefile b/games/cowsay/Makefile
index 1aff34726c76..9e02c591cb4e 100644
--- a/games/cowsay/Makefile
+++ b/games/cowsay/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	cowsay
 PORTVERSION=	3.04
 DISTVERSIONPREFIX=	cowsay-
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	games
 
 MAINTAINER=	osa@FreeBSD.org
@@ -35,7 +35,7 @@ do-install:
 	#   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
+	@${SED} -i '' 's,${STAGEDIR},,' ${STAGEDIR}${PREFIX}/share/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
diff --git a/games/cowsay/files/patch-install.sh b/games/cowsay/files/patch-install.sh
new file mode 100644
index 000000000000..3d116e387081
--- /dev/null
+++ b/games/cowsay/files/patch-install.sh
@@ -0,0 +1,17 @@
+--- install.sh.orig	2024-03-09 07:16:05 UTC
++++ install.sh
+@@ -73,10 +73,10 @@ ln -s cowsay $PREFIX/bin/cowthink
+ $usethisperl -p install.pl cowsay > $PREFIX/bin/cowsay
+ chmod a+x $PREFIX/bin/cowsay
+ ln -s cowsay $PREFIX/bin/cowthink
+-mkdir -p $PREFIX/man/man1 || ($mkdir $PREFIX; mkdir $PREFIX/man; mkdir $PREFIX/man/man1)
+-$usethisperl -p install.pl cowsay.1 > $PREFIX/man/man1/cowsay.1
+-chmod a+r $PREFIX/man/man1/cowsay.1
+-ln -s cowsay.1 $PREFIX/man/man1/cowthink.1
++mkdir -p $PREFIX/share/man/man1 || ($mkdir $PREFIX; mkdir $PREFIX/man; mkdir $PREFIX/man/man1)
++$usethisperl -p install.pl cowsay.1 > $PREFIX/share/man/man1/cowsay.1
++chmod a+r $PREFIX/share/man/man1/cowsay.1
++ln -s cowsay.1 $PREFIX/share/man/man1/cowthink.1
+ mkdir -p $PREFIX/share/cows || (mkdir $PREFIX; mkdir $PREFIX/share; mkdir $PREFIX/share/cows)
+ tar -cf - $filelist | (cd $PREFIX/share && tar -xvf -)
+ set +x
diff --git a/games/cowsay/pkg-plist b/games/cowsay/pkg-plist
index 5532ee0bc9c4..a2ad75eb1237 100644
--- a/games/cowsay/pkg-plist
+++ b/games/cowsay/pkg-plist
@@ -1,7 +1,5 @@
 bin/cowsay
 bin/cowthink
-man/man1/cowsay.1.gz
-man/man1/cowthink.1.gz
 share/cows/DragonAndCow.pm
 share/cows/Example.pm
 share/cows/Frogs.pm
@@ -60,3 +58,5 @@ share/cows/udder.cow
 share/cows/vader-koala.cow
 share/cows/vader.cow
 share/cows/www.cow
+share/man/man1/cowsay.1.gz
+share/man/man1/cowthink.1.gz