binutils: update to 2.43.1
[openadk.git] / package / boost / Makefile
blob4bd846e0fd8deb4b89864938ca9f4c2c39198a53
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
6 PKG_NAME:= boost
7 PKG_VERSION:= 1.84.0
8 PKG_EXTRAVER:= 1_84
9 PKG_RELEASE:= 1
10 PKG_HASH:= a5800f405508f5df8114558ca9855d2640a2de8f0445f051fa1c7c3383045724
11 PKG_DESCR:= portable c++ library
12 PKG_SECTION:= libs/misc
13 PKG_BUILDDEP:= python3-host
14 PKG_NEEDS:= c++
15 PKG_URL:= http://www.boost.org/
16 PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=boost/}
17 PKG_OPTS:= dev
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
33 PKGFD_LOG:= with log
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
46 CONFIG_STYLE:= manual
47 BUILD_STYLE:= manual
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 \
55 --without-mpi \
56 --without-context \
57 --without-coroutine \
58 --without-locale
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
62 else
63 CONFIGURE_ARGS+= --without-iostreams
64 endif
65 ifeq (${ADK_PACKAGE_BOOST_DATE_TIME},)
66 CONFIGURE_ARGS+= --without-date_time
67 endif
68 ifeq (${ADK_PACKAGE_BOOST_JSON},)
69 CONFIGURE_ARGS+= --without-json
70 endif
71 ifeq (${ADK_PACKAGE_BOOST_PYTHON},)
72 CONFIGURE_ARGS+= --without-python
73 endif
74 ifeq (${ADK_PACKAGE_BOOST_GRAPH},)
75 CONFIGURE_ARGS+= --without-graph
76 endif
77 ifeq (${ADK_PACKAGE_BOOST_LOG},)
78 CONFIGURE_ARGS+= --without-log
79 endif
80 ifeq (${ADK_PACKAGE_BOOST_MATH},)
81 CONFIGURE_ARGS+= --without-math
82 endif
83 ifeq (${ADK_PACKAGE_BOOST_PROGRAM_OPTIONS},)
84 CONFIGURE_ARGS+= --without-program_options
85 endif
86 ifeq (${ADK_PACKAGE_BOOST_REGEX},)
87 CONFIGURE_ARGS+= --without-regex
88 endif
89 ifeq (${ADK_PACKAGE_BOOST_SERIALIZATION},)
90 CONFIGURE_ARGS+= --without-serialization
91 endif
92 ifeq (${ADK_PACKAGE_BOOST_TEST},)
93 CONFIGURE_ARGS+= --without-test
94 endif
95 ifeq (${ADK_PACKAGE_BOOST_WAVE},)
96 CONFIGURE_ARGS+= --without-wave
97 endif
99 ifeq ($(ADK_TARGET_ARCH),aarch64)
100 BOOST_ARCH:= architecture=arm
101 endif
102 ifeq ($(ADK_TARGET_ARCH),arm)
103 BOOST_ARCH:= architecture=arm
104 endif
105 ifeq ($(ADK_TARGET_CPU_MIPS_MIPS32),y)
106 BOOST_ARCH:= architecture=mips32
107 endif
108 ifeq ($(ADK_TARGET_CPU_MIPS_MIPS32R2),y)
109 BOOST_ARCH:= architecture=mips32r2
110 endif
111 ifeq ($(ADK_TARGET_ARCH),mips64)
112 BOOST_ARCH:= architecture=mips64
113 endif
114 ifeq ($(ADK_TARGET_ARCH),ppc)
115 BOOST_ARCH:= architecture=power
116 endif
117 ifeq ($(ADK_TARGET_ARCH),sparc)
118 BOOST_ARCH:= architecture=sparc
119 endif
120 ifeq ($(ADK_TARGET_ARCH),x86_64)
121 BOOST_ARCH:= architecture=x86
122 endif
124 ifeq ($(ADK_TARGET_ARCH),arm)
125 BOOST_ABI:= abi=aapcs
126 endif
127 ifeq ($(ADK_TARGET_ARCH),aarch64)
128 BOOST_ABI:= abi=aapcs
129 endif
130 ifeq ($(ADK_TARGET_ARCH),mips)
131 BOOST_ABI:= abi=o32
132 endif
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)
144 LINKMODE:= static
145 else
146 LINKMODE:= shared
147 endif
149 pre-build:
150 @echo "build bjam..."
151 cd $(WRKBUILD)/tools/build/src/engine; ./build.sh gcc
153 do-build:
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};
158 endif
159 (cd ${WRKBUILD}; \
160 ${BJAM_PATH} \
161 -d 2 \
162 target-os=linux \
163 variant=release \
164 threading=multi \
165 link=$(LINKMODE) \
166 runtime-link=$(LINKMODE) \
167 $(BOOST_ARCH) \
168 $(BOOST_ABI) \
169 binary-format=elf \
170 toolset=gcc-${GPP_VERSION} \
171 --user-config=${USER_JAM} \
172 --layout=system \
173 --disable-long-double \
174 ${CONFIGURE_ARGS} \
175 install \
178 boost-install:
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