aboutsummaryrefslogtreecommitdiff
path: root/contrib/gitian-descriptors/boost-win32.yml
blob: 981c5055b076e415fcb7fe47946bdb7d35cc09c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: "boost"
suites:
- "precise"
architectures:
- "amd64"
packages:
- "mingw-w64"
- "g++-mingw-w64"
- "faketime"
- "zip"
reference_datetime: "2011-01-30 00:00:00"
remotes: []
files:
- "boost_1_50_0.tar.bz2"
script: |
  #
  INSTALLPREFIX="$OUTDIR/staging/boost"
  HOST=i686-w64-mingw32
  #

  mkdir -p "$INSTALLPREFIX"
  tar xjf boost_1_50_0.tar.bz2
  cd boost_1_50_0

  # Boost #4258: multiple definition of `_tls_used' https://svn.boost.org/trac/boost/ticket/4258
  cd libs/thread/
  patch -p1 << 'EOF'
  From 8b83ad1f0ac4c56f019072de4a7a93f8fcccb96b Mon Sep 17 00:00:00 2001
  From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
  Date: Sat, 7 Jul 2012 14:37:07 +0000
  Subject: [PATCH] Thread: Added __MINGW64_VERSION_MAJOR when __MINGW64__ is not
   defined
  
  ---
   src/win32/tss_pe.cpp | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
  
  diff --git a/src/win32/tss_pe.cpp b/src/win32/tss_pe.cpp
  index 4d75680..0cdb7a6 100644
  --- a/src/win32/tss_pe.cpp
  +++ b/src/win32/tss_pe.cpp
  @@ -11,7 +11,7 @@
   
   #if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) 
   
  -#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__)
  +#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR)
   
   #include <boost/thread/detail/tss_hooks.hpp>
   
  @@ -38,7 +38,7 @@
       }
   }
   
  -#if defined(__MINGW64__) || (__MINGW32_MAJOR_VERSION >3) ||             \
  +#if defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION >3) ||             \
       ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
   extern "C"
   {
  -- 
  1.8.4
  EOF
  cd -

  GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
  echo "using gcc : $GCCVERSION : $HOST-g++
        :
        <rc>$HOST-windres
        <archiver>$HOST-ar
        <cxxflags>-frandom-seed=boost1
        <ranlib>$HOST-ranlib
  ;" > user-config.jam
  ./bootstrap.sh --without-icu

  ./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install

  cd "$INSTALLPREFIX"
  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
  export FAKETIME=$REFERENCE_DATETIME
  zip -r boost-win32-1.50.0-gitian-r5.zip *
  cp boost-win32-1.50.0-gitian-r5.zip $OUTDIR