2013-01-05 15:15:15 +04:00
|
|
|
#!/usr/bin/env bash
|
2012-03-07 07:01:24 +04:00
|
|
|
|
2012-06-07 12:38:48 +04:00
|
|
|
set -e
|
|
|
|
|
2012-03-07 07:01:24 +04:00
|
|
|
QT_CFG=''
|
|
|
|
|
2012-11-10 12:09:25 +04:00
|
|
|
BUILD_CONFIRM=0
|
2012-04-16 05:21:02 +04:00
|
|
|
COMPILE_JOBS=1
|
2012-06-17 01:21:28 +04:00
|
|
|
MAKEFLAGS_JOBS=''
|
|
|
|
|
|
|
|
if [[ "$MAKEFLAGS" != "" ]]; then
|
|
|
|
MAKEFLAGS_JOBS=$(echo $MAKEFLAGS | egrep -o '\-j[0-9]+' | egrep -o '[0-9]+')
|
|
|
|
fi
|
2012-04-16 05:21:02 +04:00
|
|
|
|
2012-04-18 16:16:27 +04:00
|
|
|
if [[ "$MAKEFLAGS_JOBS" != "" ]]; then
|
|
|
|
# user defined number of jobs in MAKEFLAGS, re-use that number
|
|
|
|
COMPILE_JOBS=$MAKEFLAGS_JOBS
|
|
|
|
elif [[ $OSTYPE = darwin* ]]; then
|
2012-04-16 05:21:02 +04:00
|
|
|
# We only support modern Mac machines, they are at least using
|
|
|
|
# hyperthreaded dual-core CPU.
|
|
|
|
COMPILE_JOBS=4
|
2014-07-24 21:25:46 +04:00
|
|
|
elif [[ $OSTYPE == freebsd* ]]; then
|
2013-01-05 15:37:20 +04:00
|
|
|
COMPILE_JOBS=`sysctl -n hw.ncpu`
|
2012-04-16 05:21:02 +04:00
|
|
|
else
|
|
|
|
CPU_CORES=`grep -c ^processor /proc/cpuinfo`
|
|
|
|
if [[ "$CPU_CORES" -gt 1 ]]; then
|
|
|
|
COMPILE_JOBS=$CPU_CORES
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-01-05 15:37:20 +04:00
|
|
|
if [[ "$COMPILE_JOBS" -gt 8 ]]; then
|
|
|
|
# Safety net.
|
|
|
|
COMPILE_JOBS=8
|
|
|
|
fi
|
|
|
|
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
SILENT=
|
|
|
|
QT_CFG=
|
2014-08-18 19:28:25 +04:00
|
|
|
QTCORE=bundled
|
2014-08-14 04:24:51 +04:00
|
|
|
QTWEBKIT=bundled
|
2014-01-07 06:45:59 +04:00
|
|
|
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
until [[ -z "$1" ]]; do
|
2012-03-07 07:01:24 +04:00
|
|
|
case $1 in
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--qt-config)
|
2012-03-07 07:01:24 +04:00
|
|
|
shift
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
QT_CFG+=" $1"
|
2012-03-07 07:01:24 +04:00
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--qmake-args)
|
2012-06-18 23:15:15 +04:00
|
|
|
shift
|
|
|
|
QMAKE_ARGS=$1
|
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--jobs)
|
2012-03-07 07:01:24 +04:00
|
|
|
shift
|
|
|
|
COMPILE_JOBS=$1
|
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--confirm)
|
2012-11-10 12:09:25 +04:00
|
|
|
BUILD_CONFIRM=1
|
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--silent)
|
2014-08-14 16:35:45 +04:00
|
|
|
SILENT=silent
|
2014-01-07 06:45:59 +04:00
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--qt=system)
|
2014-08-18 19:28:25 +04:00
|
|
|
QTCORE=system
|
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
(--qtwebkit=system)
|
2014-08-18 19:28:25 +04:00
|
|
|
QTCORE=system
|
2014-08-14 04:24:51 +04:00
|
|
|
QTWEBKIT=system
|
|
|
|
shift;;
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
|
|
|
|
(--*=system | --*=bundled)
|
|
|
|
QT_CFG+=" $1"
|
|
|
|
shift;;
|
|
|
|
|
2012-03-07 07:01:24 +04:00
|
|
|
"--help")
|
2014-08-18 22:17:22 +04:00
|
|
|
cat <<EOF
|
|
|
|
Usage: $0 [--qt-config CONFIG] [--jobs NUM]
|
|
|
|
|
|
|
|
--confirm Do not prompt for confirmation of this
|
|
|
|
very slow build process.
|
|
|
|
--silent Produce less verbose output.
|
|
|
|
--jobs NUM How many parallel compile jobs to use.
|
|
|
|
Defaults to the number of CPU cores you have,
|
|
|
|
with a maximum of 8.
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
|
|
|
|
--qtdeps=system|bundled Use system-provided | bundled libraries for
|
|
|
|
all of Qt's dependencies. EXPERIMENTAL.
|
|
|
|
--LIBRARY=system|bundled Use system-provided | bundled LIBRARY.
|
|
|
|
See src/qt/preconfig.sh for all possible
|
|
|
|
LIBRARY values. EXPERIMENTAL.
|
|
|
|
--qt-config OPTION Specify extra config options to be used when
|
2014-08-18 22:17:22 +04:00
|
|
|
configuring Qt.
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
|
|
|
|
--qt=system Use system-provided Qt core libraries.
|
2014-08-18 22:17:22 +04:00
|
|
|
EXPERIMENTAL, build may not succeed.
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
Mutually exclusive with --qt-config and all
|
|
|
|
--LIBRARY= / --qtdeps= options.
|
2014-08-18 22:17:22 +04:00
|
|
|
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
--qtwebkit=system Use system-provided QtWebkit.
|
|
|
|
EXPERIMENTAL, build may not succeed.
|
|
|
|
Implies --system-qt.
|
|
|
|
Mutually exclusive with --qt-config and all
|
|
|
|
--LIBRARY= / --qtdeps= options.
|
2014-08-18 22:17:22 +04:00
|
|
|
EOF
|
2012-03-07 07:01:24 +04:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
*)
|
2014-08-18 19:28:25 +04:00
|
|
|
echo "Unrecognised option: $1" >&2
|
2012-03-07 07:01:24 +04:00
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2014-08-18 19:28:25 +04:00
|
|
|
if [[ "$QTCORE" = system ]] && [[ -n "$QT_CFG" ]]; then
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
echo "$0: --qt=system prevents fine-tuning the Qt configuration" >&2
|
2014-08-14 04:24:51 +04:00
|
|
|
exit 1
|
|
|
|
fi
|
2012-11-10 12:09:25 +04:00
|
|
|
|
|
|
|
if [[ "$BUILD_CONFIRM" -eq 0 ]]; then
|
|
|
|
cat << EOF
|
|
|
|
----------------------------------------
|
|
|
|
WARNING
|
|
|
|
----------------------------------------
|
|
|
|
|
2014-08-18 22:17:22 +04:00
|
|
|
Building PhantomJS from source takes a very long time, anywhere from 30
|
|
|
|
minutes to several hours (depending on the machine configuration).
|
|
|
|
We recommend you use the premade binary packages on supported operating
|
|
|
|
systems.
|
2012-11-10 12:09:25 +04:00
|
|
|
|
|
|
|
For details, please go the the web site: http://phantomjs.org/download.html.
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
echo "Do you want to continue (y/n)?"
|
|
|
|
read continue
|
|
|
|
if [[ "$continue" != "y" ]]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2014-01-07 06:45:59 +04:00
|
|
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
|
|
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|
|
|
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
|
|
|
|
2014-08-14 16:35:45 +04:00
|
|
|
MAKE_S=""
|
|
|
|
if [[ "$SILENT" == "silent" ]]; then
|
|
|
|
MAKE_S="-s"
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
QT_CFG+=" --silent"
|
2014-08-14 16:35:45 +04:00
|
|
|
fi
|
|
|
|
|
2014-01-07 06:45:59 +04:00
|
|
|
echo "System architecture... ($UNAME_SYSTEM $UNAME_RELEASE $UNAME_MACHINE)"
|
|
|
|
echo
|
|
|
|
|
2014-08-18 19:28:25 +04:00
|
|
|
if [[ "$QTCORE" == "bundled" ]]; then
|
2014-08-14 04:24:51 +04:00
|
|
|
export QMAKE=$PWD/src/qt/qtbase/bin/qmake
|
2014-08-18 22:10:35 +04:00
|
|
|
( cd src/qt && ./preconfig.sh $QTDEPLIBS $QT_CFG )
|
2014-08-14 16:35:45 +04:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Building Qt..."
|
|
|
|
echo
|
|
|
|
( cd src/qt/qtbase && make -j$COMPILE_JOBS $MAKE_S )
|
2014-08-18 19:28:25 +04:00
|
|
|
else
|
|
|
|
export QMAKE=qmake
|
|
|
|
# some Linux distros (e.g. Debian) allow you to parallel-install
|
|
|
|
# Qt4 and Qt5, using this environment variable to declare which
|
|
|
|
# one you want
|
|
|
|
export QT_SELECT=qt5
|
|
|
|
fi
|
2014-08-14 16:35:45 +04:00
|
|
|
|
2014-08-18 19:28:25 +04:00
|
|
|
if [[ "$QTWEBKIT" == "bundled" ]]; then
|
2014-08-14 16:35:45 +04:00
|
|
|
echo
|
|
|
|
echo "Building QtWebkit..."
|
|
|
|
echo
|
More adjustments to system library usage on Unix (incl. Darwin) (#12518).
The affected libraries are fontconfig, freetype, harfbuzz, libpng, libjpeg,
sqlite, pcre, and zlib.
* On Darwin, by default, fontconfig is disabled and all of the other
libraries are bundled.
* On non-Darwin, by default, fontconfig is enabled and system-provided
freetype, libpng, libjpeg, and zlib are used. Harfbuzz, pcre, and sqlite
continue to be bundled.
* Individual libraries from the above list may now be enabled or disabled
on the build.sh command line with e.g. --freetype=system or
--freetype=bundled.
* The existing --system-qtdeps, --system-qt, --system-qtwebkit options
have been renamed --qtdeps=system, --qt=system, --qtwebkit=system
respectively. New option --qtdeps=bundled forces all available
bundled libraries to be used.
Also:
* Slight adjustments to organization of preconfig.sh.
* Can now disable PulseAudio and ALSA.
* Directly link OpenSSL instead of loading it at runtime.
* Clarify the pkg-config situation (it must be enabled if and only if
sqlite comes from the system).
2014-08-29 01:04:52 +04:00
|
|
|
if grep -qEe '-qt-sql-sqlite\>' src/qt/qtbase/config.status; then
|
2014-08-18 22:10:35 +04:00
|
|
|
export SQLITE3SRCDIR=$PWD/src/qt/qtbase/src/3rdparty/sqlite/
|
|
|
|
fi
|
2014-08-29 01:12:08 +04:00
|
|
|
|
|
|
|
# By default, suppress video and audio-related features.
|
|
|
|
# They can be reactivated with e.g.
|
|
|
|
# --qmake-args WEBKIT_CONFIG+='use_gstreamer video'
|
|
|
|
WEBKIT_DISABLE=
|
|
|
|
WEBKIT_DISABLE+=' use_glib'
|
|
|
|
WEBKIT_DISABLE+=' use_gstreamer'
|
|
|
|
WEBKIT_DISABLE+=' use_gstreamer010'
|
|
|
|
WEBKIT_DISABLE+=' use_native_fullscreen_video'
|
|
|
|
WEBKIT_DISABLE+=' legacy_web_audio'
|
|
|
|
WEBKIT_DISABLE+=' web_audio'
|
|
|
|
WEBKIT_DISABLE+=' video'
|
|
|
|
WEBKIT_DISABLE+=' gamepad'
|
|
|
|
|
2014-08-14 04:24:51 +04:00
|
|
|
( cd src/qt/qtwebkit &&
|
2014-08-29 01:12:08 +04:00
|
|
|
$QMAKE "WEBKIT_CONFIG -= $WEBKIT_DISABLE" $QMAKE_ARGS &&
|
2014-08-14 16:35:45 +04:00
|
|
|
make -j$COMPILE_JOBS $MAKE_S )
|
2014-08-14 04:24:51 +04:00
|
|
|
fi
|
2014-01-07 06:45:59 +04:00
|
|
|
|
2014-08-14 16:35:45 +04:00
|
|
|
echo
|
|
|
|
echo "Building main PhantomJS application..."
|
2014-01-07 06:45:59 +04:00
|
|
|
echo
|
2014-08-14 04:24:51 +04:00
|
|
|
$QMAKE $QMAKE_ARGS
|
|
|
|
make -j$COMPILE_JOBS
|