Build math portions of Boost.TR1 and ship in boost-math

This commit is contained in:
Petr Machata 2012-01-04 17:31:12 +01:00
parent 7a3ddc5eb8
commit 54ddcfc414
2 changed files with 107 additions and 6 deletions

View File

@ -0,0 +1,94 @@
diff -up boost_1_48_0/libs/math/CMakeLists.txt\~ boost_1_48_0/libs/math/CMakeLists.txt
--- boost_1_48_0/libs/math/CMakeLists.txt~ 2012-01-03 18:15:11.568913701 +0100
+++ boost_1_48_0/libs/math/CMakeLists.txt 2012-01-03 18:51:11.437962984 +0100
@@ -15,7 +15,7 @@ set (lib_headers
# Add a library target to the build system
boost_library_project(
math
- # SRCDIRS
+ SRCDIRS src/tr1
TESTDIRS test
HEADERS ${lib_headers}
# DOCDIRS
diff -up boost_1_48_0/libs/math/src/tr1/CMakeLists.txt\~ boost_1_48_0/libs/math/src/tr1/CMakeLists.txt
--- boost_1_48_0/libs/math/src/tr1/CMakeLists.txt~ 2012-01-03 18:50:07.514961526 +0100
+++ boost_1_48_0/libs/math/src/tr1/CMakeLists.txt 2012-01-03 18:47:32.803957995 +0100
@@ -0,0 +1,76 @@
+boost_add_library(math_tr1
+
+ assoc_laguerre.cpp assoc_legendre.cpp beta.cpp
+ comp_ellint_1.cpp comp_ellint_2.cpp comp_ellint_3.cpp
+ cyl_bessel_i.cpp cyl_bessel_j.cpp cyl_bessel_k.cpp
+ cyl_neumann.cpp ellint_1.cpp ellint_2.cpp ellint_3.cpp
+ expint.cpp hermite.cpp laguerre.cpp legendre.cpp
+ riemann_zeta.cpp sph_bessel.cpp sph_legendre.cpp
+ sph_neumann.cpp
+
+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
+boost_add_library(math_tr1f
+
+ assoc_laguerref.cpp assoc_legendref.cpp betaf.cpp
+ comp_ellint_1f.cpp comp_ellint_2f.cpp comp_ellint_3f.cpp
+ cyl_bessel_if.cpp cyl_bessel_jf.cpp cyl_bessel_kf.cpp
+ cyl_neumannf.cpp ellint_1f.cpp ellint_2f.cpp ellint_3f.cpp
+ expintf.cpp hermitef.cpp laguerref.cpp legendref.cpp
+ riemann_zetaf.cpp sph_besself.cpp sph_legendref.cpp
+ sph_neumannf.cpp
+
+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
+boost_add_library(math_tr1l
+
+ assoc_laguerrel.cpp assoc_legendrel.cpp betal.cpp
+ comp_ellint_1l.cpp comp_ellint_2l.cpp comp_ellint_3l.cpp
+ cyl_bessel_il.cpp cyl_bessel_jl.cpp cyl_bessel_kl.cpp
+ cyl_neumannl.cpp ellint_1l.cpp ellint_2l.cpp ellint_3l.cpp
+ expintl.cpp hermitel.cpp laguerrel.cpp legendrel.cpp
+ riemann_zetal.cpp sph_bessell.cpp sph_legendrel.cpp
+ sph_neumannl.cpp
+
+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
+boost_add_library(math_c99
+
+ acosh.cpp asinh.cpp atanh.cpp cbrt.cpp copysign.cpp erfc.cpp
+ erf.cpp expm1.cpp fmax.cpp fmin.cpp fpclassify.cpp hypot.cpp
+ lgamma.cpp llround.cpp log1p.cpp lround.cpp nextafter.cpp
+ nexttoward.cpp round.cpp tgamma.cpp trunc.cpp
+
+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
+boost_add_library(math_c99f
+
+ acoshf.cpp asinhf.cpp atanhf.cpp cbrtf.cpp copysignf.cpp
+ erfcf.cpp erff.cpp expm1f.cpp fmaxf.cpp fminf.cpp
+ fpclassifyf.cpp hypotf.cpp lgammaf.cpp llroundf.cpp log1pf.cpp
+ lroundf.cpp nextafterf.cpp nexttowardf.cpp roundf.cpp
+ tgammaf.cpp truncf.cpp
+
+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
+
+boost_add_library(math_c99l
+
+ acoshl.cpp asinhl.cpp atanhl.cpp cbrtl.cpp copysignl.cpp
+ erfcl.cpp erfl.cpp expm1l.cpp fmaxl.cpp fminl.cpp
+ fpclassifyl.cpp hypotl.cpp lgammal.cpp llroundl.cpp log1pl.cpp
+ lroundl.cpp nextafterl.cpp nexttowardl.cpp roundl.cpp
+ tgammal.cpp truncl.cpp
+
+ SHARED_COMPILE_FLAGS "-DBOOST_MATH_TR1_DYN_LINK=1"
+ COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}"
+)
Diff finished. Tue Jan 3 18:50:10 2012

View File

@ -28,7 +28,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries Summary: The free peer-reviewed portable C++ source libraries
Version: 1.48.0 Version: 1.48.0
%define version_enc 1_48_0 %define version_enc 1_48_0
Release: 3%{?dist} Release: 4%{?dist}
License: Boost and MIT and Python License: Boost and MIT and Python
# The CMake build framework (set of CMakeLists.txt and module.cmake files) is # The CMake build framework (set of CMakeLists.txt and module.cmake files) is
@ -113,6 +113,9 @@ Patch7: boost-1.48.0-foreach.patch
# https://svn.boost.org/trac/boost/ticket/6165 # https://svn.boost.org/trac/boost/ticket/6165
Patch8: boost-1.48.0-gcc47-pthreads.patch Patch8: boost-1.48.0-gcc47-pthreads.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=771370
Patch9: boost-1.48.0-mathlib.patch
%bcond_with tests %bcond_with tests
%bcond_with docs_generated %bcond_with docs_generated
@ -181,15 +184,13 @@ Run-Time support for Boost.Locale, a set of localization and Unicode
handling tools. handling tools.
%package math %package math
Summary: Stub that used to contain boost math library Summary: Math functions for boost TR1 library
Group: System Environment/Libraries Group: System Environment/Libraries
%description math %description math
This package is a stub that used to contain run-time component of boost Run-Time support for C99 and C++ TR1 C-style Functions from math
math library. Now that boost math library is header-only, this portion of Boost.TR1.
package is empty. It's kept around only so that during yum-assisted
update, old libraries from boost-math package aren't left around.
%package program-options %package program-options
Summary: Run-Time component of boost program_options library Summary: Run-Time component of boost program_options library
@ -471,6 +472,7 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH1} | %{__patch} -p0 --fuzz=0
%patch6 -p1 %patch6 -p1
%patch7 -p2 %patch7 -p2
%patch8 -p0 %patch8 -p0
%patch9 -p1
%build %build
# Support for building tests. # Support for building tests.
@ -820,6 +822,7 @@ rm -rf $RPM_BUILD_ROOT
%files math %files math
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc LICENSE_1_0.txt %doc LICENSE_1_0.txt
%{_libdir}/libboost_math*.so.%{sonamever}
%files test %files test
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -964,6 +967,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/bjam.1* %{_mandir}/man1/bjam.1*
%changelog %changelog
* Wed Jan 4 2012 Petr Machata <pmachata@redhat.com> - 1.48.0-4
- Build math portion of Boost.TR1, package DSOs in boost-math.
- Resolves: #771370
* Tue Jan 3 2012 Petr Machata <pmachata@redhat.com> - 1.48.0-3 * Tue Jan 3 2012 Petr Machata <pmachata@redhat.com> - 1.48.0-3
- Add an upstream patch for BOOST_ENABLE_THREADS - Add an upstream patch for BOOST_ENABLE_THREADS