[boost] Try again
Petr Machata
pmachata at fedoraproject.org
Sun Dec 1 23:54:23 UTC 2013
commit cb253a3d3ffe2b37be852ba062212916f35275c2
Author: Petr Machata <pmachata at redhat.com>
Date: Mon Dec 2 00:53:40 2013 +0100
Try again
boost.spec | 15 +++++++++++----
libboost_thread.so | 14 +++++++-------
2 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/boost.spec b/boost.spec
index 1e73540..0358064 100644
--- a/boost.spec
+++ b/boost.spec
@@ -36,7 +36,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.54.0
%define version_enc 1_54_0
-Release: 6%{?dist}
+Release: 7%{?dist}
License: Boost and MIT and Python
%define toplev_dirname %{name}_%{version_enc}
@@ -79,6 +79,7 @@ Requires: boost-thread = %{version}-%{release}
Requires: boost-timer = %{version}-%{release}
Requires: boost-wave = %{version}-%{release}
+BuildRequires: m4
BuildRequires: libstdc++-devel%{?_isa}
BuildRequires: bzip2-devel%{?_isa}
BuildRequires: zlib-devel%{?_isa}
@@ -740,14 +741,15 @@ echo ============================= build serial ==================
# See boost-1.54.0-thread-link_atomic.patch for where this file comes
# from.
-if [ -e serial/boost/bin.v2/libs/thread/build/gcc-4.6.3/debug/threading-multi/has_atomic_flag_lockfree ]; then
+if [ $(find serial -type f -name has_atomic_flag_lockfree \
+ -print -quit | wc -l) -ne 0 ]; then
DEF=D
else
DEF=U
fi
-sed 's/%%{version}/%{version}/g' %{SOURCE2} |
- cpp -C -P -${DEF}HAS_ATOMIC_FLAG_LOCKFREE > $(basename %{SOURCE2})
+m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \
+ %{SOURCE2} > $(basename %{SOURCE2})
# Build MPI parts of Boost with OpenMPI support
@@ -1277,6 +1279,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/bjam.1*
%changelog
+* Sun Dec 1 2013 Petr Machata <pmachata at redhat.com> - 1.54.0-7
+- Fix shameful blunders in implementation of the previous fix: don't
+ hard-code path to has_atomic_flag_lockfree binary; use m4 instead of
+ cpp, cpp in F19+ prefixes output with a bunch of comments.
+
* Wed Nov 27 2013 Petr Machata <pmachata at redhat.com> - 1.54.0-6
- Add libboost_atomic.so.* to the libboost_thread.so linker script on
architectures that need it.
diff --git a/libboost_thread.so b/libboost_thread.so
index 606a415..db50610 100644
--- a/libboost_thread.so
+++ b/libboost_thread.so
@@ -1,3 +1,4 @@
+changequote(`[', `]')dnl
/* GNU ld script
Boost.Thread header files pull in enough of Boost.System that
@@ -8,14 +9,13 @@
transitive one. Hence this linker script, which brings in the
Boost.System DSO. */
-INPUT(libboost_thread.so.%{version})
-INPUT(libboost_system.so.%{version})
-
-#ifndef HAS_ATOMIC_FLAG_LOCKFREE
-
+INPUT(libboost_thread.so.VERSION)
+INPUT(libboost_system.so.VERSION)
+ifdef([HAS_ATOMIC_FLAG_LOCKFREE],[],
+[
/* If the given architecture doesn't have lock-free implementation of
boost::atomic_flag, the dependency on Boost.Atomic may leak from
the header files to client binaries. */
-INPUT(libboost_atomic.so.%{version})
-#endif
+INPUT(libboost_atomic.so.VERSION)
+])dnl
More information about the scm-commits
mailing list