Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= boost
  5. PKG_VERSION:= 1.56.0
  6. PKG_EXTRAVER:= 1_56
  7. PKG_RELEASE:= 1
  8. PKG_HASH:= f53024506c3b3a6f96520054ec82a834772720908aed6050b30f4f56722e7701
  9. PKG_DESCR:= boost c++ library
  10. PKG_SECTION:= libs/misc
  11. PKG_BUILDDEP:= python2-host
  12. PKG_URL:= http://www.boost.org/
  13. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=boost/}
  14. PKG_OPTS:= dev
  15. PKG_ARCH_DEPENDS:= !m68k !xtensa
  16. DISTFILES:= boost_$(PKG_EXTRAVER)_0.tar.gz
  17. WRKDIST= ${WRKDIR}/${PKG_NAME}_$(PKG_EXTRAVER)_0
  18. PKG_FLAVOURS_BOOST:= DATE_TIME GRAPH GRAPH_PARALLEL IOSTREAMS MATH PROGRAM_OPTIONS PYTHON REGEX SERIALIZATION SIGNALS TEST 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_TEST:= with test
  32. PKGFD_WAVE:= with wave
  33. include ${ADK_TOPDIR}/mk/package.mk
  34. $(eval $(call PKG_template,BOOST,boost,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  35. include ${ADK_TOPDIR}/mk/python.mk
  36. CONFIG_STYLE:= manual
  37. BUILD_STYLE:= manual
  38. INSTALL_STYLE:= manual
  39. CONFIGURE_ARGS+= --target=$(GNU_TARGET_NAME) \
  40. --host=$(GNU_TARGET_NAME) \
  41. --build=$(GNU_HOST_NAME) \
  42. --prefix=${WRKINST}/usr \
  43. --ignore-site-config \
  44. --without-locale
  45. ifneq (${ADK_PACKAGE_BOOST_IOSTREAMS},)
  46. CONFIGURE_ARGS+= -sNO_BZIP2=1 -sZLIB_INCLUDE=${STAGING_TARGET_DIR}/usr/include -sZLIB_LIBPATH=${STAGING_TARGET_DIR}/usr/lib
  47. else
  48. CONFIGURE_ARGS+= --without-iostreams
  49. endif
  50. ifeq (${ADK_PACKAGE_BOOST_DATE_TIME},)
  51. CONFIGURE_ARGS+= --without-date_time
  52. endif
  53. ifeq (${ADK_PACKAGE_BOOST_PYTHON},)
  54. CONFIGURE_ARGS+= --without-python
  55. endif
  56. ifeq (${ADK_PACKAGE_BOOST_GRAPH},)
  57. CONFIGURE_ARGS+= --without-graph
  58. endif
  59. ifeq (${ADK_PACKAGE_BOOST_MATH},)
  60. CONFIGURE_ARGS+= --without-math
  61. endif
  62. ifeq (${ADK_PACKAGE_BOOST_PROGRAM_OPTIONS},)
  63. CONFIGURE_ARGS+= --without-program_options
  64. endif
  65. ifeq (${ADK_PACKAGE_BOOST_REGEX},)
  66. CONFIGURE_ARGS+= --without-regex
  67. endif
  68. ifeq (${ADK_PACKAGE_BOOST_SERIALIZATION},)
  69. CONFIGURE_ARGS+= --without-serialization
  70. endif
  71. ifeq (${ADK_PACKAGE_BOOST_SIGNALS},)
  72. CONFIGURE_ARGS+= --without-signals
  73. endif
  74. ifeq (${ADK_PACKAGE_BOOST_TEST},)
  75. CONFIGURE_ARGS+= --without-test
  76. endif
  77. ifeq (${ADK_PACKAGE_BOOST_WAVE},)
  78. CONFIGURE_ARGS+= --without-wave
  79. endif
  80. ifeq ($(ADK_TARGET_ARCH),x86_64)
  81. BOOST_ARCH:= x86
  82. else
  83. BOOST_ARCH:= $(ADK_TARGET_ARCH)
  84. endif
  85. ifeq ($(ADK_TARGET_ARCH),arm)
  86. BOOST_ABI:= abi=aapcs
  87. endif
  88. # some variables for build
  89. GPP_PATH:= ${TOOLCHAIN_DIR}/usr/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$(EXEEXT)"`"
  92. PYTHON_PATH:= ${STAGING_HOST_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/user-config.jam
  96. pre-build:
  97. @echo "build bjam..."
  98. cd $(WRKBUILD)/tools/build/src/engine; ./build.sh gcc
  99. do-build:
  100. @echo "build boost library..."
  101. echo "using gcc : ${GPP_VERSION} : ${GPP_PATH} : <compileflags>\"${TARGET_CFLAGS}\" ;" > ${USER_JAM};
  102. ifneq (${ADK_PACKAGE_BOOST_PYTHON},)
  103. echo "using python : ${PYTHON_VERSION} : ${PYTHON_PATH} : ${PYTHON_INCLUDE} : ${PYTHON_LIB} ;" >> ${USER_JAM};
  104. endif
  105. (cd ${WRKBUILD}; \
  106. ${BJAM_PATH} \
  107. -d 2 \
  108. target-os=linux \
  109. variant=release \
  110. link=shared \
  111. runtime-link=shared \
  112. architecture=$(BOOST_ARCH) \
  113. $(BOOST_ABI) \
  114. binary-format=elf \
  115. toolset=gcc-${GPP_VERSION} \
  116. --user-config=${USER_JAM} \
  117. --layout=system \
  118. --disable-long-double \
  119. ${CONFIGURE_ARGS} \
  120. install \
  121. )
  122. boost-install:
  123. ${INSTALL_DIR} ${IDIR_BOOST}/usr/lib
  124. ${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_BOOST}/usr/lib
  125. include ${ADK_TOPDIR}/mk/pkg-bottom.mk