12 reference_datetime: "2013-04-15 00:00:00"
15 - "protobuf-2.5.0.tar.bz2"
23 echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 protobuf-2.5.0.tar.bz2" | sha256sum -c
25 for BITS in 32 64; do # for architectures
27 INSTALLPREFIX=$HOME/staging${BITS}
28 BUILDDIR=$HOME/build${BITS}
29 if [ "$BITS" == "32" ]; then
32 HOST=x86_64-w64-mingw32
35 mkdir -p $INSTALLPREFIX $BUILDDIR
38 tar xjf $INDIR/protobuf-2.5.0.tar.bz2
40 # First: build a native (linux) protoc
41 ./configure --enable-shared=no --disable-dependency-tracking --without-zlib CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
43 mkdir -p $INSTALLPREFIX/host/bin
44 cp src/protoc $INSTALLPREFIX/host/bin
45 # Now recompile with the mingw cross-compiler:
47 ./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --without-zlib --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
48 export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
49 export FAKETIME=$REFERENCE_DATETIME
52 # post-process all generated libraries to be deterministic
53 # extract them to a temporary directory then re-build them deterministically
54 for LIB in $(find $INSTALLPREFIX -name \*.a); do
55 rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
56 $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
58 $HOST-ar crsD $LIB $(cat /tmp/list.txt)
62 find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip