The package rpms/HepMC3.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/HepMC3.git/commit/?id=1fb000740dd885....
Change: +%ifnarch s390x
Thanks.
Full change: ============
commit 1fb000740dd885950d347c1f255e7e3fb187cbd2 Author: Mattias Ellert mattias.ellert@physics.uu.se Date: Tue Mar 5 22:19:04 2019 +0100
Initial commit after review
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f6a3a77 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/*.tar.gz diff --git a/0001-Added-soversion.patch b/0001-Added-soversion.patch new file mode 100644 index 0000000..bd93cfc --- /dev/null +++ b/0001-Added-soversion.patch @@ -0,0 +1,50 @@ +From 0fa573a2d3df253afab02468cbc6261a482af2b9 Mon Sep 17 00:00:00 2001 +From: Andrii Verbytskyi andriish@hermes.mpp.mpg.de +Date: Mon, 4 Mar 2019 22:52:43 +0100 +Subject: [PATCH] Added soversion + +--- + CMakeLists.txt | 5 +---- + rootIO/CMakeLists.txt | 5 +---- + search/CMakeLists.txt | 5 +---- + 3 files changed, 3 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 314f1a4..0411a84 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -166,7 +166,7 @@ add_library(HepMC3 SHARED $<TARGET_OBJECTS:objlibcore>) + add_library(HepMC3_static STATIC $<TARGET_OBJECTS:objlibcore>) + + set_target_properties(HepMC3 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}) +- ++set_target_properties(HepMC3 PROPERTIES SOVERSION 1) + if (WIN32) + set_target_properties(HepMC3_static PROPERTIES OUTPUT_NAME HepMC3-static ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}) + elseif() +diff --git a/rootIO/CMakeLists.txt b/rootIO/CMakeLists.txt +index 934f613..2d77328 100644 +--- a/rootIO/CMakeLists.txt ++++ b/rootIO/CMakeLists.txt +@@ -13,7 +13,7 @@ set_property(TARGET HepMC3rootIO PROPERTY POSITION_INDEPENDENT_CODE 1) + + target_link_libraries(HepMC3rootIO ${ROOT_Tree_LIBRARY} ${ROOT_RIO_LIBRARY} ${ROOT_Core_LIBRARY} HepMC3) + set_target_properties(HepMC3rootIO PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}) +- ++set_target_properties(HepMC3rootIO PROPERTIES SOVERSION 1) + # installs + install(TARGETS HepMC3rootIO DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rootIO-libs) + install(DIRECTORY ${PROJECT_BINARY_DIR}/rootIO/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rootIO-libs FILES_MATCHING PATTERN "*.pcm" PATTERN "*.rootmap" PATTERN "CMakeFiles" EXCLUDE PATTERN "src" EXCLUDE PATTERN "include" EXCLUDE) +diff --git a/search/CMakeLists.txt b/search/CMakeLists.txt +index 890077f..e321e50 100644 +--- a/search/CMakeLists.txt ++++ b/search/CMakeLists.txt +@@ -17,7 +17,7 @@ add_library(HepMC3search_static STATIC $<TARGET_OBJECTS:objlibsearch>) + + target_link_libraries(HepMC3search HepMC3) + set_target_properties(HepMC3search PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}) +- ++set_target_properties(HepMC3search PROPERTIES SOVERSION 1) + if (WIN32) + set_target_properties(HepMC3search_static PROPERTIES OUTPUT_NAME HepMC3search-static ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}) + elseif() diff --git a/0001-Attempt-to-fix-HepMC3Config.patch b/0001-Attempt-to-fix-HepMC3Config.patch new file mode 100644 index 0000000..e4c2c4e --- /dev/null +++ b/0001-Attempt-to-fix-HepMC3Config.patch @@ -0,0 +1,40 @@ +From f2c5ecab2e80db709212078f282541657790811d Mon Sep 17 00:00:00 2001 +From: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de +Date: Tue, 5 Mar 2019 10:47:18 +0100 +Subject: [PATCH] Attempt to fix HepMC3Config + +--- + cmake/Templates/HepMC3Config.cmake.in | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/cmake/Templates/HepMC3Config.cmake.in b/cmake/Templates/HepMC3Config.cmake.in +index 4c30584..fa45292 100644 +--- a/cmake/Templates/HepMC3Config.cmake.in ++++ b/cmake/Templates/HepMC3Config.cmake.in +@@ -1,12 +1,15 @@ + @PACKAGE_INIT@ + +-set_and_check(HEPMC_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") ++set_and_check(HEPMC3_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") + +-find_library(HEPMC_LIB NAMES HepMC HINTS @PACKAGE_LIB_INSTALL_DIR@) +-find_library(HEPMC_ROOTIO_LIB NAMES HepMCrootIO HINTS @PACKAGE_LIB_INSTALL_DIR@) ++find_library(HEPMC3_LIB NAMES HepMC3 HINTS @PACKAGE_LIB_INSTALL_DIR@) ++find_library(HEPMC3_SEARCH_LIB NAMES HepMC3search HINTS @PACKAGE_LIB_INSTALL_DIR@) ++find_library(HEPMC3_ROOTIO_LIB NAMES HepMC3rootIO HINTS @PACKAGE_LIB_INSTALL_DIR@) + +-if(EXISTS ${HEPMC_ROOTIO_LIB}) +- set(HEPMC_LIBRARIES ${HEPMC_LIB} ${HEPMC_ROOTIO_LIB}) +-else() +- set(HEPMC_LIBRARIES ${HEPMC_LIB}) ++set(HEPMC3_LIBRARIES ${HEPMC3_LIB}) ++if(EXISTS ${HEPMC3_SEARCH_LIB}) ++ list( APPEND HEPMC3_LIBRARIES${HEPMC3_SEARCH_LIB}) ++endif() ++if(EXISTS ${HEPMC3_ROOTIO_LIB}) ++ list( APPEND HEPMC3_LIBRARIES ${HEPMC3_ROOTIO_LIB}) + endif() +\ No newline at end of file +-- +2.20.1 + diff --git a/0001-CMake-changes.patch b/0001-CMake-changes.patch new file mode 100644 index 0000000..7dc367b --- /dev/null +++ b/0001-CMake-changes.patch @@ -0,0 +1,52 @@ +From 1a05bde2fe1500e77024cb72852bd38617c17e35 Mon Sep 17 00:00:00 2001 +From: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de +Date: Thu, 28 Feb 2019 16:11:02 +0100 +Subject: [PATCH] CMake changes + +--- + test/CMakeLists.txt | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 2eb8983..0234cc2 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -42,7 +42,6 @@ endmacro( hepmc_root_test ) + set( CMAKE_INCLUDE_DIRECTORIES_BEFORE ON ) + + set( HepMC_tests +- testThreads1 + testMass + testPrintBug + testPolarization +@@ -65,13 +64,26 @@ set( HepMC_root_tests + + set(srcdir ${CMAKE_CURRENT_SOURCE_DIR} ) + +- ++find_package(Threads) ++if(Threads_FOUND) ++ list( APPEND HepMC_tests "testThreads1" ) ++else() ++ message(STATUS "No threads library found, testThreads1 is disabled") ++endif() + + foreach ( test ${HepMC_tests} ) + hepmc_test( ${test} ) + set_tests_properties(${test} PROPERTIES TIMEOUT 10) #Relevant for testLoops + endforeach ( test ${HepMC_tests} ) + ++if(Threads_FOUND) ++if(THREADS_HAVE_PTHREAD_ARG) ++ target_compile_options(testThreads1 PUBLIC "-pthread") ++endif() ++if(CMAKE_THREAD_LIBS_INIT) ++ target_link_libraries(testThreads1 "${CMAKE_THREAD_LIBS_INIT}") ++endif() ++endif() + + if(HEPMC3_ENABLE_ROOTIO) + foreach ( test ${HepMC_root_tests} ) +-- +2.20.1 + diff --git a/0001-Install-the-rootmap-file-together-with-the-pcm-file-.patch b/0001-Install-the-rootmap-file-together-with-the-pcm-file-.patch new file mode 100644 index 0000000..aa6e499 --- /dev/null +++ b/0001-Install-the-rootmap-file-together-with-the-pcm-file-.patch @@ -0,0 +1,41 @@ +From a7ebd012fb69f15912e13d68aa87819957690baf Mon Sep 17 00:00:00 2001 +From: Mattias Ellert mattias.ellert@physics.uu.se +Date: Sun, 3 Mar 2019 11:35:19 +0100 +Subject: [PATCH 1/5] Install the rootmap file together with the pcm file for + the rootIO library. Remove install rule in search directory that installs + nothing. + +--- + rootIO/CMakeLists.txt | 2 +- + search/CMakeLists.txt | 2 -- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/rootIO/CMakeLists.txt b/rootIO/CMakeLists.txt +index f0da499..75a7790 100644 +--- a/rootIO/CMakeLists.txt ++++ b/rootIO/CMakeLists.txt +@@ -16,7 +16,7 @@ set_target_properties(HepMC3rootIO PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT + + # installs + install(TARGETS HepMC3rootIO DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rootIO-libs) +-install(DIRECTORY ${PROJECT_BINARY_DIR}/rootIO/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rootIO-libs FILES_MATCHING PATTERN "*.pcm" PATTERN "CMakeFiles" EXCLUDE PATTERN "src" EXCLUDE PATTERN "include" EXCLUDE) ++install(DIRECTORY ${PROJECT_BINARY_DIR}/rootIO/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rootIO-libs FILES_MATCHING PATTERN "*.pcm" PATTERN "*.rootmap" PATTERN "CMakeFiles" EXCLUDE PATTERN "src" EXCLUDE PATTERN "include" EXCLUDE) + install(DIRECTORY include/HepMC3 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT rootIO-devel) + #add_custom_target(move_rootIO_headers ALL ${CMAKE_COMMAND} -DPREFIX=${CMAKE_BINARY_DIR}/outputs + # -DCOMPONENTS="rootIO-devel" +diff --git a/search/CMakeLists.txt b/search/CMakeLists.txt +index 890077f..e59d921 100644 +--- a/search/CMakeLists.txt ++++ b/search/CMakeLists.txt +@@ -28,8 +28,6 @@ endif() + # installs + install(TARGETS HepMC3search DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT search-libs) + install(TARGETS HepMC3search_static DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT search-libs) +- +-install(DIRECTORY ${PROJECT_BINARY_DIR}/search/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT search-libs FILES_MATCHING PATTERN "CMakeFiles" EXCLUDE PATTERN "src" EXCLUDE PATTERN "include" EXCLUDE) + install(DIRECTORY include/HepMC3 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT search-devel) + #add_custom_target(move_search_headers ALL ${CMAKE_COMMAND} -DPREFIX=${CMAKE_BINARY_DIR}/outputs + # -DCOMPONENTS="search-devel" +-- +2.20.1 + diff --git a/0002-Avoid-overlinking.-Only-link-against-those-ROOT-libr.patch b/0002-Avoid-overlinking.-Only-link-against-those-ROOT-libr.patch new file mode 100644 index 0000000..13de829 --- /dev/null +++ b/0002-Avoid-overlinking.-Only-link-against-those-ROOT-libr.patch @@ -0,0 +1,40 @@ +From 90d6a3ffa3f24862b52b28d208c69e40e9830ffa Mon Sep 17 00:00:00 2001 +From: Mattias Ellert mattias.ellert@physics.uu.se +Date: Sun, 3 Mar 2019 11:46:50 +0100 +Subject: [PATCH 2/5] Avoid overlinking. Only link against those ROOT libraries + that are used. + +--- + rootIO/CMakeLists.txt | 2 +- + test/CMakeLists.txt | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/rootIO/CMakeLists.txt b/rootIO/CMakeLists.txt +index 75a7790..934f613 100644 +--- a/rootIO/CMakeLists.txt ++++ b/rootIO/CMakeLists.txt +@@ -11,7 +11,7 @@ ROOT_GENERATE_DICTIONARY(rootIO_Classes include/rootIO_Classes.hh LINKDEF includ + add_library(HepMC3rootIO SHARED ${PROJECT_SOURCE_DIR}/rootIO/src/WriterRoot.cc ${PROJECT_SOURCE_DIR}/rootIO/src/ReaderRoot.cc ${PROJECT_SOURCE_DIR}/rootIO/src/WriterRootTree.cc ${PROJECT_SOURCE_DIR}/rootIO/src/ReaderRootTree.cc ${PROJECT_SOURCE_DIR}/rootIO/src/Streamers.cc rootIO_Classes.cxx) + set_property(TARGET HepMC3rootIO PROPERTY POSITION_INDEPENDENT_CODE 1) + +-target_link_libraries(HepMC3rootIO ${ROOT_LIBRARIES} HepMC3) ++target_link_libraries(HepMC3rootIO ${ROOT_Tree_LIBRARY} ${ROOT_RIO_LIBRARY} ${ROOT_Core_LIBRARY} HepMC3) + set_target_properties(HepMC3rootIO PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/outputs/${CMAKE_INSTALL_LIBDIR}) + + # installs +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 2eb8983..aff536e 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -77,6 +77,8 @@ if(HEPMC3_ENABLE_ROOTIO) + foreach ( test ${HepMC_root_tests} ) + hepmc_root_test( ${test} ) + endforeach ( test ${HepMC_root_tests} ) ++ ++target_link_libraries(testIO4 ${ROOT_Hist_LIBRARY}) + endif() + + +-- +2.20.1 + diff --git a/0003-Fix-segfault-in-test-that-tries-to-modify-the-elemen.patch b/0003-Fix-segfault-in-test-that-tries-to-modify-the-elemen.patch new file mode 100644 index 0000000..6859591 --- /dev/null +++ b/0003-Fix-segfault-in-test-that-tries-to-modify-the-elemen.patch @@ -0,0 +1,26 @@ +From a656737df49b58bab6960d537aea0ac335d7b91b Mon Sep 17 00:00:00 2001 +From: Mattias Ellert mattias.ellert@physics.uu.se +Date: Sun, 3 Mar 2019 11:49:08 +0100 +Subject: [PATCH 3/5] Fix segfault in test that tries to modify the element + after the last element in a vector. + +--- + test/testWeights.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/testWeights.cc b/test/testWeights.cc +index 8d73df7..a7de630 100644 +--- a/test/testWeights.cc ++++ b/test/testWeights.cc +@@ -41,7 +41,7 @@ int main() + + // new functionality + std::vectorstd::string names; +- for( size_t i = 0; i < evt.weights().size(); ++i ) names.push_back(std::to_string((unsigned long long)i)); ++ for( size_t i = 0; i < evt.weights().size() - 1; ++i ) names.push_back(std::to_string((unsigned long long)i)); + std::string nm = "tau"; + names.push_back(nm); + run->set_weight_names(names); +-- +2.20.1 + diff --git a/0004-Fix-the-memcheck-tests.patch b/0004-Fix-the-memcheck-tests.patch new file mode 100644 index 0000000..489c0bf --- /dev/null +++ b/0004-Fix-the-memcheck-tests.patch @@ -0,0 +1,38 @@ +From a8afb5715feed60cb5f192893cc2881e6bf4038d Mon Sep 17 00:00:00 2001 +From: Mattias Ellert mattias.ellert@physics.uu.se +Date: Sun, 3 Mar 2019 11:51:52 +0100 +Subject: [PATCH 4/5] Fix the memcheck tests. + +The variables are defiend as MEMORYCHECK_COMMAND{,_OPTIONS} and then +used as CMAKE_MEMORYCHECK_COMMAND{,_OPTIONS} which means they are +ignored, and the memcheck simply repeats the original test unmodified. + +The default value for MEMORYCHECK_COMMAND_OPTIONS is invalid. +--leak-check=full is an option to the memcheck tool and can not be +used together with the --tool=callgrind option. The mamcheck tests +fail with "valgrind: Unknown option: --leak-check=full" +--- + test/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index aff536e..e02bf5f 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -251,11 +251,11 @@ endif() + #One should use something else for Windows or use build-in Linux sybsystem + find_program( MEMORYCHECK_COMMAND valgrind ) + if(MEMORYCHECK_COMMAND) +-set( MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --tool=callgrind" ) ++set( MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full" ) + endif() + + macro(add_memcheck_test binaryname ) +- set(memcheck_command "${CMAKE_MEMORYCHECK_COMMAND} ${CMAKE_MEMORYCHECK_COMMAND_OPTIONS}") ++ set(memcheck_command "${MEMORYCHECK_COMMAND} ${MEMORYCHECK_COMMAND_OPTIONS}") + separate_arguments(memcheck_command) + add_test(memcheck_${binaryname} ${memcheck_command} ./${binaryname} ${ARGN}) + file(GLOB INPUTmemcheck_${testname} "${CMAKE_CURRENT_SOURCE_DIR}/input${testname}*" ) +-- +2.20.1 + diff --git a/0005-The-memcheck-and-non-memcheck-version-of-the-same-te.patch b/0005-The-memcheck-and-non-memcheck-version-of-the-same-te.patch new file mode 100644 index 0000000..1703e3c --- /dev/null +++ b/0005-The-memcheck-and-non-memcheck-version-of-the-same-te.patch @@ -0,0 +1,44 @@ +From f5708c1991968539518351c43c90575f8eb94d29 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert mattias.ellert@physics.uu.se +Date: Sun, 3 Mar 2019 12:06:13 +0100 +Subject: [PATCH 5/5] The memcheck and non-memcheck version of the same test + write to the same files and can not be run in parallel, or the tests will + fail. This adds a dependency so that the memcheck version can not start + before the non-memcheck version has finished. + +The setting of the TIMEOUT option here sets the timeout for the +non-memcheck version of the test, which is redundand since it is +already set before. It could be possible to set the timeout for the +memcheck version here, i.e. changing it to + +set_tests_properties(memcheck_${test} PROPERTIES TIMEOUT xx) + +instead of removing it, but the timeout value must be increased then. +(I tried 60 instead of 10, but some of the tests still failed due to +timeout with this value, and it takes even longer on slpwer +architectures). +--- + test/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index e02bf5f..cf53785 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -266,11 +266,12 @@ endmacro(add_memcheck_test) + if(MEMORYCHECK_COMMAND) + foreach ( test ${HepMC_tests} ) + add_memcheck_test( ${test} ) +- set_tests_properties(${test} PROPERTIES TIMEOUT 10) #Relevant for testLoops ++ set_tests_properties(memcheck_${test} PROPERTIES DEPENDS ${test}) + endforeach ( test ${HepMC_tests} ) + if(HEPMC3_ENABLE_ROOTIO) + foreach ( test ${HepMC_root_tests} ) + add_memcheck_test( ${test} ) ++ set_tests_properties(memcheck_${test} PROPERTIES DEPENDS ${test}) + endforeach ( test ${HepMC_root_tests} ) + endif() + endif() +-- +2.20.1 + diff --git a/HepMC3.spec b/HepMC3.spec new file mode 100644 index 0000000..363be3e --- /dev/null +++ b/HepMC3.spec @@ -0,0 +1,257 @@ +Name: HepMC3 +Version: 3.1.0 +Release: 3%{?dist} +Summary: C++ Event Record for Monte Carlo Generators + +License: GPLv2+ +URL: https://hepmc.web.cern.ch/hepmc/ +Source0: https://hepmc.web.cern.ch/hepmc/releases/%%7Bname%7D-%%7Bversion%7D.tar.gz +# https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/7 +Patch0: 0001-Install-the-rootmap-file-together-with-the-pcm-file-.patch +Patch1: 0002-Avoid-overlinking.-Only-link-against-those-ROOT-libr.patch +Patch2: 0003-Fix-segfault-in-test-that-tries-to-modify-the-elemen.patch +Patch3: 0004-Fix-the-memcheck-tests.patch +Patch4: 0005-The-memcheck-and-non-memcheck-version-of-the-same-te.patch +# Ported from upstream's git +Patch5: 0001-CMake-changes.patch +Patch6: 0001-Added-soversion.patch +Patch7: 0001-Attempt-to-fix-HepMC3Config.patch + +# The ROOT cmake file used by this project requires cmake 3.4.3 +%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 +BuildRequires: cmake >= 3.4.3 +%else +BuildRequires: cmake3 >= 3.4.3 +%endif +BuildRequires: gcc-c++ +%ifnarch s390x +BuildRequires: root-core +BuildRequires: root-hist +BuildRequires: root-io +BuildRequires: root-tree +%endif +BuildRequires: doxygen +BuildRequires: graphviz +# Additional requirements for tests +BuildRequires: pythia8-devel + +%description +The HepMC3 package is an object oriented, C++ event record for +High Energy Physics Monte Carlo generators and simulation. +Since the first implementation, described in M. Dobbs and J.B. Hansen +(Comput. Phys. Commun. 134 (2001) 41), the package has undergone +several modifications and in particular, the latest HepMC3 series is a +completely new re-write using currently available C++11 techniques. + +%package devel +Summary: C++ Event Record for Monte Carlo Generators - development files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package provides development files for %{name}. + +%package search +Summary: C++ Event Record for Monte Carlo Generators - search engine library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description search +This package provides a library for selecting particles in HepMC3 event +records. + +%package search-devel +Summary: C++ Event Record for Monte Carlo Generators - %{name}-search development files +Requires: %{name}-search%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description search-devel +This package provides development files for %{name}-search. + +%ifnarch s390x +%package rootIO +Summary: C++ Event Record for Monte Carlo Generators - ROOT IO +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description rootIO +This package provides a library for ROOT IO support. + +%package rootIO-devel +Summary: C++ Event Record for Monte Carlo Generators - %{name}-rootIO development files +Requires: %{name}-rootIO%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description rootIO-devel +This package provides development files for %{name}-rootIO. +%endif + +%package interfaces-devel +Summary: C++ Event Record for Monte Carlo Generators - generator interfaces +Requires: %{name}-devel = %{version}-%{release} +BuildArch: noarch + +%description interfaces-devel +This package provides HepMC3 interfaces to some common Monte Carlo generators. + +%package doc +Summary: C++ Event Record for Monte Carlo Generators - documentation +BuildArch: noarch + +%description doc +This package provides HepMC manuals and examples. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 + +%build +%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 +%cmake \ +%else +%cmake3 \ +%endif +%ifnarch s390x + -DHEPMC3_ENABLE_ROOTIO:BOOL=ON \ +%else + -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF \ +%endif + -DHEPMC3_ENABLE_TEST:BOOL=ON -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON . +make %{?_smp_mflags} +make -C doc/doxygen + +%install +make install DESTDIR=%{buildroot} +rm %{buildroot}%{_libdir}/*.a +mkdir -p %{buildroot}%{_pkgdocdir} +mv doc/doxygen/html %{buildroot}%{_pkgdocdir} +cp -pr examples %{buildroot}%{_pkgdocdir} +mkdir -p %{buildroot}%{_datadir}/%{name} +cp -pr interfaces %{buildroot}%{_datadir}/%{name} + +# Fix shebang +sed 's!/usr/bin/env bash!/bin/bash!' -i %{buildroot}%{_bindir}/HepMC3-config + +%ifnarch s390x +# Move to root directory +mkdir %{buildroot}%{_libdir}/root +mv %{buildroot}%{_libdir}/libHepMC3rootIO.so* %{buildroot}%{_libdir}/root +mv %{buildroot}%{_libdir}/librootIO_Classes* %{buildroot}%{_libdir}/root +sed 's!\s*-lHepMC3rootIO!/root&!' -i %{buildroot}%{_bindir}/HepMC3-config +sed 's!HepMCrootIO HINTS .*%{_lib}!&/root!' -i %{buildroot}%{_datadir}/%{name}/cmake/HepMC3Config.cmake +%endif + +%check +%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 +ctest %{?_smp_mflags} --output-on-failure +%else +ctest3 %{?_smp_mflags} --output-on-failure +%endif + +%ldconfig_scriptlets +%ldconfig_scriptlets search +%ifnarch s390x +%ldconfig_scriptlets rootIO +%endif + +%files +%{_libdir}/libHepMC3.so.1 +%license COPYING + +%files devel +%{_bindir}/HepMC3-config +%{_libdir}/libHepMC3.so +%dir %{_includedir}/%{name} +%dir %{_includedir}/%{name}/Data +%{_includedir}/%{name}/AssociatedParticle.h +%{_includedir}/%{name}/Attribute.h +%{_includedir}/%{name}/Data/GenEventData.h +%{_includedir}/%{name}/Data/GenParticleData.h +%{_includedir}/%{name}/Data/GenRunInfoData.h +%{_includedir}/%{name}/Data/GenVertexData.h +%{_includedir}/%{name}/Errors.h +%{_includedir}/%{name}/FourVector.h +%{_includedir}/%{name}/GenCrossSection.h +%{_includedir}/%{name}/GenCrossSection_fwd.h +%{_includedir}/%{name}/GenEvent.h +%{_includedir}/%{name}/GenHeavyIon.h +%{_includedir}/%{name}/GenHeavyIon_fwd.h +%{_includedir}/%{name}/GenParticle.h +%{_includedir}/%{name}/GenParticle_fwd.h +%{_includedir}/%{name}/GenPdfInfo.h +%{_includedir}/%{name}/GenPdfInfo_fwd.h +%{_includedir}/%{name}/GenRunInfo.h +%{_includedir}/%{name}/GenVertex.h +%{_includedir}/%{name}/GenVertex_fwd.h +%{_includedir}/%{name}/HEPEVT_Wrapper.h +%{_includedir}/%{name}/HepMC3.h +%{_includedir}/%{name}/LHEF.h +%{_includedir}/%{name}/LHEFAttributes.h +%{_includedir}/%{name}/Print.h +%{_includedir}/%{name}/Reader.h +%{_includedir}/%{name}/ReaderAscii.h +%{_includedir}/%{name}/ReaderAsciiHepMC2.h +%{_includedir}/%{name}/ReaderFactory.h +%{_includedir}/%{name}/ReaderHEPEVT.h +%{_includedir}/%{name}/ReaderLHEF.h +%{_includedir}/%{name}/Setup.h +%{_includedir}/%{name}/Units.h +%{_includedir}/%{name}/Version.h +%{_includedir}/%{name}/Writer.h +%{_includedir}/%{name}/WriterAscii.h +%{_includedir}/%{name}/WriterAsciiHepMC2.h +%{_includedir}/%{name}/WriterHEPEVT.h +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/cmake +%{_datadir}/%{name}/cmake/HepMC3Config.cmake + +%files search +%{_libdir}/libHepMC3search.so.1 + +%files search-devel +%{_libdir}/libHepMC3search.so +%{_includedir}/%{name}/AttributeFeature.h +%{_includedir}/%{name}/Feature.h +%{_includedir}/%{name}/Filter.h +%{_includedir}/%{name}/FilterAttribute.h +%{_includedir}/%{name}/Relatives.h +%{_includedir}/%{name}/Selector.h + +%ifnarch s390x +%files rootIO +%{_libdir}/root/libHepMC3rootIO.so.1 +# unversioned symlink is used at runtime when library is used as a ROOT plugin +%{_libdir}/root/libHepMC3rootIO.so +%{_libdir}/root/librootIO_Classes_rdict.pcm +%{_libdir}/root/librootIO_Classes.rootmap + +%files rootIO-devel +%{_includedir}/%{name}/ReaderRoot.h +%{_includedir}/%{name}/ReaderRootTree.h +%{_includedir}/%{name}/WriterRoot.h +%{_includedir}/%{name}/WriterRootTree.h +%endif + +%files interfaces-devel +%{_datadir}/%{name}/interfaces + +%files doc +%dir %{_pkgdocdir} +%{_pkgdocdir}/examples +%{_pkgdocdir}/html +%license COPYING + +%changelog +* Tue Mar 05 2019 Mattias Ellert mattias.ellert@physics.uu.se - 3.1.0-3 +- Rename interfaces subpackage to interfaces-devel +- Add patch fixing installed cmake file from upstream + +* Tue Mar 05 2019 Mattias Ellert mattias.ellert@physics.uu.se - 3.1.0-2 +- Add soversion patch from upstream + +* Fri Feb 22 2019 Mattias Ellert mattias.ellert@physics.uu.se - 3.1.0-1 +- Initial build diff --git a/sources b/sources new file mode 100644 index 0000000..95d33d2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (HepMC3-3.1.0.tar.gz) = 15b381a69c4660e1116e1c8267242e368f336331a6c2c7d4292b632cac94d0a72a652c46007c79509b88bf35b0b2cf52331c5db21eaa59d52e9172b540d0fc47
arch-excludes@lists.fedoraproject.org