Makefile 4.9 KB

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