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