diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2023-03-20 09:18:40 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2023-03-23 23:44:00 -0400 |
commit | c9e01b9dfc083a5e1dd8d83347cdfe888a67b098 (patch) | |
tree | 8e1576ecaf238541810c96a6908de03de069fdfc | |
parent | f0b60c185ab5b57a5c8c2adc4fc8e2fd0290f003 (diff) |
[cowsay]: upgrade to v3.04
changed upstream to same as arch
added mksource() to remove dubious cows
-rw-r--r-- | libre/cowsay/0001-implement-animated-cows.patch | 108 | ||||
-rw-r--r-- | libre/cowsay/0002-add-example-animated-cow.patch | 411 | ||||
-rw-r--r-- | libre/cowsay/0003-implement-animation-stepping.patch | 82 | ||||
-rw-r--r-- | libre/cowsay/0004-document-animated-cows-and-the-a-option.patch | 88 | ||||
-rw-r--r-- | libre/cowsay/0005-clarify-licensing.patch | 44 | ||||
-rw-r--r-- | libre/cowsay/PKGBUILD | 88 |
6 files changed, 807 insertions, 14 deletions
diff --git a/libre/cowsay/0001-implement-animated-cows.patch b/libre/cowsay/0001-implement-animated-cows.patch new file mode 100644 index 000000000..a91857208 --- /dev/null +++ b/libre/cowsay/0001-implement-animated-cows.patch @@ -0,0 +1,108 @@ +From 7c5dda1f3886ebc6c86219222b6ae1cd93f782b9 Mon Sep 17 00:00:00 2001 +From: bill-auger <mr.j.spam.me@gmail.com> +Date: Mon, 20 Mar 2023 12:01:53 -0400 +Subject: [PATCH 1/5] implement animated cows + +--- + cowsay | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 53 insertions(+), 7 deletions(-) + +diff --git a/cowsay b/cowsay +index 900ca46..dc49542 100755 +--- a/cowsay ++++ b/cowsay +@@ -4,10 +4,12 @@ + ## Cowsay 3.03 + ## + ## This file is part of cowsay. (c) 1999-2000 Tony Monroe. ++## - animation feature: (c) 2023 bill-auger <bill-auger@programmer.net> + ## + + use Text::Tabs qw(expand); + use Text::Wrap qw(wrap fill $columns); ++use Time::HiRes qw ( usleep ); + use File::Basename; + use Getopt::Std; + use Cwd; +@@ -67,8 +69,29 @@ $Text::Wrap::columns = $opts{'W'}; + &construct_balloon; + &construct_face; + &get_cow; +-print @balloon_lines; +-print $the_cow; ++if (not @anim_files) { ++ &print_cow; ++} ++else { ++ my $anim_duration = 3000000; ++ my $n_anim_files = @anim_files; ++ my $sleep_ivl = $anim_duration / $n_anim_files; ++ my $clear_string = `clear`; ++ ++ for my $full (@anim_files) { ++ do $full; ++ die "$progname: $@\n" if $@; ++ ++ print $clear_string; ++ &print_cow; ++ usleep($sleep_ivl); ++ } ++} ++ ++sub print_cow { ++ print @balloon_lines; ++ print $the_cow; ++} + + sub list_cowfiles { + my $basedir; +@@ -77,10 +100,21 @@ sub list_cowfiles { + for my $d (split(/$pathsep/, $cowpath)) { + print "Cow files in $d:\n"; + opendir(COWDIR, $d) || die "$0: Cannot open $d\n"; +- for my $file (readdir COWDIR) { +- if ($file =~ s/\.cow$//) { +- push(@dirfiles, $file); +- } ++ for my $file (grep !/^\.\.?$/, readdir COWDIR) { ++ # collect single cows ++ if ($file =~ s/\.cow$//) { ++ push(@dirfiles, $file); ++ } ++ # collect animated cows ++ elsif (-d "$d/$file") { ++ opendir(ACOWDIR, "$d/$file") || die "$0: Cannot open $d/$file\n"; ++ for my $afile (readdir ACOWDIR) { ++ if ($afile =~ m/\.cow$/) { ++ push(@dirfiles, $file); ++ last; ++ } ++ } ++ } + } + closedir(COWDIR); + print wrap("", "", sort @dirfiles), "\n"; +@@ -168,7 +202,19 @@ sub get_cow { + } elsif (-f "$d/$f.cow") { + $full = "$d/$f.cow"; + last; +- } ++ } elsif (-d "$d/$f") { # collect animated .cow files ++ opendir(ACOWDIR, "$d/$f") || die "$0: Cannot open $d/$f\n"; ++ for my $file (sort (readdir ACOWDIR)) { ++ if ($file =~ m/\.cow$/) { ++ push(@anim_files, "$d/$f/$file"); ++ } ++ } ++ if (@anim_files) { ++ return; ++ } else { ++ die "$progname: Could not find $f cowfiles!\n"; ++ } ++ } + } + if ($full eq "") { + die "$progname: Could not find $f cowfile!\n"; +-- +2.40.0 + diff --git a/libre/cowsay/0002-add-example-animated-cow.patch b/libre/cowsay/0002-add-example-animated-cow.patch new file mode 100644 index 000000000..d03e5e0d5 --- /dev/null +++ b/libre/cowsay/0002-add-example-animated-cow.patch @@ -0,0 +1,411 @@ +From a9e29b8b19c8d4354da627a6cd32bf5f142e8eb1 Mon Sep 17 00:00:00 2001 +From: bill-auger <mr.j.spam.me@gmail.com> +Date: Mon, 20 Mar 2023 13:52:01 -0400 +Subject: [PATCH 2/5] add example animated cow + +--- + cows/backflip-cow/backflip-cow_01.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_01a.cow | 1 + + cows/backflip-cow/backflip-cow_01b.cow | 1 + + cows/backflip-cow/backflip-cow_01c.cow | 1 + + cows/backflip-cow/backflip-cow_01d.cow | 1 + + cows/backflip-cow/backflip-cow_01e.cow | 1 + + cows/backflip-cow/backflip-cow_02.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_03.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_03a.cow | 1 + + cows/backflip-cow/backflip-cow_03b.cow | 1 + + cows/backflip-cow/backflip-cow_03c.cow | 1 + + cows/backflip-cow/backflip-cow_03d.cow | 1 + + cows/backflip-cow/backflip-cow_03e.cow | 1 + + cows/backflip-cow/backflip-cow_04.cow | 1 + + cows/backflip-cow/backflip-cow_04a.cow | 1 + + cows/backflip-cow/backflip-cow_04b.cow | 1 + + cows/backflip-cow/backflip-cow_05.cow | 1 + + cows/backflip-cow/backflip-cow_06.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_07.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_08.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_09.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_10.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_11.cow | 18 ++++++++++++++++++ + cows/backflip-cow/backflip-cow_12.cow | 18 ++++++++++++++++++ + 24 files changed, 194 insertions(+) + create mode 100644 cows/backflip-cow/backflip-cow_01.cow + create mode 120000 cows/backflip-cow/backflip-cow_01a.cow + create mode 120000 cows/backflip-cow/backflip-cow_01b.cow + create mode 120000 cows/backflip-cow/backflip-cow_01c.cow + create mode 120000 cows/backflip-cow/backflip-cow_01d.cow + create mode 120000 cows/backflip-cow/backflip-cow_01e.cow + create mode 100644 cows/backflip-cow/backflip-cow_02.cow + create mode 100644 cows/backflip-cow/backflip-cow_03.cow + create mode 120000 cows/backflip-cow/backflip-cow_03a.cow + create mode 120000 cows/backflip-cow/backflip-cow_03b.cow + create mode 120000 cows/backflip-cow/backflip-cow_03c.cow + create mode 120000 cows/backflip-cow/backflip-cow_03d.cow + create mode 120000 cows/backflip-cow/backflip-cow_03e.cow + create mode 120000 cows/backflip-cow/backflip-cow_04.cow + create mode 120000 cows/backflip-cow/backflip-cow_04a.cow + create mode 120000 cows/backflip-cow/backflip-cow_04b.cow + create mode 120000 cows/backflip-cow/backflip-cow_05.cow + create mode 100644 cows/backflip-cow/backflip-cow_06.cow + create mode 100644 cows/backflip-cow/backflip-cow_07.cow + create mode 100644 cows/backflip-cow/backflip-cow_08.cow + create mode 100644 cows/backflip-cow/backflip-cow_09.cow + create mode 100644 cows/backflip-cow/backflip-cow_10.cow + create mode 100644 cows/backflip-cow/backflip-cow_11.cow + create mode 100644 cows/backflip-cow/backflip-cow_12.cow + +diff --git a/cows/backflip-cow/backflip-cow_01.cow b/cows/backflip-cow/backflip-cow_01.cow +new file mode 100644 +index 0000000..e82481e +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_01.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 1-6 of 24 (derived from default.cow) ++## ++ ++$the_cow = <<"EOC"; ++ $thoughts ++ $thoughts ++ $thoughts ++ $thoughts ++ $thoughts ++ $thoughts ++ $thoughts ++ $thoughts ^__^ ++ $thoughts ($eyes)\\_______ ++ (__)\\ )\\/\\ ++ $tongue ||----w | ++ || || ++EOC +diff --git a/cows/backflip-cow/backflip-cow_01a.cow b/cows/backflip-cow/backflip-cow_01a.cow +new file mode 120000 +index 0000000..b89d4b1 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_01a.cow +@@ -0,0 +1 @@ ++backflip-cow_01.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_01b.cow b/cows/backflip-cow/backflip-cow_01b.cow +new file mode 120000 +index 0000000..b89d4b1 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_01b.cow +@@ -0,0 +1 @@ ++backflip-cow_01.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_01c.cow b/cows/backflip-cow/backflip-cow_01c.cow +new file mode 120000 +index 0000000..b89d4b1 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_01c.cow +@@ -0,0 +1 @@ ++backflip-cow_01.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_01d.cow b/cows/backflip-cow/backflip-cow_01d.cow +new file mode 120000 +index 0000000..b89d4b1 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_01d.cow +@@ -0,0 +1 @@ ++backflip-cow_01.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_01e.cow b/cows/backflip-cow/backflip-cow_01e.cow +new file mode 120000 +index 0000000..b89d4b1 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_01e.cow +@@ -0,0 +1 @@ ++backflip-cow_01.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_02.cow b/cows/backflip-cow/backflip-cow_02.cow +new file mode 100644 +index 0000000..470bcc0 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_02.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 7,14-16 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts ++ $thoughts ++ ++ ^__^ ++ ($eyes) ++ (__) ++ / \\ ++ / \\ ++ //\\ \\ ++ || \\ ) ++ /\\_/ z ++ || ++EOC +diff --git a/cows/backflip-cow/backflip-cow_03.cow b/cows/backflip-cow/backflip-cow_03.cow +new file mode 100644 +index 0000000..1c0ac68 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_03.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 8-13,17 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts ++ $thoughts ++ ^__^ ++ ($eyes) ++ (__) ++ / \\ ++ / \\ ++ //\\ \\ ++ // \\ ) ++ W / z ++ // ++ // ++EOC +diff --git a/cows/backflip-cow/backflip-cow_03a.cow b/cows/backflip-cow/backflip-cow_03a.cow +new file mode 120000 +index 0000000..855953a +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_03a.cow +@@ -0,0 +1 @@ ++backflip-cow_03.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_03b.cow b/cows/backflip-cow/backflip-cow_03b.cow +new file mode 120000 +index 0000000..855953a +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_03b.cow +@@ -0,0 +1 @@ ++backflip-cow_03.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_03c.cow b/cows/backflip-cow/backflip-cow_03c.cow +new file mode 120000 +index 0000000..855953a +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_03c.cow +@@ -0,0 +1 @@ ++backflip-cow_03.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_03d.cow b/cows/backflip-cow/backflip-cow_03d.cow +new file mode 120000 +index 0000000..855953a +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_03d.cow +@@ -0,0 +1 @@ ++backflip-cow_03.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_03e.cow b/cows/backflip-cow/backflip-cow_03e.cow +new file mode 120000 +index 0000000..855953a +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_03e.cow +@@ -0,0 +1 @@ ++backflip-cow_03.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_04.cow b/cows/backflip-cow/backflip-cow_04.cow +new file mode 120000 +index 0000000..ea93634 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_04.cow +@@ -0,0 +1 @@ ++backflip-cow_02.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_04a.cow b/cows/backflip-cow/backflip-cow_04a.cow +new file mode 120000 +index 0000000..ea93634 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_04a.cow +@@ -0,0 +1 @@ ++backflip-cow_02.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_04b.cow b/cows/backflip-cow/backflip-cow_04b.cow +new file mode 120000 +index 0000000..ea93634 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_04b.cow +@@ -0,0 +1 @@ ++backflip-cow_02.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_05.cow b/cows/backflip-cow/backflip-cow_05.cow +new file mode 120000 +index 0000000..855953a +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_05.cow +@@ -0,0 +1 @@ ++backflip-cow_03.cow +\ No newline at end of file +diff --git a/cows/backflip-cow/backflip-cow_06.cow b/cows/backflip-cow/backflip-cow_06.cow +new file mode 100644 +index 0000000..2a5aad7 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_06.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 18 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts ++ $thoughts ++ ^__^ ++ ($eyes) ++ (__) ++ =====/ ++ | | ++ E | ++ =====/ ++ z ++ ++ ++EOC +diff --git a/cows/backflip-cow/backflip-cow_07.cow b/cows/backflip-cow/backflip-cow_07.cow +new file mode 100644 +index 0000000..355f5d7 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_07.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 19 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts ++ $thoughts ++ \\\\ __ ++ \\\\ ( ) ++ / \\_($eyes) ++ \\\\ / )v v ++ \\\\M / ++ \\ / ++ \\_/ ++ z ++ ++ ++EOC +diff --git a/cows/backflip-cow/backflip-cow_08.cow b/cows/backflip-cow/backflip-cow_08.cow +new file mode 100644 +index 0000000..61313d8 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_08.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 20 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<"EOC"; ++ $thoughts ++ $thoughts ++ || || ++ | m----|| __ $tongue ++ \\/\\(_______\\( ) ++ \\($eyes) ++ v v ++ ++ ++ ++ ++ ++EOC +diff --git a/cows/backflip-cow/backflip-cow_09.cow b/cows/backflip-cow/backflip-cow_09.cow +new file mode 100644 +index 0000000..4824c88 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_09.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 21 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts // ++ $thoughts // ++ z / M ++ ( \\ // ++ \\ \\// ++ \\ / ++ \\_/\ ++ ( ) ++ ($eyes) ++ v v ++ ++ ++EOC +diff --git a/cows/backflip-cow/backflip-cow_10.cow b/cows/backflip-cow/backflip-cow_10.cow +new file mode 100644 +index 0000000..9674225 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_10.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 22 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts ++ $thoughts ++ z ++ /===== ++ | E ++ | | ++ /===== ++ ( ) ++ ($eyes) ++ v v ++ ++ ++EOC +diff --git a/cows/backflip-cow/backflip-cow_11.cow b/cows/backflip-cow/backflip-cow_11.cow +new file mode 100644 +index 0000000..63bed17 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_11.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 23 of 24 - bill-auger <bill-auger@programmer.net> ++## License: CC-zero ++## ++$the_cow = <<EOC; ++ $thoughts ++ $thoughts ++ ++ ++ _z ++ ^__^ / \\ ++ ($eyes) / \\ ++ (__)/ W\\\\ ++ \\ / \\\\ ++ \\ / ++ \\\\ ++ \\\\ ++EOC +diff --git a/cows/backflip-cow/backflip-cow_12.cow b/cows/backflip-cow/backflip-cow_12.cow +new file mode 100644 +index 0000000..129dc44 +--- /dev/null ++++ b/cows/backflip-cow/backflip-cow_12.cow +@@ -0,0 +1,18 @@ ++## ++## Animated cow - frame 24 of 24 (derived from default.cow) ++## ++ ++$the_cow = <<"EOC"; ++ $thoughts ++ $thoughts ++ ++ ++ ++ ++ ++ ^__^ ++ ($eyes)\\_______ ++ (__)\\ )\\/\\ ++ $tongue ||----w | ++ || || ++EOC +-- +2.40.0 + diff --git a/libre/cowsay/0003-implement-animation-stepping.patch b/libre/cowsay/0003-implement-animation-stepping.patch new file mode 100644 index 000000000..016eb67ed --- /dev/null +++ b/libre/cowsay/0003-implement-animation-stepping.patch @@ -0,0 +1,82 @@ +From 6702d9cd6c06015950adac6e873d2d95b8ed9eb0 Mon Sep 17 00:00:00 2001 +From: bill-auger <mr.j.spam.me@gmail.com> +Date: Tue, 21 Mar 2023 13:56:40 -0400 +Subject: [PATCH 3/5] implement animation stepping + +--- + cowsay | 47 +++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 39 insertions(+), 8 deletions(-) + +diff --git a/cowsay b/cowsay +index dc49542..aa356df 100755 +--- a/cowsay ++++ b/cowsay +@@ -45,7 +45,7 @@ if (($^O eq "MSWin32") or ($^O eq "Windows_NT")) { ## Many perls, eek! + 'W' => 40, + ); + +-getopts('bde:f:ghlLnNpstT:wW:y', \%opts); ++getopts('abde:f:ghlLnNpstT:wW:y', \%opts); + + &display_usage if $opts{'h'}; + &list_cowfiles if $opts{'l'}; +@@ -76,18 +76,49 @@ else { + my $anim_duration = 3000000; + my $n_anim_files = @anim_files; + my $sleep_ivl = $anim_duration / $n_anim_files; +- my $clear_string = `clear`; ++ $clear_string = `clear`; ++ $frame_n = 0; ++ $key = ''; + +- for my $full (@anim_files) { +- do $full; +- die "$progname: $@\n" if $@; ++ # step through animation ++ if ($opts{'a'}) { ++ use Term::ReadKey; + +- print $clear_string; +- &print_cow; +- usleep($sleep_ivl); ++ while (not $key =~ /q/) { ++ if ($key =~ /,/ and $frame_n > 0 ) { --$frame_n; } ++ elsif ($key =~ /\./ and $frame_n < $n_anim_files - 1) { ++$frame_n; } ++ $full = $anim_files[$frame_n]; ++ &print_frame; ++ &read_key; ++ } ++ # play complete animation ++ } else { ++ for $full (@anim_files) { ++ &print_frame; ++ usleep($sleep_ivl); ++ } + } + } + ++sub read_key { ++ $key = ''; ++ ++ while (not $key =~ /,|\.|q/) { ++ ReadMode('cbreak'); ++ $key = ReadKey(0); ++ ReadMode('normal'); ++ } ++} ++ ++sub print_frame { ++ do $full; ++ die "$progname: $@\n" if $@; ++ ++ print $clear_string; ++ &print_cow; ++ if ($opts{'a'}) { print "frame[$frame_n]: $full\n"; } ++} ++ + sub print_cow { + print @balloon_lines; + print $the_cow; +-- +2.40.0 + diff --git a/libre/cowsay/0004-document-animated-cows-and-the-a-option.patch b/libre/cowsay/0004-document-animated-cows-and-the-a-option.patch new file mode 100644 index 000000000..6ff33293f --- /dev/null +++ b/libre/cowsay/0004-document-animated-cows-and-the-a-option.patch @@ -0,0 +1,88 @@ +From 5abcb646c508606f4e30e6f566cc733f3f847c21 Mon Sep 17 00:00:00 2001 +From: bill-auger <mr.j.spam.me@gmail.com> +Date: Tue, 21 Mar 2023 18:21:19 -0400 +Subject: [PATCH 4/5] document animated cows and the `-a` option + +--- + cowsay.1 | 44 +++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 41 insertions(+), 3 deletions(-) + +diff --git a/cowsay.1 b/cowsay.1 +index 7133866..8c8d45a 100644 +--- a/cowsay.1 ++++ b/cowsay.1 +@@ -24,7 +24,7 @@ cowsay + .IR tongue_string ] + .RB [ \-W + .IR column ] +-.RB [ \-bdgpstwy ] ++.RB [ \-abdgpstwy ] + .SH DESCRIPTION + .I Cowsay + generates an ASCII picture of a cow saying something provided by the +@@ -56,7 +56,7 @@ accept standard input for a message in this case. + There are several provided modes which change the appearance of the + cow depending on its particular emotional/physical state. The + .B \-b +-option initiates Borg mode; ++option initiates Borg mode; + .B \-d + causes the cow to appear dead; + .B \-g +@@ -108,7 +108,15 @@ with the + .B \-l + switch. + .PP +-If the program is invoked as ++The ++.B \-a ++option initiates animation single-stepping mode. This allows stepping forwards ++and backwards through an animation sequence, frame-by-frame, at your own pace. ++This helps greatly while creating and fine-tuning the animated .cow files. In ++this way, you can watch closely, to see how the picture changes from one frame ++to the next. ++.PP ++If the program is invoked as + .B cowthink + then the cow will think its message instead of saying it. + .PP +@@ -131,6 +139,36 @@ interpolation. The name of a cowfile should end with + otherwise it is assumed not to be a cowfile. Also, at-signs (``@'') + must be backslashed because that is what Perl 5 expects. + .PP ++.SH ANIMATED COWS ++.PP ++Animations are simply multiple normal .cow files, which wil be show one after ++the other. To create new animated cows (or any other criters), make a new ++directory and add all of the animation files to the directory. The name of the ++directory will be the name given by `cowsay -l`. The names of the files within ++are arbitrary; but note that they will be shown in alphabetical order. ++.PP ++By passing the `-a` option, you can to step through an animation sequence, ++frame-by-frame. Press the 'period' key to step forward by one frame. Press the ++'comma' key to step backward by one frame. Press the 'q' key to quit. ++.PP ++For creating new cows and experimenting with a source-code distribution, ++(aka: "in-tree", without installing the program), run cowsay like this: ++ $ export COWPATH=./cows ; perl ./cowsay -f <COW_NAME> moo ; ++.PP ++\... where `-f <COW_NAME>` may be a cow name (per `cowsay -l`), a .cow filename, ++or an animation directory name - <COW_NAME> may also be a filesystem path, ++in which case, the `export` command may be omitted. See EXAMPLES below. ++.PP ++EXAMPLES: ++ For a single cow: ++ $ perl ./cowsay -f ./cows/default.cow moo ++ Or for a single animation frame: ++ $ perl ./cowsay -f ./cows/backflip-cow/backflip-cow_1.cow moo ++ To run a complete animation sequence: ++ $ COWPATH=./cows perl ./cowsay -f backflip-cow moo ++ To step through an animation sequence: ++ $ COWPATH=./cows perl ./cowsay -f backflip-cow -a moo ++.PP + .SH COMPATIBILITY WITH OLDER VERSIONS + .PP + What older versions? :-) +-- +2.40.0 + diff --git a/libre/cowsay/0005-clarify-licensing.patch b/libre/cowsay/0005-clarify-licensing.patch new file mode 100644 index 000000000..1a86b6910 --- /dev/null +++ b/libre/cowsay/0005-clarify-licensing.patch @@ -0,0 +1,44 @@ +From 7af7b4b7c7752c07735613684921c025caa08a4a Mon Sep 17 00:00:00 2001 +From: bill-auger <mr.j.spam.me@gmail.com> +Date: Wed, 22 Mar 2023 12:05:25 -0400 +Subject: [PATCH 5/5] clarify licensing + +this was clearly the author's intention, per the last changelog entry + +> 3.04 24 June 2016 +> - Licensing terms have changed to GPLv3. +--- + cowsay | 3 ++- + cowsay.1 | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/cowsay b/cowsay +index aa356df..e05d20b 100755 +--- a/cowsay ++++ b/cowsay +@@ -1,7 +1,8 @@ + #%BANGPERL% + + ## +-## Cowsay 3.03 ++## Cowsay 3.04 ++## SPDX-License-Identifier: GPL-3.0-only + ## + ## This file is part of cowsay. (c) 1999-2000 Tony Monroe. + ## - animation feature: (c) 2023 bill-auger <bill-auger@programmer.net> +diff --git a/cowsay.1 b/cowsay.1 +index 8c8d45a..a7e281a 100644 +--- a/cowsay.1 ++++ b/cowsay.1 +@@ -202,5 +202,8 @@ If there are any, please notify the author at the address below. + Tony Monroe (tony@nog.net), with suggestions from Shannon + Appel (appel@CSUA.Berkeley.EDU) and contributions from Anthony Polito + (aspolito@CSUA.Berkeley.EDU). ++Animation feature by Bill Auger <bill-auger@programmer.net>. ++.SH LICENSE ++GPLv3 + .SH SEE ALSO + perl(1), wall(1), nwrite(1), figlet(6) +-- +2.40.0 + diff --git a/libre/cowsay/PKGBUILD b/libre/cowsay/PKGBUILD index ce20b9bed..6de15eee6 100644 --- a/libre/cowsay/PKGBUILD +++ b/libre/cowsay/PKGBUILD @@ -1,32 +1,92 @@ -# $Id$ # Maintainer (arch): Guillaume ALAUX <guillaume@archlinux.org> # Contributor: Eric Belanger <eric@archlinux.org> # Contributor: Sarah Hay <sarahhay@mb.sympatico.ca> # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> +# Contributor: bill-auger <bill-auger@programmer.net> + + +# parabola changes and rationale: +# - change web URL to new active fork +# - add custom animation feature (offered to upstream) + pkgname=cowsay -pkgver=3.03 -pkgrel=9.parabola1 -pkgdesc='Configurable talking cow (and a few other creatures), without nonfree cows' +pkgver=3.04 +pkgrel=2 +pkgrel+=.parabola1 +pkgdesc='Configurable talking cow (and a few other creatures)' arch=('any') -url='http://www.nog.net/~tony/warez/' +url=https://web.archive.org/web/20120527202447/http://www.nog.net/~tony/warez/cowsay.shtml license=('PerlArtistic' 'GPL') depends=('perl') -#http://www.nog.net/~tony/warez/${pkgname}-${pkgver}.tar.gz -source=(http://http.debian.net/debian/pool/main/c/${pkgname}/${pkgname}_${pkgver}+dfsg1.orig.tar.gz - cowsay.patch) -sha256sums=('10bae895d9afb2d720d2211db58f396352b00fe1386c369ca3608cbf6497b839' - 'aa88442a31f01ffe5884b3ae974ed1ced23d860859d7f2234cdcd3ac437fc17f') +mksource=(https://github.com/tnalpgge/rank-amateur-cowsay/archive/cowsay-$pkgver.tar.gz + cowsay.patch) +mksource+=(0001-implement-animated-cows.patch + 0002-add-example-animated-cow.patch + 0003-implement-animation-stepping.patch + 0004-document-animated-cows-and-the-a-option.patch + 0005-clarify-licensing.patch) +source=(https://repo.parabola.nu/other/${pkgname}/${pkgname}-${pkgver}-libre.tar.gz{,.sig}) +mksha512sums=('99d21ef9a7c7c76056cb7acb2c771fbdabfedde4f6edb5d3035337c59f9e88944690d1b43282c32827ad79339199716366c8be73b0dea09063ec2d52220c1b51' + '4c70074fc88e741f2eb4daa04a55ef3ff0638bffda907fe451299aeb2271a3b09c4b73df4d3eb83f6ac91b9cb05530bb2a59df81c72602728441254624a05327') +mksha512sums+=('8a6cc472066d23177276f56ee0947d01cdf951b34d313dcae527e3d9e45d6d4387db390ede7bbf4a73ba4397fac876303224479ca02a45e4503a675496273ce6' + '19d1cb3a46c4a1b850b8e6feba7bdc2f5a31025235db0d5299f77af34f80249a09381986f0f9f251ac2aaf45e8a7f53463a248ed5776d9d725aea00eeba28081' + 'c361d85475a8cc7eb72ba4344be62cc1c2326096301af4ed04b15ff9c5790cf1ad7a71e3729888ea39d0ecb8d8eb68da8c6220a8326dedb4ec1717cad7067bfa' + '84bbdf1f5563566be1165593e8ac591623ac4092f30c81dd100d45fec72a5d17e984fae2c6be6dc1663cfd0f593ae06cd61383426805dfd15a84ffa91ec424a7' + '3414bfefa006dc95aefe6119f0385a786aa3aab2eaf84dcab6a8239957f0b43aa942a31a1321dce78a9026cce282a16d2f82c58ef5c306b24e966b1fe4d40f6d') +sha512sums=('1481615a923eca349f45d34bb101b964540c6b507097ad14a3d48e065455c715d12cd2d1dae6af8e6021d1e1e5716fce019ff5d283bba8934e999c39c337e396' + SKIP) +validpgpkeys=('3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger + + +mksource() { + cd ${srcdir}/rank-amateur-cowsay-${pkgname}-${pkgver} + + patch -p1 -i "${srcdir}"/0001-implement-animated-cows.patch + patch -p1 -i "${srcdir}"/0002-add-example-animated-cow.patch + patch -p1 -i "${srcdir}"/0003-implement-animation-stepping.patch + patch -p1 -i "${srcdir}"/0004-document-animated-cows-and-the-a-option.patch + patch -p1 -i "${srcdir}"/0005-clarify-licensing.patch + + # remove useless files + rm cows/*.pm + + # remove offensive[sic] and vaguely copyright-infringing cows + rm cows/beavis.zen.cow + rm cows/bong.cow + mv cows/{bud-,}frogs.cow ; sed -i '/^#/d' cows/frogs.cow ; + rm cows/ghostbusters.cow + rm cows/head-in.cow + rm cows/hellokitty.cow + rm cows/luke-koala.cow + rm cows/mutilated.cow + rm cows/ren.cow + rm cows/satanic.cow + rm cows/sodomized.cow + rm cows/stimpy.cow + rm cows/surgery.cow + rm cows/telebears.cow + rm cows/vader.cow + rm cows/vader-koala.cow + + # for some reason, arch patches this in build() + cp "$srcdir"/cowsay.patch . +} + +prepare() { + # for some reason, arch patches this in build() + cp rank-amateur-cowsay-${pkgname}-${pkgver}/cowsay.patch "${srcdir}"/ +} build() { - cd ${srcdir}/${pkgname}-${pkgver}+dfsg1 - patch -p1 -i $srcdir/cowsay.patch + cd rank-amateur-cowsay-${pkgname}-${pkgver} + patch -p1 -i "$srcdir"/cowsay.patch sed -i 's|/man/|/share/man/|' install.sh } package() { - cd ${srcdir}/${pkgname}-${pkgver}+dfsg1 + cd rank-amateur-cowsay-${pkgname}-${pkgver} echo "${pkgdir}/usr" | ./install.sh # This one is not a valid '.cow' file - rm ${pkgdir}/usr/share/cows/mech-and-cow + rm "${pkgdir}"/usr/share/cows/mech-and-cow } |