Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= boost
  5. PKG_VERSION:= 1.54.0
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= efbfbff5a85a9330951f243d0a46e4b9
  8. PKG_DESCR:= boost C++ library
  9. PKG_SECTION:= libs
  10. PKG_BUILDDEP:= gettext-tiny
  11. PKG_URL:= http://www.boost.org/
  12. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=boost/}
  13. DISTFILES:= boost_1_54_0.tar.gz
  14. WRKDIST= ${WRKDIR}/${PKG_NAME}_1_54_0
  15. PKG_LIBC_DEPENDS:= eglibc glibc musl
  16. PKG_SUBPKGS:= BOOST BOOST_DEV
  17. PKGSD_BOOST_DEV:= boost header files
  18. PKGSC_BOOST_DEV:= devel
  19. PKG_CHOICES_BOOST:= SHARED STATIC BOTH
  20. PKGCD_STATIC:= install static libs
  21. PKGCD_SHARED:= install shared libs
  22. PKGCD_BOTH:= install static and shared libs
  23. PKG_FLAVOURS_BOOST:= date_time graph graph_parallel iostreams math program_options python regex serialization signals system test thread wave
  24. PKGFD_date_time:= with date-time
  25. PKGFD_python:= with Python
  26. PKGFB_python:= python2
  27. PKGFS_python:= python2
  28. PKGFD_iostreams:= with iostreams
  29. PKGFD_graph:= with graph
  30. PKGFD_graph_parallel:= with graph_parallel
  31. PKGFD_math:= with math
  32. PKGFD_program_options:= with program_options
  33. PKGFD_regex:= with regex
  34. PKGFD_serialization:= with serialization
  35. PKGFD_signals:= with signals
  36. PKGFD_system:= with system
  37. PKGFD_test:= with test
  38. PKGFD_thread:= with thread
  39. PKGFD_wave:= with wave
  40. include ${TOPDIR}/mk/package.mk
  41. $(eval $(call PKG_template,BOOST,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  42. $(eval $(call PKG_template,BOOST_DEV,boost-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_BOOST_DEV},${PKGSC_BOOST_DEV}))
  43. CONFIG_STYLE:= manual
  44. BUILD_STYLE:= manual
  45. INSTALL_STYLE:= manual
  46. CONFIGURE_ARGS += \
  47. --target=$(GNU_TARGET_NAME) \
  48. --host=$(GNU_TARGET_NAME) \
  49. --build=$(GNU_HOST_NAME) \
  50. --prefix=${WRKINST}/usr \
  51. ifneq (${ADK_PACKAGE_BOOST_IOSTREAMS},)
  52. CONFIGURE_ARGS += -sNO_BZIP2=1 -sZLIB_INCLUDE=${STAGING_DIR}/usr/include -sZLIB_LIBPATH=${STAGING_DIR}/usr/lib
  53. else
  54. CONFIGURE_ARGS += --without-iostreams
  55. endif
  56. ifeq (${ADK_PACKAGE_BOOST_DATE_TIME},)
  57. CONFIGURE_ARGS+=--without-date_time
  58. endif
  59. ifeq (${ADK_PACKAGE_BOOST_PYTHON},)
  60. CONFIGURE_ARGS+=--without-python
  61. endif
  62. ifeq (${ADK_PACKAGE_BOOST_GRAPH},)
  63. CONFIGURE_ARGS+=--without-graph
  64. endif
  65. ifeq (${ADK_PACKAGE_BOOST_math},)
  66. CONFIGURE_ARGS+=--without-math
  67. endif
  68. ifeq (${ADK_PACKAGE_BOOST_PROGRAM_OPTIONS},)
  69. CONFIGURE_ARGS+=--without-program_options
  70. endif
  71. ifeq (${ADK_PACKAGE_BOOST_REGEX},)
  72. CONFIGURE_ARGS+=--without-regex
  73. endif
  74. ifeq (${ADK_PACKAGE_BOOST_SERIALIZATION},)
  75. CONFIGURE_ARGS+=--without-serialization
  76. endif
  77. ifeq (${ADK_PACKAGE_BOOST_SIGNALS},)
  78. CONFIGURE_ARGS+=--without-signals
  79. endif
  80. ifeq (${ADK_PACKAGE_BOOST_SYSTEM},)
  81. CONFIGURE_ARGS+=--without-system
  82. endif
  83. ifeq (${ADK_PACKAGE_BOOST_TEST},)
  84. CONFIGURE_ARGS+=--without-test
  85. endif
  86. ifeq (${ADK_PACKAGE_BOOST_THREAD},)
  87. CONFIGURE_ARGS+=--without-thread
  88. endif
  89. ifeq (${ADK_PACKAGE_BOOST_WAVE},)
  90. CONFIGURE_ARGS+=--without-wave
  91. endif
  92. # some variables for build
  93. GPP_PATH:= ${STAGING_HOST_DIR}/bin/${GNU_TARGET_NAME}-g++
  94. GPP_VERSION:= "`${GPP_PATH} -v 2>&1 | tail -1 | awk '{print $$3}'`"
  95. BJAM_PATH:= "`find ${WRKBUILD} -type f -name "bjam"`"
  96. PYTHON_PATH:= ${STAGING_TARGET_DIR}/usr/bin/python
  97. PYTHON_INCLUDE:="`find ${STAGING_TARGET_DIR}/usr/include/ -maxdepth 1 -type d -name "python*" | head -1`"
  98. PYTHON_LIB:= "`find ${STAGING_TARGET_DIR}/usr/lib/ -maxdepth 1 -type d -name "python*" | head -1`"
  99. USER_JAM:= ${WRKBUILD}/tools/build/v2/user-config.jam
  100. pre-build:
  101. @echo "build bjam..."
  102. cd $(WRKBUILD)/tools/build/v2/engine; ./build.sh gcc
  103. do-build:
  104. @echo "build boost library..."
  105. # remove exisiting using gcc line from user.jam
  106. ${SED} "/^using gcc/d" ${USER_JAM}
  107. # add using gcc line with determined options to user.jam
  108. echo "using gcc : ${GPP_VERSION} : ${GPP_PATH} ;" >> ${USER_JAM};
  109. # remove exisiting using python line from user.jam
  110. ${SED} "/^using python/d" ${USER_JAM}
  111. ifneq (${ADK_PACKAGE_BOOST_PYTHON},)
  112. # add using python line with determined options to user.jam
  113. echo "using python : ${PYTHON_VERSION} : ${PYTHON_PATH} : ${PYTHON_INCLUDE} : ${PYTHON_LIB} ;" >> ${USER_JAM};
  114. endif
  115. # run bjam to build boost
  116. ( cd ${WRKBUILD}; \
  117. ${BJAM_PATH} \
  118. -sBUILD=release \
  119. --toolset=gcc-${GPP_VERSION} \
  120. --build-type=minimal \
  121. --layout=versioned \
  122. --disable-long-double \
  123. --without-mpi \
  124. ${CONFIGURE_ARGS} \
  125. install \
  126. )
  127. boost-install:
  128. ${INSTALL_DIR} ${IDIR_BOOST}/usr/lib
  129. ifneq (${ADK_PACKAGE_BOOST_SHARED},)
  130. ${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_BOOST}/usr/lib
  131. endif
  132. ifneq (${ADK_PACKAGE_BOOST_STATIC},)
  133. ${CP} ${WRKINST}/usr/lib/*.a ${IDIR_BOOST}/usr/lib
  134. endif
  135. ifneq (${ADK_PACKAGE_BOOST_BOTH},)
  136. ${CP} ${WRKINST}/usr/lib/*.a ${IDIR_BOOST}/usr/lib
  137. ${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_BOOST}/usr/lib
  138. endif
  139. boost-dev-install:
  140. ${INSTALL_DIR} ${IDIR_BOOST_DEV}/usr/include
  141. ${CP} ${WRKINST}/usr/include/* ${IDIR_BOOST_DEV}/usr/include
  142. include ${TOPDIR}/mk/pkg-bottom.mk