boost.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ##
  2. ## boost.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_openpkg 1.33.1
  26. %define V_dist 1_33_1
  27. # package information
  28. Name: boost
  29. Summary: Peer-Reviewed Portable C++ Libraries
  30. URL: http://www.boost.org/
  31. Vendor: Boost Community
  32. Packager: OpenPKG
  33. Distribution: OpenPKG
  34. Class: EVAL
  35. Group: Language
  36. License: Boost Software License
  37. Version: %{V_openpkg}
  38. Release: 20060702
  39. # package options
  40. %option with_debug yes
  41. %option with_optimize yes
  42. %option with_threads yes
  43. # list of sources
  44. Source0: http://switch.dl.sourceforge.net/boost/boost_%{V_dist}.tar.bz2
  45. Patch0: boost.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  50. PreReq: OpenPKG, openpkg >= 20040130
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. Boost provides peer-reviewed portable C++ class libraries, placing
  55. emphasis on libraries which work well with the C++ Standard
  56. Library. The libraries are intended to be widely useful, and are in
  57. regular use by thousands of programmers across a broad spectrum of
  58. applications.
  59. Aiming to provide missing functionality in current standards,
  60. Boost was begun by members of the C++ Standards Committee Library
  61. Working Group. Today, logic from a subset of the boost collection is
  62. under review by the ISO C++ Standards Committee and considered for
  63. inclusion in its future standards documents.
  64. %track
  65. prog boost = {
  66. version = %{V_dist}
  67. url = http://prdownloads.sourceforge.net/boost/
  68. regex = boost_(\d+_\d+\_\d+)\.tar\.bz2
  69. }
  70. %prep
  71. %setup -q -n boost_%{V_dist}
  72. %patch -p0
  73. rm -rf \
  74. libs/python \
  75. boost/python* \
  76. tools/build/v1/python.jam
  77. # accommodate platforms missing wide character support
  78. case "%{l_platform -t}" in
  79. *-freebsd4* )
  80. %{l_shtool} subst \
  81. -e 's;.*<lib>boost_wserialization.*;;' \
  82. libs/serialization/build/Jamfile
  83. ;;
  84. esac
  85. %build
  86. # bootstrap bjam(1), the boost build system
  87. ( cd tools/build/jam_src
  88. ./build.sh gcc
  89. ) || exit $?
  90. # create build subdirectory, prepare to build
  91. ln -s tools/build/jam_src/bin.*/bjam bjam
  92. mkdir obj
  93. # configure build options for bjam(1) -sBUILD parameter
  94. debugopts="release"
  95. optimizeopts="<optimization>off"
  96. threadopts="<threading>single"
  97. %if "%{with_debug}" == "yes"
  98. debugopts="$debugopts debug"
  99. %endif
  100. %if "%{with_optimize}" == "yes"
  101. optimizeopts="<optimization>speed <inlining>full"
  102. %endif
  103. %if "%{with_threads}" == "yes"
  104. threadopts="<threading>single/multi"
  105. %endif
  106. # build all libraries
  107. ./bjam --builddir=obj -sBUILD="$debugopts $optimizeopts $threadopts" stage
  108. %install
  109. rm -rf $RPM_BUILD_ROOT
  110. ./bjam --prefix=$RPM_BUILD_ROOT%{l_prefix} install
  111. mv $RPM_BUILD_ROOT%{l_prefix}/include/boost-*/boost $RPM_BUILD_ROOT%{l_prefix}/include
  112. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/boost-*
  113. find $RPM_BUILD_ROOT%{l_prefix}/lib/ \
  114. -name "*.so" -print -o \
  115. -name "libboost_*.so.%{V_openpkg}" \
  116. -print | xargs rm -f
  117. %{l_shtool} mkdir -f -p -m 755 \
  118. $RPM_BUILD_ROOT%{l_prefix}/bin
  119. %{l_shtool} install -c -m 755 \
  120. tools/build/jam_src/bin.*/bjam \
  121. $RPM_BUILD_ROOT%{l_prefix}/bin/
  122. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  123. %files -f files
  124. %clean
  125. rm -rf $RPM_BUILD_ROOT