@ -1,11 +1,12 @@
---
---
name : "qt"
name : "qt"
suites:
suites:
- "lucid "
- "precise "
architectures:
architectures:
- "i386 "
- "amd64 "
packages :
packages :
- "mingw32"
- "mingw-w64"
- "g++-mingw-w64"
- "zip"
- "zip"
- "unzip"
- "unzip"
- "faketime"
- "faketime"
@ -14,34 +15,37 @@ reference_datetime: "2011-01-30 00:00:00"
remotes : [ ]
remotes : [ ]
files:
files:
- "qt-everywhere-opensource-src-4.8.3.tar.gz"
- "qt-everywhere-opensource-src-4.8.3.tar.gz"
- "bitcoin-deps-0.0.7 .zip"
- "bitcoin-deps-win32-gitian-r8 .zip"
script : |
script : |
#
HOST=i686-w64-mingw32
INSTDIR="$HOME/qt/"
INSTDIR="$HOME/qt/"
#
mkdir $INSTDIR
mkdir $INSTDIR
mkdir -p $INSTDIR/host/bin
mkdir -p $INSTDIR/host/bin
#
#
# Need mingw-compiled openssl from bitcoin-deps:
# Need mingw-compiled openssl from bitcoin-deps:
unzip bitcoin-deps-0.0.7 .zip
unzip bitcoin-deps-win32-gitian-r8 .zip
DEPSDIR=`pwd`
DEPSDIR=`pwd`
#
#
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz
cd qt-everywhere-opensource-src-4.8.3
cd qt-everywhere-opensource-src-4.8.3
sed 's/$TODAY/2011-01-30/' -i configure
sed 's/$TODAY/2011-01-30/' -i configure
sed 's/i686-pc-mingw32-/i586-mingw32msvc -/' -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/i586-mingw32msvc /include/ -frandom-seed=qtbuild|' -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_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 '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_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= i586-mingw32msvc -rcc/QMAKE_RCC\t\t= rcc/' -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= i586-mingw32msvc -uic/QMAKE_UIC\t\t= uic/' -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
# 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...
# 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.
# which somehow cannot be combined with other flags.
# use faketime only for ar, as it confuses make/qmake into hanging sometimes
# 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 '#!/bin/bash' > $HOME/ar
echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $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
chmod +x $HOME/ar
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export FAKETIME=$REFERENCE_DATETIME
@ -56,4 +60,4 @@ script: |
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
# 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
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r3 .zip *
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r4 .zip *