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