%define major 6 %define libname %mklibname lhapdf %{major} %define develname %mklibname lhapdf -d Name: lhapdf Version: 6.4.0 Release: %mkrel 4 Summary: Les Houches Accord PDF Interface Group: Sciences/Mathematics License: GPLv3+ URL: https://lhapdf.hepforge.org/ Source0: https://www.hepforge.org/archive/lhapdf/LHAPDF-%{version}.tar.gz Patch0: %{name}-soname.patch BuildRequires: gcc-c++ BuildRequires: python3-cython BuildRequires: python3-devel BuildRequires: doxygen %description LHAPDF is a general purpose C++ interpolator, used for evaluating PDFs from discretized data files. Previous versions of LHAPDF were written in Fortran 77/90 and are documented at http://lhapdf.hepforge.org/lhapdf5/. LHAPDF6 vastly reduces the memory overhead of the Fortran LHAPDF (from gigabytes to megabytes!), entirely removes restrictions on numbers of concurrent PDFs, allows access to single PDF members without needing to load whole sets, and separates a new standardized PDF data format from the code library so that new PDF sets may be created and released easier and faster. The C++ LHAPDF6 also permits arbitrary parton contents via the standard PDG ID code scheme, is computationally more efficient (particularly if only one or two flavors are required at each phase space point, as in PDF reweighting), and uses a flexible metadata system which fixes many fundamental metadata and concurrency bugs in LHAPDF5. Compatibility routines are provided as standard for existing C++ and Fortran codes using the LHAPDF5 and PDFLIB legacy interfaces, so you can keep using your existing codes. But the new interface is much more powerful and pleasant to work with, so we think you'll want to switch once you've used it! LHAPDF6 is documented in more detail in http://arxiv.org/abs/1412.7420 %package -n %{libname} Summary: Les Houches Accord PDF Interface Group: Sciences/Mathematics Provides: %{name} = %{version}-%{release} %description -n %{libname} LHAPDF is a general purpose C++ interpolator, used for evaluating PDFs from discretized data files. Previous versions of LHAPDF were written in Fortran 77/90 and are documented at http://lhapdf.hepforge.org/lhapdf5/. LHAPDF6 vastly reduces the memory overhead of the Fortran LHAPDF (from gigabytes to megabytes!), entirely removes restrictions on numbers of concurrent PDFs, allows access to single PDF members without needing to load whole sets, and separates a new standardized PDF data format from the code library so that new PDF sets may be created and released easier and faster. The C++ LHAPDF6 also permits arbitrary parton contents via the standard PDG ID code scheme, is computationally more efficient (particularly if only one or two flavors are required at each phase space point, as in PDF reweighting), and uses a flexible metadata system which fixes many fundamental metadata and concurrency bugs in LHAPDF5. Compatibility routines are provided as standard for existing C++ and Fortran codes using the LHAPDF5 and PDFLIB legacy interfaces, so you can keep using your existing codes. But the new interface is much more powerful and pleasant to work with, so we think you'll want to switch once you've used it! LHAPDF6 is documented in more detail in http://arxiv.org/abs/1412.7420 %package -n %{develname} Summary: Les Houches Accord PDF Interface - development files Group: Sciences/Mathematics Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} This package provides development files of LHAPDF, including C++ bindings. %package -n python%{python3_pkgversion}-%{name} Summary: Les Houches Accord PDF Interface - Python 3 module %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} Requires: %{libname} = %{version}-%{release} %description -n python%{python3_pkgversion}-%{name} This package provides Python 3 bindings for LHAPDF. %package doc Summary: Les Houches Accord PDF Interface - documentation BuildArch: noarch %description doc This package provides API documentation and examples for LHAPDF. %prep %autosetup -n LHAPDF-%{version} -p1 # Remove cython generated file rm wrappers/python/lhapdf.cpp # Fix python shebangs sed 's!/usr/bin/env bash!/bin/bash!' -i bin/lhapdf-config.in sed 's!/usr/bin/env python!/usr/bin/python3!' -i bin/lhapdf examples/*.py %build %configure --disable-static --disable-silent-rules %make_build PYTHON=%{__python3} # Build doxygen documentation %make_build doxy %install export SETUPTOOLS_USE_DISTUTILS=stdlib %make_install PYTHON=%{__python3} rm %{buildroot}%{_libdir}/libLHAPDF.la rm examples/Makefile* %check %make_build check %ldconfig_scriptlets %files %{_bindir}/lhapdf %files -n %{libname} %{_libdir}/libLHAPDF-%{version}.so %{_datadir}/LHAPDF %doc AUTHORS ChangeLog %license COPYING %files -n %{develname} %{_bindir}/%{name}-config %{_includedir}/LHAPDF %{_libdir}/libLHAPDF.so %{_libdir}/pkgconfig/%{name}.pc %files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/LHAPDF-*.egg-info %{python3_sitearch}/%{name}.*.so %files doc %doc doc/doxygen %doc examples %license COPYING %changelog * Sun Aug 07 2022 wally <wally> 6.4.0-4.mga9 + Revision: 1876012 - revert r1873886 and force python's bundled distutils usage * Sun Jul 31 2022 mrambo3501 <mrambo3501> 6.4.0-3.mga9 + Revision: 1873886 - fix files list * Sun Mar 27 2022 umeabot <umeabot> 6.4.0-2.mga9 + Revision: 1829428 - Mageia 9 Mass Rebuild * Tue Mar 01 2022 mrambo3501 <mrambo3501> 6.4.0-1.mga9 + Revision: 1787270 - version 6.4.0 - rebuild for python-3.10 * Tue Apr 20 2021 daviddavid <daviddavid> 6.3.0-2.mga9 + Revision: 1717618 - rebuild for python 3.9 * Fri Dec 18 2020 joequant <joequant> 6.3.0-1.mga8 + Revision: 1660779 - update to 6.3.0 * Sat Apr 25 2020 joequant <joequant> 6.2.3-2.mga8 + Revision: 1572097 - add devel provides * Sat Apr 25 2020 joequant <joequant> 6.2.3-1.mga8 + Revision: 1571859 - update science to sciences - imported package lhapdf