summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2022-07-05 09:10:45 +0200
committerGitHub <noreply@github.com>2022-07-05 09:10:45 +0200
commit0b3a40974609a82e1619eef8a3cb56fd7e498233 (patch)
treea8243aa81db58453fbdf076513d7674e9a806afc
parent18ab94de4b6574e431a79623db6af5b320a33a41 (diff)
downloadspack-0b3a40974609a82e1619eef8a3cb56fd7e498233.tar.gz
spack-0b3a40974609a82e1619eef8a3cb56fd7e498233.tar.bz2
spack-0b3a40974609a82e1619eef8a3cb56fd7e498233.tar.xz
spack-0b3a40974609a82e1619eef8a3cb56fd7e498233.zip
nag: fix installation of man pages (#31428)
-rw-r--r--var/spack/repos/builtin/packages/nag/chmod_man.patch11
-rw-r--r--var/spack/repos/builtin/packages/nag/package.py6
2 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/nag/chmod_man.patch b/var/spack/repos/builtin/packages/nag/chmod_man.patch
new file mode 100644
index 0000000000..0753d29068
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nag/chmod_man.patch
@@ -0,0 +1,11 @@
+--- a/INSTALLU.sh
++++ b/INSTALLU.sh
+@@ -267,7 +267,7 @@ if [ ! -z "${mandir-}" ]; then
+ for i in man/*.${manext}; do
+ i_base=`basename "$i"`
+ $move "$i" "${mandir}${manext}"
+- chmod 644 "${mandir}${manext}"
++ chmod 644 "${mandir}${manext}/${i_base}"
+ if [ "${whoami}" = "root" ]; then
+ $chown $owner "${mandir}${manext}/${i_base}"
+ $chgrp $group "${mandir}${manext}/${i_base}"
diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py
index cb7f14b4fe..94b8e84e0f 100644
--- a/var/spack/repos/builtin/packages/nag/package.py
+++ b/var/spack/repos/builtin/packages/nag/package.py
@@ -28,6 +28,10 @@ class Nag(Package):
license_vars = ['NAG_KUSARI_FILE']
license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt'
+ # The installation script erroneously revokes execute permissions for the
+ # installation directory of the man pages and therefore fails to copy all the files:
+ patch('chmod_man.patch', when='@7.0:')
+
def url_for_version(self, version):
# TODO: url and checksum are architecture dependent
# TODO: We currently only support x86_64
@@ -38,7 +42,7 @@ class Nag(Package):
# Set installation directories
os.environ['INSTALL_TO_BINDIR'] = prefix.bin
os.environ['INSTALL_TO_LIBDIR'] = prefix.lib
- os.environ['INSTALL_TO_MANDIR'] = prefix + '/share/man/man'
+ os.environ['INSTALL_TO_MANDIR'] = prefix.share.man.man
# Run install script
os.system('./INSTALLU.sh')