From 0b3a40974609a82e1619eef8a3cb56fd7e498233 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Tue, 5 Jul 2022 09:10:45 +0200 Subject: nag: fix installation of man pages (#31428) --- var/spack/repos/builtin/packages/nag/chmod_man.patch | 11 +++++++++++ var/spack/repos/builtin/packages/nag/package.py | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/nag/chmod_man.patch (limited to 'var') 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') -- cgit v1.2.3-70-g09d2