Browse Source
mingw upgrade allows more hardening, compiler bug fixes and possibily win64 later. Rename deps .zip files to be more consistent in revision format. Litecoin: Reuse bitcoin-0.9 win32 deps.0.8
Warren Togami
11 years ago
6 changed files with 154 additions and 104 deletions
@ -1,38 +1,66 @@
@@ -1,38 +1,66 @@
|
||||
--- |
||||
name: "boost" |
||||
suites: |
||||
- "lucid" |
||||
- "precise" |
||||
architectures: |
||||
- "i386" |
||||
- "amd64" |
||||
packages: |
||||
- "mingw32" |
||||
- "mingw-w64" |
||||
- "g++-mingw-w64" |
||||
- "faketime" |
||||
- "zip" |
||||
reference_datetime: "2011-01-30 00:00:00" |
||||
remotes: [] |
||||
files: |
||||
- "boost_1_50_0.tar.bz2" |
||||
- "boost_1_54_0.tar.bz2" |
||||
- "boost-mingw-gas-cross-compile-2013-03-03.patch" |
||||
script: | |
||||
TMPDIR="$HOME/tmpdir" |
||||
mkdir -p $TMPDIR/bin/$GBUILD_BITS $TMPDIR/include |
||||
tar xjf boost_1_50_0.tar.bz2 |
||||
cd boost_1_50_0 |
||||
echo "using gcc : 4.4 : i586-mingw32msvc-g++ |
||||
# Defines |
||||
INSTALLPREFIX="$OUTDIR/staging/boost" |
||||
HOST=i686-w64-mingw32 |
||||
# Input Integrity Check |
||||
echo "047e927de336af106a24bceba30069980c191529fd76b8dff8eb9a328b48ae1d boost_1_54_0.tar.bz2" | shasum -c |
||||
echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268 boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c |
||||
|
||||
mkdir -p "$INSTALLPREFIX" |
||||
tar xjf boost_1_54_0.tar.bz2 |
||||
cd boost_1_54_0 |
||||
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>i586-mingw32msvc-windres |
||||
<archiver>i586-mingw32msvc-ar |
||||
<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 $MAKEOPTS stage |
||||
for lib in chrono date_time exception filesystem graph iostreams math_c99f math_c99l math_c99 math_tr1f math_tr1l math_tr1 prg_exec_monitor program_options random regex serialization signals system test_exec_monitor thread_win32 unit_test_framework wave wserialization; do |
||||
mkdir $lib |
||||
(cd $lib ; ar xf ../stage/lib/libboost_${lib}-mt-s.a) |
||||
mv $lib $TMPDIR/bin/$GBUILD_BITS |
||||
done |
||||
cp -a boost $TMPDIR/include |
||||
cd $TMPDIR |
||||
|
||||
# Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work |
||||
# This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost. |
||||
# Please obtain the exact patch that matches the above sha256sum from one of the following mirrors. |
||||
# |
||||
# Read History: https://svn.boost.org/trac/boost/ticket/7262 |
||||
# History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html |
||||
# |
||||
# Patch: https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch |
||||
# Patch Mirror: http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch |
||||
# Patch Mirror: http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch |
||||
# Patch Mirror: http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch |
||||
patch -p0 < ../boost-mingw-gas-cross-compile-2013-03-03.patch |
||||
|
||||
# Bug Workaround: boost-1.54.0 broke the ability to disable zlib |
||||
# https://svn.boost.org/trac/boost/ticket/9156 |
||||
sed -i 's^\[ ac.check-library /zlib//zlib : <library>/zlib//zlib^^' libs/iostreams/build/Jamfile.v2 |
||||
sed -i 's^<source>zlib.cpp <source>gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2 |
||||
|
||||
# http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html |
||||
# Note: Might need these options in the future for 64bit builds. |
||||
# "Please note that address-model=64 must be given to bjam command line on 64bit Windows for 64bit build; otherwise 32bit code will be generated." |
||||
# "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model." |
||||
./bjam toolset=gcc binary-format=pe 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-gitian2.zip * |
||||
cp boost-win32-1.50.0-gitian2.zip $OUTDIR |
||||
zip -r boost-win32-1.54.0-gitian-r6.zip * |
||||
cp boost-win32-1.54.0-gitian-r6.zip $OUTDIR |
||||
|
@ -1,54 +1,63 @@
@@ -1,54 +1,63 @@
|
||||
--- |
||||
name: "qt" |
||||
suites: |
||||
- "lucid" |
||||
- "precise" |
||||
architectures: |
||||
- "i386" |
||||
- "amd64" |
||||
packages: |
||||
- "mingw32" |
||||
- "mingw-w64" |
||||
- "g++-mingw-w64" |
||||
- "zip" |
||||
- "unzip" |
||||
- "faketime" |
||||
- "unzip" |
||||
reference_datetime: "2011-01-30 00:00:00" |
||||
remotes: [] |
||||
files: |
||||
- "qt-everywhere-opensource-src-4.8.3.tar.gz" |
||||
- "bitcoin-deps-win32-gitian-r9.zip" |
||||
script: | |
||||
# |
||||
HOST=i686-w64-mingw32 |
||||
INSTDIR="$HOME/qt/" |
||||
# |
||||
mkdir $INSTDIR |
||||
SRCDIR="$INSTDIR/src/" |
||||
mkdir $SRCDIR |
||||
mkdir -p $INSTDIR/host/bin |
||||
# |
||||
# Need mingw-compiled openssl from bitcoin-deps: |
||||
unzip bitcoin-deps-win32-gitian-r9.zip |
||||
DEPSDIR=`pwd` |
||||
# |
||||
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz |
||||
cd qt-everywhere-opensource-src-4.8.3 |
||||
sed 's/$TODAY/2011-01-30/' -i configure |
||||
sed 's/i686-pc-mingw32-/i586-mingw32msvc-/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix 's|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/i586-mingw32msvc/include/ -frandom-seed=qtbuild|' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed "s/i686-pc-mingw32-/$HOST-/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix "s|QMAKE_CFLAGS\t\t= -pipe|QMAKE_CFLAGS\t\t= -pipe -isystem /usr/$HOST/include/ -frandom-seed=qtbuild|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed 's/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads/QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed 's/QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads/QMAKE_LFLAGS_EXCEPTIONS_ON = -lmingwthrd/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix 's/QMAKE_MOC\t\t= i586-mingw32msvc-moc/QMAKE_MOC\t\t= moc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix 's/QMAKE_RCC\t\t= i586-mingw32msvc-rcc/QMAKE_RCC\t\t= rcc/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix 's/QMAKE_UIC\t\t= i586-mingw32msvc-uic/QMAKE_UIC\t\t= uic/' -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix "s/QMAKE_MOC\t\t= $HOST-moc/QMAKE_MOC\t\t= moc/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix "s/QMAKE_RCC\t\t= $HOST-rcc/QMAKE_RCC\t\t= rcc/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix "s/QMAKE_UIC\t\t= $HOST-uic/QMAKE_UIC\t\t= uic/" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
# ar adds timestamps to every object file included in the static library |
||||
# providing -D as ar argument is supposed to solve it, but doesn't work as qmake strips off the arguments and adds -M to pass a script... |
||||
# which somehow cannot be combined with other flags. |
||||
# use faketime only for ar, as it confuses make/qmake into hanging sometimes |
||||
sed --posix "s|QMAKE_LIB\t\t= i586-mingw32msvc-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
sed --posix "s|QMAKE_LIB\t\t= $HOST-ar -ru|QMAKE_LIB\t\t= $HOME/ar -Dr|" -i mkspecs/unsupported/win32-g++-cross/qmake.conf |
||||
echo '#!/bin/bash' > $HOME/ar |
||||
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar |
||||
echo 'i586-mingw32msvc-ar "$@"' >> $HOME/ar |
||||
echo "$HOST-ar \"\$@\"" >> $HOME/ar |
||||
chmod +x $HOME/ar |
||||
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 |
||||
export FAKETIME=$REFERENCE_DATETIME |
||||
export TZ=UTC |
||||
./configure -prefix $INSTDIR -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs -no-feature-style-plastique -no-feature-style-cleanlooks -no-feature-style-motif -no-feature-style-cde -no-feature-style-windowsce -no-feature-style-windowsmobile -no-feature-style-s60 |
||||
# Compile static libraries, and use statically linked openssl (-openssl-linked): |
||||
OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTDIR -bindir $INSTDIR/host/bin -I $DEPSDIR/include -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs -no-feature-style-plastique -no-feature-style-cleanlooks -no-feature-style-motif -no-feature-style-cde -no-feature-style-windowsce -no-feature-style-windowsmobile -no-feature-style-s60 -openssl-linked |
||||
find . -name *.prl | xargs -l sed 's|/\.||' -i |
||||
find . -name *.prl | xargs -l sed 's|/$||' -i |
||||
make $MAKEOPTS install |
||||
cp -a bin $SRCDIR/ |
||||
cd $INSTDIR |
||||
find . -name *.prl | xargs -l sed 's|/$||' -i |
||||
#sed 's|QMAKE_PRL_LIBS.*|QMAKE_PRL_LIBS = -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtNetwork -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32|' -i imports/Qt/labs/particles/qmlparticlesplugin.prl |
||||
|
||||
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date |
||||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 |
||||
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r1.zip * |
||||
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r4.zip * |
||||
|
Loading…
Reference in new issue