[trademgen/el6] Patch to fix the build on EPEL 6.
Denis Arnaud
denisarnaud at fedoraproject.org
Thu Dec 15 22:15:32 UTC 2011
commit 73a8ce27ab24ce6f66d6d08dd45af9054a484aa4
Author: Denis Arnaud <denis.arnaud_fedora at m4x.org>
Date: Thu Dec 15 23:15:30 2011 +0100
Patch to fix the build on EPEL 6.
trademgen-fix-cmake-python-finder.patch | 22 ++++++++++++++++++++++
trademgen.spec | 10 ++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/trademgen-fix-cmake-python-finder.patch b/trademgen-fix-cmake-python-finder.patch
new file mode 100644
index 0000000..7d7be97
--- /dev/null
+++ b/trademgen-fix-cmake-python-finder.patch
@@ -0,0 +1,22 @@
+diff --git a/config/FindPythonLibsWrapper.cmake b/config/FindPythonLibsWrapper.cmake
+index 9dd9cf9..670fb75 100644
+--- a/config/FindPythonLibsWrapper.cmake
++++ b/config/FindPythonLibsWrapper.cmake
+@@ -2,8 +2,16 @@
+ # script. Indeed, that latter does not work well on EPEL 5, where only the Python
+ # static library is searched. In that latter case, the Python dynamic library is
+ # searched, and the PYTHON_LIBRARIES variable re-set accordingly.
++# Moreover, on EPEL 5 and 6, only PYTHON_INCLUDE_PATH is defined, where as
++# PYTHON_INCLUDE_DIRS is expected to be set.
++
+ #
++if (PYTHON_INCLUDE_PATH AND "${PYTHON_INCLUDE_DIRS}" STREQUAL "")
++ set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH} PARENT_SCOPE)
++ set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
++endif ()
+
++#
+ if ("${PYTHON_LIBRARIES}" MATCHES "libpython[1-9.]*.a")
+ # The PythonLibs finder has found only the static library
+ message (STATUS "The Python static library has been found by the regular PythonLibs finder: ${PYTHON_LIBRARIES}")
+
diff --git a/trademgen.spec b/trademgen.spec
index 49c70fe..cb971d1 100644
--- a/trademgen.spec
+++ b/trademgen.spec
@@ -3,7 +3,7 @@
#
Name: trademgen
Version: 0.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: C++ Simulated Travel Demand Generation Library
@@ -17,6 +17,9 @@ BuildRequires: cmake, python-devel
BuildRequires: boost-devel, soci-mysql-devel, zeromq-devel, readline-devel
BuildRequires: stdair-devel
+# That patch comes from upstream, in order to fix the build on EPEL 5/6:
+# https://github.com/airsim/trademgen/commit/0994bc000d74b01b6b8001d349373cb3580f4e50
+Patch0: trademgen-fix-cmake-python-finder.patch
%description
%{name} aims at providing a clean API, and the corresponding C++
@@ -60,7 +63,7 @@ online (http://%{name}.org).
%prep
%setup -q
-
+%patch0 -p1
%build
%cmake .
@@ -125,6 +128,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Dec 15 2011 Denis Arnaud <denis.arnaud_fedora at m4x.org> 0.2.2-2
+- Patch to fix the build on EPEL 6.
+
* Mon Dec 12 2011 Denis Arnaud <denis.arnaud_fedora at m4x.org> 0.2.2-1
- Upstream update. Took into account feedback from #728815.
More information about the scm-commits
mailing list