2016-08-22 20:52:34 +01:00
|
|
|
# This file is part of MXE. See LICENSE.md for licensing information.
|
2009-01-31 05:52:28 +00:00
|
|
|
|
2009-04-05 13:00:17 +01:00
|
|
|
PKG := boost
|
2009-09-20 13:36:46 +01:00
|
|
|
$(PKG)_IGNORE :=
|
2015-12-25 09:43:53 +00:00
|
|
|
$(PKG)_VERSION := 1.60.0
|
|
|
|
$(PKG)_CHECKSUM := 686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b
|
2010-06-04 22:05:41 +01:00
|
|
|
$(PKG)_SUBDIR := boost_$(subst .,_,$($(PKG)_VERSION))
|
2010-12-12 00:16:13 +00:00
|
|
|
$(PKG)_FILE := boost_$(subst .,_,$($(PKG)_VERSION)).tar.bz2
|
2010-06-04 22:05:41 +01:00
|
|
|
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/boost/boost/$($(PKG)_VERSION)/$($(PKG)_FILE)
|
2015-09-23 08:41:16 +01:00
|
|
|
$(PKG)_DEPS := gcc bzip2 expat zlib
|
2009-01-31 05:52:28 +00:00
|
|
|
|
|
|
|
define $(PKG)_UPDATE
|
2012-05-08 16:16:05 +01:00
|
|
|
$(WGET) -q -O- 'http://www.boost.org/users/download/' | \
|
2011-05-17 13:10:53 +01:00
|
|
|
$(SED) -n 's,.*/boost/\([0-9][^"/]*\)/".*,\1,p' | \
|
2009-11-09 04:00:39 +00:00
|
|
|
grep -v beta | \
|
2010-06-04 22:05:41 +01:00
|
|
|
head -1
|
2009-01-31 05:52:28 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(PKG)_BUILD
|
2012-07-01 19:19:16 +01:00
|
|
|
# old version appears to interfere
|
|
|
|
rm -rf '$(PREFIX)/$(TARGET)/include/boost/'
|
2014-12-09 10:18:32 +00:00
|
|
|
rm -f "$(PREFIX)/$(TARGET)/lib/libboost"*
|
2014-12-05 10:48:18 +00:00
|
|
|
|
|
|
|
# create user-config
|
|
|
|
echo 'using gcc : mxe : $(TARGET)-g++ : <rc>$(TARGET)-windres <archiver>$(TARGET)-ar <ranlib>$(TARGET)-ranlib ;' > '$(1)/user-config.jam'
|
|
|
|
|
|
|
|
# compile boost build (b2)
|
2014-12-01 12:43:14 +00:00
|
|
|
cd '$(1)/tools/build/' && ./bootstrap.sh
|
2014-12-05 10:48:18 +00:00
|
|
|
|
|
|
|
# cross-build, see b2 options at:
|
|
|
|
# http://www.boost.org/build/doc/html/bbv2/overview/invocation.html
|
2014-12-01 12:43:14 +00:00
|
|
|
cd '$(1)' && ./tools/build/b2 \
|
2014-12-05 10:48:18 +00:00
|
|
|
-a \
|
|
|
|
-q \
|
2009-01-31 05:52:28 +00:00
|
|
|
-j '$(JOBS)' \
|
2009-11-13 12:53:50 +00:00
|
|
|
--ignore-site-config \
|
2009-01-31 05:52:28 +00:00
|
|
|
--user-config=user-config.jam \
|
2015-12-25 09:43:53 +00:00
|
|
|
abi=ms \
|
2014-12-05 10:48:18 +00:00
|
|
|
address-model=$(BITS) \
|
|
|
|
architecture=x86 \
|
|
|
|
binary-format=pe \
|
2014-12-09 10:16:46 +00:00
|
|
|
link=$(if $(BUILD_STATIC),static,shared) \
|
2014-12-05 10:48:18 +00:00
|
|
|
target-os=windows \
|
2009-01-31 05:52:28 +00:00
|
|
|
threadapi=win32 \
|
2014-12-05 10:48:18 +00:00
|
|
|
threading=multi \
|
2015-06-09 02:43:35 +01:00
|
|
|
variant=release \
|
2014-12-05 10:48:18 +00:00
|
|
|
toolset=gcc-mxe \
|
2016-04-28 23:31:10 +01:00
|
|
|
cxxflags=$(if $(findstring posix,$(MXE_GCC_THREADS)),-std=gnu++11,-std=gnu++98) \
|
2009-09-02 13:08:54 +01:00
|
|
|
--layout=tagged \
|
2014-04-05 09:31:09 +01:00
|
|
|
--disable-icu \
|
2009-01-31 05:52:28 +00:00
|
|
|
--without-mpi \
|
|
|
|
--without-python \
|
|
|
|
--prefix='$(PREFIX)/$(TARGET)' \
|
|
|
|
--exec-prefix='$(PREFIX)/$(TARGET)/bin' \
|
|
|
|
--libdir='$(PREFIX)/$(TARGET)/lib' \
|
|
|
|
--includedir='$(PREFIX)/$(TARGET)/include' \
|
|
|
|
-sEXPAT_INCLUDE='$(PREFIX)/$(TARGET)/include' \
|
|
|
|
-sEXPAT_LIBPATH='$(PREFIX)/$(TARGET)/lib' \
|
2014-12-05 10:48:18 +00:00
|
|
|
install
|
2010-04-25 12:22:44 +01:00
|
|
|
|
2014-08-11 20:03:40 +01:00
|
|
|
$(if $(BUILD_SHARED), \
|
2014-08-16 02:07:01 +01:00
|
|
|
mv -fv '$(PREFIX)/$(TARGET)/lib/'libboost_*.dll '$(PREFIX)/$(TARGET)/bin/')
|
2014-08-08 04:07:55 +01:00
|
|
|
|
2014-12-08 09:22:39 +00:00
|
|
|
# setup cmake toolchain
|
2015-09-07 13:58:19 +01:00
|
|
|
echo 'set(Boost_THREADAPI "win32")' > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake'
|
2014-12-08 09:22:39 +00:00
|
|
|
|
2010-04-25 12:22:44 +01:00
|
|
|
'$(TARGET)-g++' \
|
2010-05-14 18:53:19 +01:00
|
|
|
-W -Wall -Werror -ansi -U__STRICT_ANSI__ -pedantic \
|
2016-07-30 20:14:38 +01:00
|
|
|
'$(PWD)/src/$(PKG)-test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-boost.exe' \
|
2010-10-23 00:20:59 +01:00
|
|
|
-DBOOST_THREAD_USE_LIB \
|
2014-12-09 10:16:46 +00:00
|
|
|
-lboost_serialization-mt \
|
|
|
|
-lboost_thread_win32-mt \
|
|
|
|
-lboost_system-mt \
|
|
|
|
-lboost_chrono-mt
|
2015-10-02 13:53:29 +01:00
|
|
|
|
|
|
|
# test cmake
|
|
|
|
mkdir '$(1).test-cmake'
|
2015-10-04 06:01:18 +01:00
|
|
|
cd '$(1).test-cmake' && '$(TARGET)-cmake' \
|
|
|
|
-DPKG=$(PKG) \
|
|
|
|
-DPKG_VERSION=$($(PKG)_VERSION) \
|
|
|
|
'$(PWD)/src/cmake/test'
|
2015-10-17 01:53:28 +01:00
|
|
|
$(MAKE) -C '$(1).test-cmake' -j 1 install
|
2009-01-31 05:52:28 +00:00
|
|
|
endef
|