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=f86b965492e....
Change:
+%ifarch ppc64le
Thanks.
Full change:
============
commit f86b965492e771967e7fdb822194c512093680ec
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Thu Mar 26 10:29:49 2020 +0100
The same test for different python versions must not overwrite
eachother's files
Workaround for root problem on EPEL 7 ppc64le
diff --git a/HepMC3-python-tests.patch b/HepMC3-python-tests.patch
new file mode 100644
index 0000000..b9ad0e2
--- /dev/null
+++ b/HepMC3-python-tests.patch
@@ -0,0 +1,38 @@
+From da9c200e22c63e28159d37cd30846e1097b07f43 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Thu, 26 Mar 2020 10:09:18 +0100
+Subject: [PATCH] The same test for different python versions must not
+ overwrite eachother's files
+
+---
+ python/CMakeLists.txt | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
+index 95d1b1f..a538aac 100644
+--- a/python/CMakeLists.txt
++++ b/python/CMakeLists.txt
+@@ -137,6 +137,8 @@ endif()
+ endif()
+
+ macro(bindings ver verminor)
++SET(Last_Python_VERSION ${Python_VERSION})
++
+ SET( Python_VERSION_MAJOR "0")
+ SET( Python_VERSION_MINOR "0")
+
+@@ -374,6 +376,11 @@ ENABLE_TESTING()
+ endif()
+ foreach ( ptest ${HepMC_python_tests} )
+ add_test(NAME python${Python_VERSION}_${ptest} COMMAND ${Python_EXECUTABLE}
${ptest}.py WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
++ # The same test for different python versions must not overwrite
++ # eachother's files
++ if(NOT ${Last_Python_VERSION} STREQUAL "")
++ set_tests_properties(python${Python_VERSION}_${ptest} PROPERTIES DEPENDS
python${Last_Python_VERSION}_${ptest})
++ endif()
+ endforeach ( ptest ${HepMC_python_tests} )
+ endif()
+
+--
+2.25.1
+
diff --git a/HepMC3-root-bug-workaround.patch b/HepMC3-root-bug-workaround.patch
new file mode 100644
index 0000000..9108af9
--- /dev/null
+++ b/HepMC3-root-bug-workaround.patch
@@ -0,0 +1,11 @@
+diff -ur HepMC3-3.2.1.orig/python/test/test_IO2.py HepMC3-3.2.1/python/test/test_IO2.py
+--- HepMC3-3.2.1.orig/python/test/test_IO2.py 2020-03-17 11:38:25.000000000 +0100
++++ HepMC3-3.2.1/python/test/test_IO2.py 2020-03-25 13:06:33.448541775 +0100
+@@ -2,6 +2,7 @@
+ import sys,os
+ sys.path=update_path()
+
++import ROOT
+
+ from pyHepMC3TestUtils import COMPARE_ASCII_FILES
+ from pyHepMC3 import HepMC3 as hm
diff --git a/HepMC3.spec b/HepMC3.spec
index ab032a3..1009c1f 100644
--- a/HepMC3.spec
+++ b/HepMC3.spec
@@ -11,6 +11,13 @@
Source0:
https://hepmc.web.cern.ch/hepmc/releases/%{name}-%{version}.tar.gz
Patch0: %{name}-config.patch
# Reduce memory usage when building Python bindings on ARM
Patch1: %{name}-arm-memory.patch
+# The same test for different python versions must not
+# overwrite eachother's files
+#
https://gitlab.cern.ch/hepmc/HepMC3/merge_requests/56
+Patch2: %{name}-python-tests.patch
+# Workaround for root problem on EPEL 7 ppc64le
+#
https://sft.its.cern.ch/jira/browse/ROOT-10622
+Patch3: %{name}-root-bug-workaround.patch
# The ROOT cmake file used by this project requires cmake 3.9
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
@@ -36,6 +43,15 @@ BuildRequires: python%{python3_other_pkgversion}-devel
%endif
BuildRequires: python%{python3_pkgversion}-devel
+%if %{?rhel}%{!?rhel:0} == 7
+%ifarch ppc64le
+# Workaround for root problem on EPEL 7 ppc64le
+BuildRequires: python2-root
+BuildRequires: python%{python3_other_pkgversion}-root
+BuildRequires: python%{python3_pkgversion}-root
+%endif
+%endif
+
%description
The HepMC3 package is an object oriented, C++ event record for
High Energy Physics Monte Carlo generators and simulation.
@@ -189,6 +205,13 @@ This package provides HepMC manuals and examples.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%if %{?rhel}%{!?rhel:0} == 7
+%ifarch ppc64le
+# Workaround for root problem on EPEL 7 ppc64le
+%patch3 -p1
+%endif
+%endif
%build
%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8