Dash:
[t2.git] / package / graphic / netpbm / hotfix-shared.patch
blob15e9ff4b0da4e31665ad0d7da4e84163ad1270ad
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/netpbm/hotfix-shared.patch
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
13 # version.
14 # --- T2-COPYRIGHT-NOTE-END ---
15 --- netpbm-10.25/buildtools/installnetpbm.pl 2003-11-05 23:35:37.000000000 +0100
16 +++ netpbm-10.25-t2/buildtools/installnetpbm.pl 2004-10-18 17:46:15.739386208 +0200
17 @@ -146,13 +146,12 @@
19 if (`cp --version 2>/dev/null` =~ m/GNU/) {
20 # It's GNU Cp -- we have options galore, and they're readable.
21 - $cpCommand = "cp --recursive --preserve --no-dereference";
22 + $cpCommand = "cp --preserve --no-dereference";
23 } else {
24 # This works on Cp from "4th Berkeley Distribution", July 1994.
25 # Mac OSX has this.
26 - # -R means recursive with no dereferencing of symlinks
27 # -p means preserve attributes
28 - $cpCommand = "cp -R -p";
29 + $cpCommand = "cp -p -d";
31 return($cpCommand);
33 @@ -734,6 +733,28 @@
37 +sub installManPages($$) {
39 + my ($srcdir, $dstdir) = @_;
41 + if (! -d ($dstdir)) {
42 + my $succeeded = mkdir($dstdir, 0777);
44 + if (!$succeeded) {
45 + print("Unable to create directory '$dstdir'. " .
46 + "Error=$ERRNO\n");
47 + return;
48 + }
49 + }
51 + my $rc = system("$cpCommand $srcdir/* $dstdir/");
53 + if ($rc != 0) {
54 + print("copy of man pages from $srcdir to $dstdir failed.\n");
55 + print("cp exit code is $rc\n");
56 + }
59 sub installManPage($$$) {
62 @@ -745,16 +766,11 @@
64 print("Installing man pages...\n");
66 - my $rc = system("$cpCommand $pkgdir/man/* $manDir/");
67 + installManPages("$pkgdir/man/man1", "$manDir/man1");
68 + installManPages("$pkgdir/man/man3", "$manDir/man3");
69 + installManPages("$pkgdir/man/man5", "$manDir/man5");
71 - if ($rc != 0) {
72 - print("copy of man pages from $pkgdir/man to $manDir failed.\n");
73 - print("cp exit code is $rc\n");
74 - } else {
75 - print("done.\n");
76 - }
78 - print("\n");
79 + print("done\n");
81 removeObsoleteManPage($manDir);