diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2022-01-02 19:50:26 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 20:50:26 -0500 |
commit | d6d1d33e884fec0b5ba3eb9535e8350eb6f02db2 (patch) | |
tree | 35299daf8cd9813f18bd3974a5bfdadb68b72550 | |
parent | 89830c211702101beb7bbb76ce87f3db6db30fcb (diff) | |
download | spack-d6d1d33e884fec0b5ba3eb9535e8350eb6f02db2.tar.gz spack-d6d1d33e884fec0b5ba3eb9535e8350eb6f02db2.tar.bz2 spack-d6d1d33e884fec0b5ba3eb9535e8350eb6f02db2.tar.xz spack-d6d1d33e884fec0b5ba3eb9535e8350eb6f02db2.zip |
libtiff: fix build on macOS Monterey (#28185)
* libtiff: fix build on macOS Monterey
* patch configure, not configure.ac
* Revert "patch configure, not configure.ac"
This reverts commit 8bf315cb22f17bece5b4fa671120dbd05ff96f27.
* Force Spack to run autoreconf using new patch
-rw-r--r-- | var/spack/repos/builtin/packages/libtiff/no-include-root.patch | 51 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libtiff/package.py | 12 |
2 files changed, 63 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libtiff/no-include-root.patch b/var/spack/repos/builtin/packages/libtiff/no-include-root.patch new file mode 100644 index 0000000000..edd02c6c79 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtiff/no-include-root.patch @@ -0,0 +1,51 @@ +From b25618f6fcaf5b39f0a5b6be3ab2fb288cf7a75b Mon Sep 17 00:00:00 2001 +From: Timothy Lyanguzov <timothy.lyanguzov@sap.com> +Date: Thu, 29 Apr 2021 13:14:18 +1200 +Subject: [PATCH] Prevent adding root directory to include list + +there is a file VERSION in the root directory which clashes with C++20 standard header <version> +"config.h" file is created in "config" subdirectory to prevent adding "-I.." to generated Makefile + +closes #218, #252 +--- + .gitignore | 2 ++ + configure.ac | 12 ++++++------ + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9e419fba..9e992792 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1080,7 +1080,7 @@ dnl --------------------------------------------------------------------------- + + AC_SUBST(LIBDIR) + +-AC_CONFIG_HEADERS([config.h libtiff/tif_config.h libtiff/tiffconf.h port/libport_config.h]) ++AC_CONFIG_HEADERS([config/config.h libtiff/tif_config.h libtiff/tiffconf.h port/libport_config.h]) + + AC_CONFIG_FILES([Makefile \ + build/Makefile \ +@@ -1095,15 +1095,15 @@ AC_CONFIG_FILES([Makefile \ + contrib/stream/Makefile \ + contrib/tags/Makefile \ + contrib/win_dib/Makefile \ +- html/Makefile \ ++ html/Makefile \ + html/images/Makefile \ + html/man/Makefile \ +- libtiff-4.pc \ +- libtiff/Makefile \ +- man/Makefile \ ++ libtiff-4.pc \ ++ libtiff/Makefile \ ++ man/Makefile \ + port/Makefile \ + test/Makefile \ +- tools/Makefile]) ++ tools/Makefile]) + AC_OUTPUT + + dnl --------------------------------------------------------------------------- +-- +GitLab + diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py index e484b5fc75..e0021b4606 100644 --- a/var/spack/repos/builtin/packages/libtiff/package.py +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -55,6 +55,18 @@ class Libtiff(AutotoolsPackage): conflicts('+zstd', when='@:4.0.9') conflicts('+webp', when='@:4.0.9') + # https://gitlab.com/libtiff/libtiff/-/merge_requests/243 + patch('no-include-root.patch', when='@4.3.0') + + depends_on('automake', when='@4.3.0', type='build') + depends_on('autoconf', when='@4.3.0', type='build') + depends_on('libtool', when='@4.3.0', type='build') + depends_on('m4', when='@4.3.0', type='build') + + @property + def force_autoreconf(self): + return self.spec.satisfies('@4.3.0') + def patch(self): # Remove flags not recognized by the NVIDIA compiler if self.spec.satisfies('%nvhpc@:20.11'): |