From 063cd91e190686bd1ce0d4232b9351baddf4230d Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Mon, 26 Mar 2018 19:33:37 +1100 Subject: boost: add minimal native build --- src/boost.mk | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/boost.mk b/src/boost.mk index dafeb5f..692e882 100644 --- a/src/boost.mk +++ b/src/boost.mk @@ -9,8 +9,11 @@ $(PKG)_CHECKSUM := 686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933f $(PKG)_SUBDIR := boost_$(subst .,_,$($(PKG)_VERSION)) $(PKG)_FILE := boost_$(subst .,_,$($(PKG)_VERSION)).tar.bz2 $(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/boost/boost/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) $(PKG)_DEPS := cc bzip2 expat zlib +$(PKG)_DEPS_$(BUILD) := zlib + define $(PKG)_UPDATE $(WGET) -q -O- 'https://www.boost.org/users/download/' | \ $(SED) -n 's,.*/boost/\([0-9][^"/]*\)/".*,\1,p' | \ @@ -84,3 +87,38 @@ define $(PKG)_BUILD '$(PWD)/src/cmake/test' $(MAKE) -C '$(1).test-cmake' -j 1 install endef + +define $(PKG)_BUILD_$(BUILD) + # old version appears to interfere + rm -rf '$(PREFIX)/$(TARGET)/include/boost/' + rm -f "$(PREFIX)/$(TARGET)/lib/libboost"* + + # compile boost build (b2) + cd '$(SOURCE_DIR)/tools/build/' && ./bootstrap.sh + + # minimal native build - for more features, replace: + # --with-system \ + # --with-filesystem \ + # + # with: + # --without-mpi \ + # --without-python \ + + cd '$(SOURCE_DIR)' && ./tools/build/b2 \ + -a \ + -q \ + -j '$(JOBS)' \ + variant=release \ + link=static \ + threading=multi \ + runtime-link=static \ + --disable-icu \ + --with-system \ + --with-filesystem \ + --build-dir='$(BUILD_DIR)' \ + --prefix='$(PREFIX)/$(TARGET)' \ + --exec-prefix='$(PREFIX)/$(TARGET)/bin' \ + --libdir='$(PREFIX)/$(TARGET)/lib' \ + --includedir='$(PREFIX)/$(TARGET)/include' \ + install +endef -- cgit v0.12