commit:     2b40948c38a72ba65f27d5873c533010eb19bdca
Author:     Cristian Othón Martínez Vera <cfuga <AT> cfuga <DOT> mx>
AuthorDate: Mon Aug  4 16:49:13 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct  3 04:56:34 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b40948c

games-misc/cowsay: add 3.8.4

Closes: https://bugs.gentoo.org/932275
Signed-off-by: Cristian Othón Martínez Vera <cfuga <AT> cfuga.mx>
Part-of: https://github.com/gentoo/gentoo/pull/43322
Closes: https://github.com/gentoo/gentoo/pull/43322
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-misc/cowsay/Manifest                         |  1 +
 games-misc/cowsay/cowsay-3.8.4.ebuild              | 31 ++++++++++++++++++++++
 games-misc/cowsay/files/cowsay-3.8.4-head-in.patch | 10 +++++++
 .../cowsay/files/cowsay-3.8.4-makefile.patch       | 13 +++++++++
 4 files changed, 55 insertions(+)

diff --git a/games-misc/cowsay/Manifest b/games-misc/cowsay/Manifest
index 9e52b16097a0..fb52349d5e55 100644
--- a/games-misc/cowsay/Manifest
+++ b/games-misc/cowsay/Manifest
@@ -1 +1,2 @@
 DIST cowsay-3.7.0.tar.gz 34030 BLAKE2B 
a986ee689ca6856b99dcc148533abfbc81759da6fbabee9ab1ba86e7b288d3bff575706c1e12d6dd809e2e5091ce8d9bdcae51ffefccbfb356fc75ab199c4e8f
 SHA512 
92c169350049d894c36ec753f0b7eb9250da7839d9f1eedcad1ff5d9f2cff188bd1509dabd3b4dd562bdd0e660e80e6a437c7f260ce5b2376b7ef624f0ee673b
+DIST cowsay-3.8.4.tar.gz 41206 BLAKE2B 
51144493dcad1ba546e5ae1017af004522ebbccabc3bdc729eb4faa6b847aadcd0954dc6bc97d77031f2f50cf2bcb77fddec9f01bcd16e2db0d191c8f15f61af
 SHA512 
58e6a28e3205a3dd50c899c207b58592c43f8485dc44d3dc8de41bc480ec6d7e5a14e74769c8bb983d401004dce99f040c7a095839056861b7aa6aae71e08bb7

diff --git a/games-misc/cowsay/cowsay-3.8.4.ebuild 
b/games-misc/cowsay/cowsay-3.8.4.ebuild
new file mode 100644
index 000000000000..1aca1e1195d9
--- /dev/null
+++ b/games-misc/cowsay/cowsay-3.8.4.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Configurable talking ASCII cow (and other characters)"
+HOMEPAGE="https://cowsay.diamonds https://github.com/cowsay-org/cowsay";
+SRC_URI="https://github.com/cowsay-org/cowsay/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~mips ~ppc64 ~riscv ~x86 ~x64-macos ~x64-solaris"
+
+RDEPEND="dev-lang/perl"
+BDEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-makefile.patch"
+       "${FILESDIR}/${P}-head-in.patch"
+)
+
+src_prepare() {
+       default
+       sed -i "s|fB%PREFIX%|fB${EPREFIX}/usr|g" man/man1/cowsay.1 || die
+}
+
+src_install() {
+       emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+       keepdir /etc/${PN}/cowpath.d
+       einstalldocs
+}

diff --git a/games-misc/cowsay/files/cowsay-3.8.4-head-in.patch 
b/games-misc/cowsay/files/cowsay-3.8.4-head-in.patch
new file mode 100644
index 000000000000..d1cb07ffd922
--- /dev/null
+++ b/games-misc/cowsay/files/cowsay-3.8.4-head-in.patch
@@ -0,0 +1,10 @@
+--- a/share/cowsay/cows/head-in.cow
++++ b/share/cowsay/cows/head-in.cow
+@@ -7,6 +7,6 @@
+     ^__^         /
+     ($eyes)\\_______/  _________
+     (__)\\       )=(  ____|_ \\_____
+-   $tongue   ||----w |  \\ \\     \\_____ |
++     $tongue ||----w |  \\ \\     \\_____ |
+         ||     ||   ||           ||
+ EOC

diff --git a/games-misc/cowsay/files/cowsay-3.8.4-makefile.patch 
b/games-misc/cowsay/files/cowsay-3.8.4-makefile.patch
new file mode 100644
index 000000000000..ec09050d0e78
--- /dev/null
+++ b/games-misc/cowsay/files/cowsay-3.8.4-makefile.patch
@@ -0,0 +1,13 @@
+Global cowpath.d directory install is botched.
+Fixed in src_install()
+
+--- a/Makefile
++++ b/Makefile
+@@ -79,7 +79,6 @@
+ 
+ .PHONY: install
+ install:
+-      $(INSTALL_DIR) $(DESTDIR)$(cowpathdir)
+       $(INSTALL_DIR) $(DESTDIR)$(bindir)
+       $(INSTALL_PROGRAM) bin/cowsay $(DESTDIR)$(bindir)/cowsay
+       $(LN_S) cowsay $(DESTDIR)$(bindir)/cowthink

Reply via email to