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 @@ def flag_handler(self, name, flags): 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")