talimat 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Tanım: Boost paketi C++ için özgür ve taşınabilir kaynak kütüphanelerinden oluşan bir settir.
  2. # URL: http://boost.sourceforge.net/
  3. # Paketçi: milisarge
  4. # Gerekler: icu python python3
  5. # Grup: kütüphane
  6. isim=boost
  7. surum=1.69.0
  8. devir=1
  9. kaynak=(https://downloads.sourceforge.net/project/${isim}/${isim}/${surum}/${isim}_${surum//./_}.tar.bz2)
  10. derle() {
  11. export _stagedir="${SRC}/stagedir"
  12. local JOBS="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
  13. cd ${isim}_${surum//./_}
  14. ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python2
  15. install -Dm755 ./b2 "${_stagedir}"/bin/b2
  16. # default "minimal" install: "release link=shared,static
  17. # runtime-link=shared threading=single,multi"
  18. # --layout=tagged will add the "-mt" suffix for multithreaded libraries
  19. # and installs includes in /usr/include/boost.
  20. # --layout=system no longer adds the -mt suffix for multi-threaded libs.
  21. # install to ${_stagedir} in preparation for split packaging
  22. "${_stagedir}"/bin/b2 \
  23. variant=release \
  24. debug-symbols=off \
  25. threading=multi \
  26. runtime-link=shared \
  27. link=shared,static \
  28. toolset=gcc \
  29. python=2.7 \
  30. cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
  31. cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
  32. --layout=system \
  33. ${JOBS} \
  34. \
  35. --prefix="${_stagedir}" \
  36. install
  37. # because b2 in boost 1.62.0 doesn't seem to respect python parameter, we
  38. # need another run for liboost_python3.so
  39. sed -e '/using python/ s@;@: /usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} ;@' \
  40. -i bootstrap.sh
  41. ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python3 \
  42. --with-libraries=python
  43. "${_stagedir}"/bin/b2 clean
  44. "${_stagedir}"/bin/b2 \
  45. variant=release \
  46. debug-symbols=off \
  47. threading=multi \
  48. runtime-link=shared \
  49. link=shared,static \
  50. toolset=gcc \
  51. python=3.7 \
  52. cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
  53. cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
  54. --layout=system \
  55. ${JOBS} \
  56. --prefix="${_stagedir}/python3" \
  57. --with-python \
  58. install
  59. install -dm755 "${PKG}"/usr
  60. cp -a "${_stagedir}"/{bin,include} "${PKG}"/usr
  61. install -d "${PKG}"/usr/lib
  62. cp -a "${_stagedir}"/lib/*.a "${PKG}"/usr/lib/
  63. cp -a "${_stagedir}"/lib "${PKG}"/usr
  64. cp -a "${_stagedir}"/python3/lib/libboost_python3* "${PKG}"/usr/lib
  65. }