1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/netpbm/hotfix-shared.patch
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
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
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
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";
24 # This works on Cp from "4th Berkeley Distribution", July 1994.
26 - # -R means recursive with no dereferencing of symlinks
27 # -p means preserve attributes
28 - $cpCommand = "cp -R -p";
29 + $cpCommand = "cp -p -d";
37 +sub installManPages($$) {
39 + my ($srcdir, $dstdir) = @_;
41 + if (! -d ($dstdir)) {
42 + my $succeeded = mkdir($dstdir, 0777);
45 + print("Unable to create directory '$dstdir'. " .
51 + my $rc = system("$cpCommand $srcdir/* $dstdir/");
54 + print("copy of man pages from $srcdir to $dstdir failed.\n");
55 + print("cp exit code is $rc\n");
59 sub installManPage($$$) {
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");
72 - print("copy of man pages from $pkgdir/man to $manDir failed.\n");
73 - print("cp exit code is $rc\n");
81 removeObsoleteManPage($manDir);