From 09aaa984a7051d42dd533033d34c057e18fabf7f Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 22 Feb 2017 08:03:17 -0700 Subject: espresso: changed patch source --- espresso/1042.patch | 26 ++++++++++++++++++++++++++ espresso/espresso.spec | 9 +++++++-- espresso/python_instdir.patch | 15 --------------- 3 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 espresso/1042.patch delete mode 100644 espresso/python_instdir.patch diff --git a/espresso/1042.patch b/espresso/1042.patch new file mode 100644 index 0000000..ea0c067 --- /dev/null +++ b/espresso/1042.patch @@ -0,0 +1,26 @@ +From cf4a369485736b7a901fa02bbc911f8d5dddab6a Mon Sep 17 00:00:00 2001 +From: Christoph Junghans +Date: Tue, 21 Feb 2017 17:56:55 -0700 +Subject: [PATCH] cmake: allow user to override PYTHON_INSTDIR + +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6ba209..88de171 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -115,9 +115,11 @@ if (WITH_PYTHON) + -c "import distutils.sysconfig as cg; print(cg.get_python_inc())" + OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE) + find_package(NumPy REQUIRED) +- execute_process(COMMAND ${PYTHON_EXECUTABLE} ++ if(NOT PYTHON_INSTDIR) ++ execute_process(COMMAND ${PYTHON_EXECUTABLE} + -c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}'))" + OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE) ++ endif(NOT PYTHON_INSTDIR) + if(PYTHON_VERSION_MAJOR EQUAL 2) + set(CYTHON_FLAGS "-2" CACHE STRING "Flags used by the Cython compiler during all build types.") + else() diff --git a/espresso/espresso.spec b/espresso/espresso.spec index 5ceca4b..e50b1f8 100644 --- a/espresso/espresso.spec +++ b/espresso/espresso.spec @@ -30,7 +30,9 @@ Source0: https://github.com/%{name}md/%{name}/archive/%{commit}/%{name}-%{commit %else Source0: http://download.savannah.gnu.org/releases/espressomd/espresso-%{version}.tar.gz %endif -Patch0: python_instdir.patch +# PATCH-FIX-UPSTREAM - 1042.patch - allow user to override PYTHON_INSTDIR +Patch0: https://patch-diff.githubusercontent.com/raw/espressomd/espresso/pull/1042.patch + BuildRequires: cmake BuildRequires: Cython @@ -121,8 +123,9 @@ This package contains %{name} compiled against MPICH2. %else %setup -q %endif -%patch0 -p0 +%patch0 -p1 find . -name "*.[ch]pp" -exec chmod -x {} \; +chmod -x AUTHORS COPYING README NEWS ChangeLog mkdir openmpi_build mpich_build %build @@ -176,6 +179,7 @@ pushd mpich_build popd %{_mpich_unload} find %{buildroot}%{_prefix} -name "*.so" -exec chmod +x {} \; +find %{buildroot}%{_prefix} -name "gen_pxiconfig" -exec chmod +x {} \; %check # test openmpi? @@ -215,6 +219,7 @@ popd * Thu Feb 16 2017 Christoph Junghans - 4.0-0.1.20170220git7a9ac74 - Bump to version 4.0 git version - Drop cypthon patch, incl. upstream +- Add 1042.patch from upstream * Fri Feb 10 2017 Fedora Release Engineering - 3.3.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/espresso/python_instdir.patch b/espresso/python_instdir.patch deleted file mode 100644 index a0d94d4..0000000 --- a/espresso/python_instdir.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- CMakeLists.txt.orig 2017-02-21 13:53:45.796675455 -0700 -+++ CMakeLists.txt 2017-02-21 14:18:21.398030293 -0700 -@@ -128,9 +128,11 @@ - -c "import distutils.sysconfig as cg; print(cg.get_python_inc())" - OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS OUTPUT_STRIP_TRAILING_WHITESPACE) - find_package(NumPy REQUIRED) -- execute_process(COMMAND ${PYTHON_EXECUTABLE} -+ if(NOT PYTHON_INSTDIR) -+ execute_process(COMMAND ${PYTHON_EXECUTABLE} - -c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}'))" - OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE) -+ endif(NOT PYTHON_INSTDIR) - if(PYTHON_VERSION_MAJOR EQUAL 2) - set(CYTHON_FLAGS "-2" CACHE STRING "Flags used by the Cython compiler during all build types.") - else() -- cgit