mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.0 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/x11/netpbm/shared_files-fix.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- netpbm-10.12/buildtools/installnetpbm.pl.orig 2004-03-03 11:10:51.000000000 +0100
  20. +++ netpbm-10.12/buildtools/installnetpbm.pl 2004-03-03 12:03:52.000000000 +0100
  21. @@ -140,13 +140,12 @@
  22. if (`cp --version 2>/dev/null` =~ m/GNU/) {
  23. # It's GNU Cp -- we have options galore, and they're readable.
  24. - $cpCommand = "cp --recursive --preserve --no-dereference";
  25. + $cpCommand = "cp --preserve --no-dereference";
  26. } else {
  27. # This works on Cp from "4th Berkeley Distribution", July 1994.
  28. # Mac OSX has this.
  29. - # -R means recursive with no dereferencing of symlinks
  30. # -p means preserve attributes
  31. - $cpCommand = "cp -R -p";
  32. + $cpCommand = "cp -p -d";
  33. }
  34. return($cpCommand);
  35. }
  36. @@ -662,8 +661,30 @@
  37. }
  38. +sub installManPages($$) {
  39. +
  40. + my ($srcdir, $dstdir) = @_;
  41. +
  42. + if (! -d ($dstdir)) {
  43. + my $succeeded = mkdir($dstdir, 0777);
  44. +
  45. + if (!$succeeded) {
  46. + print("Unable to create directory '$dstdir'. " .
  47. + "Error=$ERRNO\n");
  48. + return;
  49. + }
  50. + }
  51. -sub installManPage($$) {
  52. + my $rc = system("$cpCommand $srcdir/* $dstdir/");
  53. +
  54. + if ($rc != 0) {
  55. + print("copy of man pages from $srcdir to $dstdir failed.\n");
  56. + print("cp exit code is $rc\n");
  57. + }
  58. +}
  59. +
  60. +
  61. +sub installManDirectories($$) {
  62. # Note: This installs the pointer man pages and the netpbm.url file for Manweb.
  63. @@ -674,16 +695,11 @@
  64. print("Installing man pages...\n");
  65. - my $rc = system("$cpCommand $pkgdir/man/* $manDir/");
  66. -
  67. - if ($rc != 0) {
  68. - print("copy of man pages from $pkgdir/man to $manDir failed.\n");
  69. - print("cp exit code is $rc\n");
  70. - } else {
  71. - print("done.\n");
  72. - }
  73. + installManPages("$pkgdir/man/man1", "$manDir/man1");
  74. + installManPages("$pkgdir/man/man3", "$manDir/man3");
  75. + installManPages("$pkgdir/man/man5", "$manDir/man5");
  76. - print("\n");
  77. + print("done\n");
  78. removeObsoleteManPage($manDir);
  79. @@ -730,7 +746,7 @@
  80. installHeader($pkgdir, $prefix);
  81. print("\n");
  82. -installManPage($pkgdir, $prefix);
  83. +installManDirectories($pkgdir, $prefix);
  84. print("\n");
  85. print("Installation is complete (except where previous error messages have\n");