Makefile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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.55.0
  6. PKG_RELEASE:= 4
  7. PKG_MD5SUM:= 93780777cfbf999a600f62883bd54b17
  8. PKG_DESCR:= boost C++ library
  9. PKG_SECTION:= libs
  10. PKG_BUILDDEP:= autotool bzip2-host python2-host
  11. PKG_URL:= http://www.boost.org/
  12. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=boost/}
  13. PKG_OPTS:= dev
  14. PKG_ARCH_DEPENDS:= !m68k
  15. DISTFILES:= boost_1_55_0.tar.gz
  16. WRKDIST= ${WRKDIR}/${PKG_NAME}_1_55_0
  17. PKG_FLAVOURS_BOOST:= DATE_TIME GRAPH GRAPH_PARALLEL IOSTREAMS MATH PROGRAM_OPTIONS PYTHON REGEX SERIALIZATION SIGNALS SYSTEM TEST THREAD WAVE
  18. PKGFD_DATE_TIME:= with date-time
  19. PKGFD_PYTHON:= with Python
  20. PKGFB_PYTHON:= python2
  21. PKGFS_PYTHON:= python2
  22. PKGFD_IOSTREAMS:= with iostreams
  23. PKGFD_GRAPH:= with graph
  24. PKGFD_GRAPH_PARALLEL:= with graph_parallel
  25. PKGFD_MATH:= with math
  26. PKGFD_PROGRAM_OPTIONS:= with program_options
  27. PKGFD_REGEX:= with regex
  28. PKGFD_SERIALIZATION:= with serialization
  29. PKGFD_SIGNALS:= with signals
  30. PKGFD_SYSTEM:= with system
  31. PKGFD_TEST:= with test
  32. PKGFD_THREAD:= with thread
  33. PKGFD_WAVE:= with wave
  34. include ${TOPDIR}/mk/package.mk
  35. $(eval $(call PKG_template,BOOST,boost,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  36. include ${TOPDIR}/mk/python.mk
  37. CONFIG_STYLE:= manual
  38. BUILD_STYLE:= manual
  39. INSTALL_STYLE:= manual
  40. CONFIGURE_ARGS += \
  41. --target=$(GNU_TARGET_NAME) \
  42. --host=$(GNU_TARGET_NAME) \
  43. --build=$(GNU_HOST_NAME) \
  44. --prefix=${WRKINST}/usr \
  45. CONFIGURE_ARGS+=--without-locale
  46. ifneq (${ADK_PACKAGE_BOOST_IOSTREAMS},)
  47. CONFIGURE_ARGS += -sNO_BZIP2=1 -sZLIB_INCLUDE=${STAGING_TARGET_DIR}/usr/include -sZLIB_LIBPATH=${STAGING_TARGET_DIR}/usr/lib
  48. else
  49. CONFIGURE_ARGS += --without-iostreams
  50. endif
  51. ifeq (${ADK_PACKAGE_BOOST_DATE_TIME},)
  52. CONFIGURE_ARGS+=--without-date_time
  53. endif
  54. ifeq (${ADK_PACKAGE_BOOST_PYTHON},)
  55. CONFIGURE_ARGS+=--without-python
  56. endif
  57. ifeq (${ADK_PACKAGE_BOOST_GRAPH},)
  58. CONFIGURE_ARGS+=--without-graph
  59. endif
  60. ifeq (${ADK_PACKAGE_BOOST_MATH},)
  61. CONFIGURE_ARGS+=--without-math
  62. endif
  63. ifeq (${ADK_PACKAGE_BOOST_PROGRAM_OPTIONS},)
  64. CONFIGURE_ARGS+=--without-program_options
  65. endif
  66. ifeq (${ADK_PACKAGE_BOOST_REGEX},)
  67. CONFIGURE_ARGS+=--without-regex
  68. endif
  69. ifeq (${ADK_PACKAGE_BOOST_SERIALIZATION},)
  70. CONFIGURE_ARGS+=--without-serialization
  71. endif
  72. ifeq (${ADK_PACKAGE_BOOST_SIGNALS},)
  73. CONFIGURE_ARGS+=--without-signals
  74. endif
  75. ifeq (${ADK_PACKAGE_BOOST_SYSTEM},)
  76. CONFIGURE_ARGS+=--without-system
  77. endif
  78. ifeq (${ADK_PACKAGE_BOOST_TEST},)
  79. CONFIGURE_ARGS+=--without-test
  80. endif
  81. ifeq (${ADK_PACKAGE_BOOST_THREAD},)
  82. CONFIGURE_ARGS+=--without-thread
  83. endif
  84. ifeq (${ADK_PACKAGE_BOOST_WAVE},)
  85. CONFIGURE_ARGS+=--without-wave
  86. endif
  87. ifeq ($(ARCH),x86_64)
  88. BOOST_ARCH:= x86
  89. else
  90. BOOST_ARCH:= $(ARCH)
  91. endif
  92. # some variables for build
  93. GPP_PATH:= ${STAGING_HOST_DIR}/bin/${GNU_TARGET_NAME}-g++
  94. GPP_VERSION:= "`${GPP_PATH} -v 2>&1 | tail -1 | awk '{print $$3}'`"
  95. BJAM_PATH:= "`find ${WRKBUILD} -type f -name "bjam$(EXEEXT)"`"
  96. PYTHON_PATH:= ${STAGING_HOST_DIR}/usr/bin/python
  97. PYTHON_INCLUDE:="`find ${STAGING_TARGET_DIR}/usr/include/ -maxdepth 1 -type d -name "python*" | head -1`"
  98. PYTHON_LIB:= "`find ${STAGING_TARGET_DIR}/usr/lib/ -maxdepth 1 -type d -name "python*" | head -1`"
  99. USER_JAM:= ${WRKBUILD}/tools/build/v2/user-config.jam
  100. pre-build:
  101. @echo "build bjam..."
  102. cd $(WRKBUILD)/tools/build/v2/engine; ./build.sh gcc
  103. do-build:
  104. @echo "build boost library..."
  105. # remove exisiting using gcc line from user.jam
  106. ${SED} "/^using gcc/d" ${USER_JAM}
  107. # add using gcc line with determined options to user.jam
  108. echo "using gcc : ${GPP_VERSION} : ${GPP_PATH} ;" >> ${USER_JAM};
  109. # remove exisiting using python line from user.jam
  110. ${SED} "/^using python/d" ${USER_JAM}
  111. ifneq (${ADK_PACKAGE_BOOST_PYTHON},)
  112. # add using python line with determined options to user.jam
  113. echo "using python : ${PYTHON_VERSION} : ${PYTHON_PATH} : ${PYTHON_INCLUDE} : ${PYTHON_LIB} ;" >> ${USER_JAM};
  114. endif
  115. # run bjam to build boost
  116. ( cd ${WRKBUILD}; \
  117. ${BJAM_PATH} \
  118. -sBUILD=release \
  119. -d 2 \
  120. target-os=linux \
  121. architecture=$(BOOST_ARCH) \
  122. binary-format=elf \
  123. toolset=gcc-${GPP_VERSION} \
  124. --build-type=minimal \
  125. --layout=versioned \
  126. --disable-long-double \
  127. --without-mpi \
  128. --debug-configuration \
  129. ${CONFIGURE_ARGS} \
  130. install \
  131. )
  132. boost-install:
  133. ${INSTALL_DIR} ${IDIR_BOOST}/usr/lib
  134. ${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_BOOST}/usr/lib
  135. include ${TOPDIR}/mk/pkg-bottom.mk