1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include ${ADK_TOPDIR}/rules.mk
10 PKG_HASH
:= a5800f405508f5df8114558ca9855d2640a2de8f0445f051fa1c7c3383045724
11 PKG_DESCR
:= portable c
++ library
12 PKG_SECTION
:= libs
/misc
13 PKG_BUILDDEP
:= python3-host
15 PKG_URL
:= http
://www.boost.org
/
16 PKG_SITES
:= ${MASTER_SITE_SOURCEFORGE
:=boost
/}
19 DISTFILES
:= boost_
$(PKG_EXTRAVER
)_0.
tar.gz
20 WRKDIST
= ${WRKDIR}/${PKG_NAME}_
$(PKG_EXTRAVER
)_0
22 PKG_FLAVOURS_BOOST
:= DATE_TIME JSON GRAPH GRAPH_PARALLEL IOSTREAMS LOG MATH PROGRAM_OPTIONS PYTHON REGEX SERIALIZATION TEST WAVE
24 PKGFD_DATE_TIME
:= with date-time
25 PKGFD_JSON
:= with json
26 PKGFD_PYTHON
:= with python
27 PKGFB_PYTHON
:= python3
28 PKGFS_PYTHON
:= python3
29 PKGFD_IOSTREAMS
:= with iostreams
30 PKGFD_GRAPH
:= with graph
31 PKGFD_GRAPH_PARALLEL
:= with graph_parallel
32 PKGFD_MATH
:= with math
34 PKGFD_PROGRAM_OPTIONS
:= with program_options
35 PKGFD_REGEX
:= with regex
36 PKGFD_SERIALIZATION
:= with serialization
37 PKGFD_TEST
:= with
test
38 PKGFD_WAVE
:= with wave
40 include ${ADK_TOPDIR}/mk
/package.mk
42 $(eval
$(call PKG_template
,BOOST
,boost
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
44 include ${ADK_TOPDIR}/mk
/python3.mk
48 INSTALL_STYLE
:= manual
50 CONFIGURE_ARGS
+= --target
=$(GNU_TARGET_NAME
) \
51 --host
=$(GNU_TARGET_NAME
) \
52 --build
=$(GNU_HOST_NAME
) \
53 --prefix=${WRKINST}/usr \
54 --ignore-site-config \
60 ifneq (${ADK_PACKAGE_BOOST_IOSTREAMS},)
61 CONFIGURE_ARGS
+= -sNO_BZIP2
=1 -sZLIB_INCLUDE
=${STAGING_TARGET_DIR}/usr
/include -sZLIB_LIBPATH
=${STAGING_TARGET_DIR}/usr
/lib
63 CONFIGURE_ARGS
+= --without-iostreams
65 ifeq (${ADK_PACKAGE_BOOST_DATE_TIME},)
66 CONFIGURE_ARGS
+= --without-date_time
68 ifeq (${ADK_PACKAGE_BOOST_JSON},)
69 CONFIGURE_ARGS
+= --without-json
71 ifeq (${ADK_PACKAGE_BOOST_PYTHON},)
72 CONFIGURE_ARGS
+= --without-python
74 ifeq (${ADK_PACKAGE_BOOST_GRAPH},)
75 CONFIGURE_ARGS
+= --without-graph
77 ifeq (${ADK_PACKAGE_BOOST_LOG},)
78 CONFIGURE_ARGS
+= --without-log
80 ifeq (${ADK_PACKAGE_BOOST_MATH},)
81 CONFIGURE_ARGS
+= --without-math
83 ifeq (${ADK_PACKAGE_BOOST_PROGRAM_OPTIONS},)
84 CONFIGURE_ARGS
+= --without-program_options
86 ifeq (${ADK_PACKAGE_BOOST_REGEX},)
87 CONFIGURE_ARGS
+= --without-regex
89 ifeq (${ADK_PACKAGE_BOOST_SERIALIZATION},)
90 CONFIGURE_ARGS
+= --without-serialization
92 ifeq (${ADK_PACKAGE_BOOST_TEST},)
93 CONFIGURE_ARGS
+= --without-test
95 ifeq (${ADK_PACKAGE_BOOST_WAVE},)
96 CONFIGURE_ARGS
+= --without-wave
99 ifeq ($(ADK_TARGET_ARCH
),aarch64
)
100 BOOST_ARCH
:= architecture
=arm
102 ifeq ($(ADK_TARGET_ARCH
),arm
)
103 BOOST_ARCH
:= architecture
=arm
105 ifeq ($(ADK_TARGET_CPU_MIPS_MIPS32
),y
)
106 BOOST_ARCH
:= architecture
=mips32
108 ifeq ($(ADK_TARGET_CPU_MIPS_MIPS32R2
),y
)
109 BOOST_ARCH
:= architecture
=mips32r2
111 ifeq ($(ADK_TARGET_ARCH
),mips64
)
112 BOOST_ARCH
:= architecture
=mips64
114 ifeq ($(ADK_TARGET_ARCH
),ppc
)
115 BOOST_ARCH
:= architecture
=power
117 ifeq ($(ADK_TARGET_ARCH
),sparc
)
118 BOOST_ARCH
:= architecture
=sparc
120 ifeq ($(ADK_TARGET_ARCH
),x86_64
)
121 BOOST_ARCH
:= architecture
=x86
124 ifeq ($(ADK_TARGET_ARCH
),arm
)
125 BOOST_ABI
:= abi
=aapcs
127 ifeq ($(ADK_TARGET_ARCH
),aarch64
)
128 BOOST_ABI
:= abi
=aapcs
130 ifeq ($(ADK_TARGET_ARCH
),mips
)
134 # some variables for build
135 GPP_PATH
:= ${TOOLCHAIN_DIR}/usr
/bin
/${GNU_TARGET_NAME}-g
++
136 GPP_VERSION
:= "`${GPP_PATH} -v 2>&1 | tail -1 | awk '{print $$3}'`"
137 BJAM_PATH
:= "`find ${WRKBUILD} -type f -name "b2
$(EXEEXT
)"`"
138 PYTHON_PATH
:= ${STAGING_HOST_DIR}/usr
/bin
/python
139 PYTHON_INCLUDE
:="`find ${STAGING_TARGET_DIR}/usr/include/ -maxdepth 1 -type d -name "python
*" | head -1`"
140 PYTHON_LIB
:= "`find ${STAGING_TARGET_DIR}/usr/lib/ -maxdepth 1 -type d -name "python
*" | head -1`"
141 USER_JAM
:= ${WRKBUILD}/tools
/build
/user-config.jam
143 ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY
)$(ADK_TARGET_BINFMT_FLAT
),y
)
150 @echo
"build bjam..."
151 cd
$(WRKBUILD
)/tools
/build
/src
/engine
; .
/build.sh gcc
154 @echo
"build boost library..."
155 echo
"using gcc : ${GPP_VERSION} : ${GPP_PATH} : <compileflags>\"${TARGET_CFLAGS}\" ;" > ${USER_JAM};
156 ifneq (${ADK_PACKAGE_BOOST_PYTHON},)
157 echo
"using python : ${PYTHON_VERSION} : ${PYTHON_PATH} : ${PYTHON_INCLUDE} : ${PYTHON_LIB} ;" >> ${USER_JAM};
166 runtime-link
=$(LINKMODE
) \
170 toolset
=gcc-
${GPP_VERSION} \
171 --user-config
=${USER_JAM} \
173 --disable-long-double \
179 ${INSTALL_DIR} ${IDIR_BOOST}/usr
/lib
180 ${CP} ${WRKINST}/usr
/lib
/*.so
* ${IDIR_BOOST}/usr
/lib
182 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk