<commit_before># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Dire(Package):
    """DIRE (short for dipole resummation) a C++ program for all-order
    radiative corrections to scattering processes in high-energy particle
    collisions."""

    homepage = "https://dire.gitlab.io/"
    url      = "https://dire.gitlab.io/Downloads/DIRE-2.004.tar.gz"
    git      = "https://gitlab.com/dire/direforpythia"
    list_url = "https://dire.gitlab.io/Downloads.html"

    tags = ['hep']

    maintainer = ['mdiefent']

    version('2.004', sha256='8cc1213b58fec744fdaa50834560a14b141de99efb2c3e3d3d47f3d6d84b179f')

    depends_on('zlib')
    depends_on('boost')
    depends_on('lhapdf')
    depends_on('hepmc')
    depends_on('pythia8@8226:8244')

    def install(self, spec, prefix):
        configure_args = ['--prefix={0}'.format(prefix)]
        configure_args.append(
            '--with-pythia8={0}'.format(spec['pythia8'].prefix))
        configure(*configure_args)
        make()
        # Open bug: https://gitlab.com/wdconinc/direforpythia/-/merge_requests/1
        filter_file('-Wl,-rpath ',
                    self.compiler.cc_rpath_arg,
                    'bin/dire-config')
        make('install')<commit_msg>dire: Fix depends for new pythia version scheme (#26294)<commit_after># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Dire(Package):
    """DIRE (short for dipole resummation) a C++ program for all-order
    radiative corrections to scattering processes in high-energy particle
    collisions."""

    homepage = "https://dire.gitlab.io/"
    url      = "https://dire.gitlab.io/Downloads/DIRE-2.004.tar.gz"
    git      = "https://gitlab.com/dire/direforpythia"
    list_url = "https://dire.gitlab.io/Downloads.html"

    tags = ['hep']

    maintainer = ['mdiefent']

    version('2.004', sha256='8cc1213b58fec744fdaa50834560a14b141de99efb2c3e3d3d47f3d6d84b179f')

    depends_on('zlib')
    depends_on('boost')
    depends_on('lhapdf')
    depends_on('hepmc')
    depends_on('pythia8@8.226:')

    conflicts('pythia8@8.301:', msg='Dire is included in Pythia8 since version 8.301')

    def install(self, spec, prefix):
        configure_args = ['--prefix={0}'.format(prefix)]
        configure_args.append(
            '--with-pythia8={0}'.format(spec['pythia8'].prefix))
        configure(*configure_args)
        make()
        # Open bug: https://gitlab.com/wdconinc/direforpythia/-/merge_requests/1
        filter_file('-Wl,-rpath ',
                    self.compiler.cc_rpath_arg,
                    'bin/dire-config')
        make('install')
{'fraction_non_alphanumeric': 0.1369535519125683, 'fraction_numerical': 0.05362021857923497, 'mean_word_length': 3.0455801104972378, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6881709', 'n_tokens_mistral': 1083, 'n_tokens_neox': 994, 'n_words': 184}