diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index e1b6f69b8cc3b9..a49adf19b8cb62 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -23,6 +23,7 @@ class Proj(CMakePackage, AutotoolsPackage): # Many packages that depend on proj do not yet support the newer API. # See https://github.com/OSGeo/PROJ/wiki/proj.h-adoption-status + version("9.2.1", sha256="15ebf4afa8744b9e6fccb5d571fc9f338dc3adcf99907d9e62d1af815d4971a1") version("9.2.0", sha256="dea816f5aa732ae6b2ee3977b9bdb28b1d848cf56a1aad8faf6708b89f0ed50e") version("9.1.1", sha256="003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39") version("9.1.0", sha256="81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315") @@ -78,6 +79,12 @@ class Proj(CMakePackage, AutotoolsPackage): when="@:6", ) + patch( + "https://github.com/OSGeo/PROJ/commit/3f38a67a354a3a1e5cca97793b9a43860c380d95.patch?full_index=1", + sha256="dc620ff1bbcc0ef4130d53a40a8693a1e2e72ebf83bd6289f1139d0f1aad2a40", + when="@7:7.2.1", + ) + # https://proj.org/install.html#build-requirements with when("build_system=cmake"): depends_on("cmake@3.9:", when="@6:", type="build") @@ -125,6 +132,8 @@ def cmake_args(self): args = [ self.define_from_variant("ENABLE_TIFF", "tiff"), self.define_from_variant("ENABLE_CURL", "curl"), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), ] if self.spec.satisfies("@6:") and self.pkg.run_tests: args.append(self.define("USE_EXTERNAL_GTEST", True)) @@ -149,7 +158,7 @@ def configure_args(self): args.extend(self.enable_or_disable("shared")) args.extend(self.with_or_without("pic")) - if self.spec["libtiff"].satisfies("+jpeg~shared"): + if self.spec.satisfies("^libtiff+jpeg~shared"): args.append("LDFLAGS=%s" % self.spec["jpeg"].libs.ld_flags) args.append("LIBS=%s" % self.spec["jpeg"].libs.link_flags)