Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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:= 4
  7. PKG_MD5SUM:= efbfbff5a85a9330951f243d0a46e4b9
  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. PKG_OPTS:= dev
  13. PKG_ARCH_DEPENDS:= !avr32 !m68k
  14. DISTFILES:= boost_1_54_0.tar.gz
  15. WRKDIST= ${WRKDIR}/${PKG_NAME}_1_54_0
  16. PKG_FLAVOURS_BOOST:= date_time graph graph_parallel iostreams math program_options python regex serialization signals system test thread wave
  17. PKGFD_date_time:= with date-time
  18. PKGFD_python:= with Python
  19. PKGFB_python:= python2
  20. PKGFS_python:= python2
  21. PKGFD_iostreams:= with iostreams
  22. PKGFD_graph:= with graph
  23. PKGFD_graph_parallel:= with graph_parallel
  24. PKGFD_math:= with math
  25. PKGFD_program_options:= with program_options
  26. PKGFD_regex:= with regex
  27. PKGFD_serialization:= with serialization
  28. PKGFD_signals:= with signals
  29. PKGFD_system:= with system
  30. PKGFD_test:= with test
  31. PKGFD_thread:= with thread
  32. PKGFD_wave:= with wave
  33. include ${TOPDIR}/mk/package.mk
  34. $(eval $(call PKG_template,BOOST,boost,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  35. CONFIG_STYLE:= manual
  36. BUILD_STYLE:= manual
  37. INSTALL_STYLE:= manual
  38. CONFIGURE_ARGS += \
  39. --target=$(GNU_TARGET_NAME) \
  40. --host=$(GNU_TARGET_NAME) \
  41. --build=$(GNU_HOST_NAME) \
  42. --prefix=${WRKINST}/usr \
  43. CONFIGURE_ARGS+=--without-locale
  44. ifneq (${ADK_PACKAGE_BOOST_IOSTREAMS},)
  45. CONFIGURE_ARGS += -sNO_BZIP2=1 -sZLIB_INCLUDE=${STAGING_DIR}/usr/include -sZLIB_LIBPATH=${STAGING_DIR}/usr/lib
  46. else
  47. CONFIGURE_ARGS += --without-iostreams
  48. endif
  49. ifeq (${ADK_PACKAGE_BOOST_DATE_TIME},)
  50. CONFIGURE_ARGS+=--without-date_time
  51. endif
  52. ifeq (${ADK_PACKAGE_BOOST_PYTHON},)
  53. CONFIGURE_ARGS+=--without-python
  54. endif
  55. ifeq (${ADK_PACKAGE_BOOST_GRAPH},)
  56. CONFIGURE_ARGS+=--without-graph
  57. endif
  58. ifeq (${ADK_PACKAGE_BOOST_MATH},)
  59. CONFIGURE_ARGS+=--without-math
  60. endif
  61. ifeq (${ADK_PACKAGE_BOOST_PROGRAM_OPTIONS},)
  62. CONFIGURE_ARGS+=--without-program_options
  63. endif
  64. ifeq (${ADK_PACKAGE_BOOST_REGEX},)
  65. CONFIGURE_ARGS+=--without-regex
  66. endif
  67. ifeq (${ADK_PACKAGE_BOOST_SERIALIZATION},)
  68. CONFIGURE_ARGS+=--without-serialization
  69. endif
  70. ifeq (${ADK_PACKAGE_BOOST_SIGNALS},)
  71. CONFIGURE_ARGS+=--without-signals
  72. endif
  73. ifeq (${ADK_PACKAGE_BOOST_SYSTEM},)
  74. CONFIGURE_ARGS+=--without-system
  75. endif
  76. ifeq (${ADK_PACKAGE_BOOST_TEST},)
  77. CONFIGURE_ARGS+=--without-test
  78. endif
  79. ifeq (${ADK_PACKAGE_BOOST_THREAD},)
  80. CONFIGURE_ARGS+=--without-thread
  81. endif
  82. ifeq (${ADK_PACKAGE_BOOST_WAVE},)
  83. CONFIGURE_ARGS+=--without-wave
  84. endif
  85. # some variables for build
  86. GPP_PATH:= ${STAGING_HOST_DIR}/bin/${GNU_TARGET_NAME}-g++
  87. GPP_VERSION:= "`${GPP_PATH} -v 2>&1 | tail -1 | awk '{print $$3}'`"
  88. BJAM_PATH:= "`find ${WRKBUILD} -type f -name "bjam"`"
  89. PYTHON_PATH:= ${STAGING_TARGET_DIR}/usr/bin/python
  90. PYTHON_INCLUDE:="`find ${STAGING_TARGET_DIR}/usr/include/ -maxdepth 1 -type d -name "python*" | head -1`"
  91. PYTHON_LIB:= "`find ${STAGING_TARGET_DIR}/usr/lib/ -maxdepth 1 -type d -name "python*" | head -1`"
  92. USER_JAM:= ${WRKBUILD}/tools/build/v2/user-config.jam
  93. pre-build:
  94. @echo "build bjam..."
  95. cd $(WRKBUILD)/tools/build/v2/engine; ./build.sh gcc
  96. do-build:
  97. @echo "build boost library..."
  98. # remove exisiting using gcc line from user.jam
  99. ${SED} "/^using gcc/d" ${USER_JAM}
  100. # add using gcc line with determined options to user.jam
  101. echo "using gcc : ${GPP_VERSION} : ${GPP_PATH} ;" >> ${USER_JAM};
  102. # remove exisiting using python line from user.jam
  103. ${SED} "/^using python/d" ${USER_JAM}
  104. ifneq (${ADK_PACKAGE_BOOST_PYTHON},)
  105. # add using python line with determined options to user.jam
  106. echo "using python : ${PYTHON_VERSION} : ${PYTHON_PATH} : ${PYTHON_INCLUDE} : ${PYTHON_LIB} ;" >> ${USER_JAM};
  107. endif
  108. # run bjam to build boost
  109. ( cd ${WRKBUILD}; \
  110. ${BJAM_PATH} \
  111. -sBUILD=release \
  112. --toolset=gcc-${GPP_VERSION} \
  113. --build-type=minimal \
  114. --layout=versioned \
  115. --disable-long-double \
  116. --without-mpi \
  117. ${CONFIGURE_ARGS} \
  118. install \
  119. )
  120. boost-install:
  121. ${INSTALL_DIR} ${IDIR_BOOST}/usr/lib
  122. ${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_BOOST}/usr/lib
  123. include ${TOPDIR}/mk/pkg-bottom.mk