sherpa: remove paths to compiler wrappers and use the provided libtool (#43611)

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
This commit is contained in:
Juan Miguel Carceller 2024-04-13 22:24:26 +02:00 committed by GitHub
parent 7f13518225
commit e220674c4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,10 +159,12 @@ class Sherpa(AutotoolsPackage):
# Note that the delphes integration seems utterly broken: https://sherpa.hepforge.org/trac/ticket/305 # Note that the delphes integration seems utterly broken: https://sherpa.hepforge.org/trac/ticket/305
depends_on("autoconf", type="build") # autotools dependencies are needed at runtime to compile processes
depends_on("automake", type="build") # at least as long as sherpa is an autotools package
depends_on("libtool", type="build") depends_on("autoconf")
depends_on("m4", type="build") depends_on("automake")
depends_on("libtool")
depends_on("m4")
depends_on("texinfo", type="build") depends_on("texinfo", type="build")
depends_on("sqlite") depends_on("sqlite")
@ -187,6 +189,8 @@ class Sherpa(AutotoolsPackage):
depends_on("hztool", when="+hztool") depends_on("hztool", when="+hztool")
# depends_on('cernlib', when='+cernlib') # depends_on('cernlib', when='+cernlib')
filter_compiler_wrappers("share/SHERPA-MC/makelibs")
for std in _cxxstd_values: for std in _cxxstd_values:
depends_on("root cxxstd=" + std, when="+root cxxstd=" + std) depends_on("root cxxstd=" + std, when="+root cxxstd=" + std)
@ -261,3 +265,14 @@ def flag_handler(self, name, flags):
flags.append("-m64") flags.append("-m64")
return (None, None, flags) 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")