Makefile 4.5 KB

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