|
@@ -35,6 +35,7 @@ openssl-0.9.8h-1-bin.zip "
|
|
#freetype-2.3.5-1-bin.zip \
|
|
#freetype-2.3.5-1-bin.zip \
|
|
#freetype-2.3.5-1-lib.zip "
|
|
#freetype-2.3.5-1-lib.zip "
|
|
QTBRANCH=
|
|
QTBRANCH=
|
|
|
|
+J="$((1 + $(cat /proc/cpuinfo | grep -c processor)))"
|
|
|
|
|
|
function usage() {
|
|
function usage() {
|
|
echo "Usage: $0 [OPTIONS] target"
|
|
echo "Usage: $0 [OPTIONS] target"
|
|
@@ -161,14 +162,14 @@ if ! cmp conf conf_new; then
|
|
do_configure
|
|
do_configure
|
|
fi
|
|
fi
|
|
|
|
|
|
-if ! make -j3 -q; then
|
|
|
|
|
|
+if ! make -j${J} -q; then
|
|
echo "Building QT"
|
|
echo "Building QT"
|
|
- (make -j3 && make install) || (make distclean; do_configure && make -j3 && make install) || exit 1
|
|
|
|
|
|
+ (make -j${J} && make install) || (make distclean; do_configure && make -j${J} && make install) || exit 1
|
|
fi
|
|
fi
|
|
cd ../wkhtmltopdf
|
|
cd ../wkhtmltopdf
|
|
|
|
|
|
echo "Building wkhtmltopdfe"
|
|
echo "Building wkhtmltopdfe"
|
|
-(make distclean; ../qt/bin/qmake && make -j3) || exit 1
|
|
|
|
|
|
+(make distclean; ../qt/bin/qmake && make -j${J}) || exit 1
|
|
strip ./bin/wkhtmltopdf || exit 1
|
|
strip ./bin/wkhtmltopdf || exit 1
|
|
strip ./bin/wkhtmltoimage || exit 1
|
|
strip ./bin/wkhtmltoimage || exit 1
|
|
EOF
|
|
EOF
|
|
@@ -189,7 +190,7 @@ function build_linux_local() {
|
|
function setup_chroot() {
|
|
function setup_chroot() {
|
|
if [ ! -f linux-$2/strapped ]; then
|
|
if [ ! -f linux-$2/strapped ]; then
|
|
sudo rm -rf linux-$2
|
|
sudo rm -rf linux-$2
|
|
- (sudo debootstrap --arch=$2 --variant=buildd $1 ./linux-$2 http://ftp.us.debian.org/debian && sudo touch linux-$2/strapped) || exit 1
|
|
|
|
|
|
+ (sudo debootstrap --arch=$2 --variant=buildd $1 ./linux-$2 http://archive.debian.org/debian/ && sudo touch linux-$2/strapped) || exit 1
|
|
fi
|
|
fi
|
|
if [ ! -d linux-$2/build ]; then
|
|
if [ ! -d linux-$2/build ]; then
|
|
sudo mkdir -p linux-$2/build || exit 1
|
|
sudo mkdir -p linux-$2/build || exit 1
|
|
@@ -197,7 +198,7 @@ function setup_chroot() {
|
|
fi
|
|
fi
|
|
|
|
|
|
if [ ! -f linux-$2/installed ]; then
|
|
if [ ! -f linux-$2/installed ]; then
|
|
- echo -e "deb http://ftp.debian.org $1 main non-free contrib\ndeb-src http://ftp.debian.org $1 main non-free contrib" | sudo tee linux-$2/etc/apt/sources.list || exit 1
|
|
|
|
|
|
+ echo -e "deb http://archive.debian.org/debian/ $1 main non-free contrib\ndeb-src http://archive.debian.org/debian/ $1 main non-free contrib" | sudo tee linux-$2/etc/apt/sources.list || exit 1
|
|
sudo chroot linux-$2 apt-get -y update || exit 1
|
|
sudo chroot linux-$2 apt-get -y update || exit 1
|
|
sudo chroot linux-$2 apt-get -y build-dep libqt4-core && sudo touch linux-$2/installed || exit 1
|
|
sudo chroot linux-$2 apt-get -y build-dep libqt4-core && sudo touch linux-$2/installed || exit 1
|
|
fi
|
|
fi
|
|
@@ -262,8 +263,8 @@ EOF
|
|
QTDIR=. bin/syncqt || exit 1
|
|
QTDIR=. bin/syncqt || exit 1
|
|
(yes | wine configure.exe -I "C:\qts\include" -I "C:\mingw32\include\freetype2" `cat conf_new` -prefix "C:\qt" && cp conf_new conf) || exit 1
|
|
(yes | wine configure.exe -I "C:\qts\include" -I "C:\mingw32\include\freetype2" `cat conf_new` -prefix "C:\qt" && cp conf_new conf) || exit 1
|
|
fi
|
|
fi
|
|
- if ! wine mingw32-make -j3 -q; then
|
|
|
|
- wine mingw32-make -j3 || exit 1
|
|
|
|
|
|
+ if ! wine mingw32-make -j${J} -q; then
|
|
|
|
+ wine mingw32-make -j${J} || exit 1
|
|
wine mingw32-make install || exit 1
|
|
wine mingw32-make install || exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
@@ -271,7 +272,7 @@ EOF
|
|
wine mingw32-make dist-clean
|
|
wine mingw32-make dist-clean
|
|
wine ../qt/bin/qmake.exe wkhtmltopdf.pro -o Makefile -spec win32-g++ || exit 1
|
|
wine ../qt/bin/qmake.exe wkhtmltopdf.pro -o Makefile -spec win32-g++ || exit 1
|
|
wine mingw32-make clean || exit 1
|
|
wine mingw32-make clean || exit 1
|
|
- wine mingw32-make -j3 || exit 1
|
|
|
|
|
|
+ wine mingw32-make -j${J} || exit 1
|
|
wine strip.exe bin/wkhtmltopdf.exe || exit 1
|
|
wine strip.exe bin/wkhtmltopdf.exe || exit 1
|
|
wine strip.exe bin/wkhtmltoimage.exe || exit 1
|
|
wine strip.exe bin/wkhtmltoimage.exe || exit 1
|
|
rm -rf ${BASE}/wkhtmltopdf.exe
|
|
rm -rf ${BASE}/wkhtmltopdf.exe
|