From e220674c4da39d73444f2a293f6db7b1245a2b9f Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sat, 13 Apr 2024 22:24:26 +0200 Subject: sherpa: remove paths to compiler wrappers and use the provided libtool (#43611) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/sherpa/package.py | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/sherpa/package.py b/var/spack/repos/builtin/packages/sherpa/package.py index 5bb3470216..95a8bcfebd 100644 --- a/var/spack/repos/builtin/packages/sherpa/package.py +++ b/var/spack/repos/builtin/packages/sherpa/package.py @@ -159,10 +159,12 @@ class Sherpa(AutotoolsPackage): # Note that the delphes integration seems utterly broken: https://sherpa.hepforge.org/trac/ticket/305 - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + # autotools dependencies are needed at runtime to compile processes + # at least as long as sherpa is an autotools package + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") depends_on("texinfo", type="build") depends_on("sqlite") @@ -187,6 +189,8 @@ class Sherpa(AutotoolsPackage): depends_on("hztool", when="+hztool") # depends_on('cernlib', when='+cernlib') + filter_compiler_wrappers("share/SHERPA-MC/makelibs") + for std in _cxxstd_values: depends_on("root cxxstd=" + std, when="+root cxxstd=" + std) @@ -261,3 +265,14 @@ class Sherpa(AutotoolsPackage): flags.append("-m64") return (None, None, flags) + + # This may not be needed when this package is changed to be a CMake package + # since it's specific to makelibs + def install(self, spec, prefix): + # Make sure the path to the provided libtool is used instead of the system one + filter_file( + r"autoreconf -fi", + f"autoreconf -fi -I {self.spec['libtool'].prefix.share.aclocal}", + "AMEGIC++/Main/makelibs", + ) + make("install") -- cgit v1.2.3-70-g09d2