diff --git a/libboost-1.58.0-python-3.3.patch b/libboost-1.58.0-python-3.3.patch new file mode 100644 index 0000000..ec3831c --- /dev/null +++ b/libboost-1.58.0-python-3.3.patch @@ -0,0 +1,28 @@ +From 3e405b6fd5db5615bbef241763de070118222ca7 Mon Sep 17 00:00:00 2001 +From: Stefan Seefeld +Date: Thu, 9 Apr 2015 08:57:08 -0400 +Subject: [PATCH] Fix exec_file for Python 3 < 3.4. + +--- + src/exec.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/libs/python/src/exec.cpp b/libs/python/src/exec.cpp +index 2910db7..12cdabc 100644 +--- a/libs/python/src/exec.cpp ++++ b/libs/python/src/exec.cpp +@@ -86,9 +86,12 @@ object BOOST_PYTHON_DECL exec_file(str filename, object global, object local) + char *f = python::extract(filename); + + // Let python open the file to avoid potential binary incompatibilities. +-#if PY_VERSION_HEX >= 0x03000000 +- // See http://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code ++#if PY_VERSION_HEX >= 0x03400000 + FILE *fs = _Py_fopen(f, "r"); ++#elif PY_VERSION_HEX >= 0x03000000 ++ PyObject *fo = Py_BuildValue("s", f); ++ FILE *fs = _Py_fopen(fo, "r"); ++ Py_DECREF(fo); + #else + PyObject *pyfile = PyFile_FromString(f, const_cast("r")); + if (!pyfile) throw std::invalid_argument(std::string(f) + " : no such file"); diff --git a/libboost.spec b/libboost.spec index 119e8df..b35745e 100644 --- a/libboost.spec +++ b/libboost.spec @@ -1,8 +1,8 @@ %define pckver %(echo %version | tr . _) %define pckmajver %(echo %version | cut -d. -f1-2 | tr . _) Name: libboost -Version: 1.57.0 -Release: 4mamba +Version: 1.58.0 +Release: 1mamba Summary: Free peer-reviewed portable C++ source libraries Group: System/Libraries Vendor: openmamba @@ -11,6 +11,7 @@ Packager: Silvan Calarco URL: http://boost.org/ Source: http://download.sourceforge.net/sourceforge/boost/boost_%{pckver}.tar.bz2 Patch0: libboost-1.57.0-moc-libqt4-4.8.6.patch +Patch1: libboost-1.58.0-python-3.3.patch License: Boost Software License ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -89,6 +90,7 @@ This package contains then Boost.python3 library %prep %setup -q -n boost_%{pckver} %patch0 -p1 +%patch1 -p1 %build # Build boost with python3 @@ -231,6 +233,9 @@ cp stage/lib/libboost_python-mt.* %{buildroot}%{_libdir}/ %{_libdir}/libboost_python3-mt.so.* %changelog +* Thu Apr 30 2015 Automatic Build System 1.58.0-1mamba +- automatic version update by autodist + * Sat Apr 11 2015 Silvan Calarco 1.57.0-4mamba - patch to fix qt4 moc (kdepim 4.14.6)