Qt import: Sync with the steps in deploy/build-helper.

http://code.google.com/p/phantomjs/issues/detail?id=226
1.5
Ariya Hidayat 2012-03-06 18:02:07 -08:00
parent df93134703
commit 36cd85a475
2 changed files with 154 additions and 104 deletions

View File

@ -2,72 +2,97 @@
COMPILE_JOBS=4
export MAKEFLAGS=-j$COMPILE_JOBS
QT_CFG=''
QT_CFG+=' -opensource' # Use the open-source license
QT_CFG+=' -confirm-license' # Silently acknowledge the license confirmation
QT_CFG+=' -v' # Makes it easier to see what header dependencies are missing
CFG=''
# Static build. FIXME: How about Linux?
QT_CFG+=' -static'
CFG+=' -opensource' # Use the open-source license
CFG+=' -confirm-license' # Silently acknowledge the license confirmation
QT_CFG+=' -release' # Build only for release (no debugging support)
QT_CFG+=' -fast' # Accelerate Makefiles generation
QT_CFG+=' -nomake demos' # Don't build with the demos
QT_CFG+=' -nomake docs' # Don't generate the documentatio
QT_CFG+=' -nomake examples' # Don't build any examples
QT_CFG+=' -nomake translations' # Ignore the translations
QT_CFG+=' -nomake tools' # Don't built the tools
CFG+=' -release' # Build only for release (no debugging support)
CFG+=' -static' # Compile for static libraries
CFG+=' -fast' # Accelerate Makefiles generation
CFG+=' -nomake demos' # Don't build with the demos
CFG+=' -nomake docs' # Don't generate the documentatio
CFG+=' -nomake examples' # Don't build any examples
CFG+=' -nomake translations' # Ignore the translations
CFG+=' -nomake tools' # Don't built the tools
QT_CFG+=' -no-exceptions' # Don't use C++ exception
QT_CFG+=' -no-stl' # No need for STL compatibility
CFG+=' -no-exceptions' # Don't use C++ exception
CFG+=' -no-stl' # No need for STL compatibility
# Irrelevant Qt features (keep compatibility)
CFG+=' -no-avx'
CFG+=' -no-libmng'
CFG+=' -no-libtiff'
CFG+=' -no-neon'
# Irrelevant Qt features
QT_CFG+=' -no-libmng'
QT_CFG+=' -no-libtiff'
# Unnecessary Qt modules
CFG+=' -no-declarative'
CFG+=' -no-multimedia'
CFG+=' -no-opengl'
CFG+=' -no-openvg'
CFG+=' -no-phonon'
CFG+=' -no-qt3support'
CFG+=' -no-script'
CFG+=' -no-scripttools'
CFG+=' -no-svg'
CFG+=' -no-xmlpatterns'
QT_CFG+=' -no-declarative'
QT_CFG+=' -no-multimedia'
QT_CFG+=' -no-opengl'
QT_CFG+=' -no-openvg'
QT_CFG+=' -no-phonon'
QT_CFG+=' -no-qt3support'
QT_CFG+=' -no-script'
QT_CFG+=' -no-scripttools'
QT_CFG+=' -no-svg'
QT_CFG+=' -no-xmlpatterns'
# Graphics
CFG+=' -graphicssystem raster' # default is the software rasterizer
# Mac
CFG+=' -cocoa' # Cocoa only, ignore Carbon
CFG+=' -no-cups' # Disable CUPS support
CFG+=' -no-dwarf2'
# Sets the default graphics system to the raster engine
QT_CFG+=' -graphicssystem raster'
# Unix
CFG+=' -no-dbus' # Disable D-Bus feature
CFG+=' -no-glib' # No need for Glib integration
CFG+=' -no-gstreamer' # Turn off GStreamer support
CFG+=' -no-gtkstyle' # Disable theming integration with Gtk+
CFG+=' -no-sm'
CFG+=' -no-xinerama'
CFG+=' -no-xkb'
QT_CFG+=' -no-dbus' # Disable D-Bus feature
QT_CFG+=' -no-glib' # No need for Glib integration
QT_CFG+=' -no-gstreamer' # Turn off GStreamer support
QT_CFG+=' -no-gtkstyle' # Disable theming integration with Gtk+
QT_CFG+=' -no-cups' # Disable CUPs support
QT_CFG+=' -no-sm'
QT_CFG+=' -no-xinerama'
QT_CFG+=' -no-xkb'
# Use the bundled libraries, vs system-installed
CFG+=' -qt-libjpeg'
CFG+=' -qt-libpng'
CFG+=' -qt-zlib'
QT_CFG+=' -qt-libjpeg'
QT_CFG+=' -qt-libpng'
# Explicitly compile with SSL support, so build will fail if headers are missing
QT_CFG+=' -openssl'
# Useless styles
CFG+=' -D QT_NO_STYLESHEET'
CFG+=' -D QT_NO_STYLE_CDE'
CFG+=' -D QT_NO_STYLE_CLEANLOOKS'
CFG+=' -D QT_NO_STYLE_MOTIF'
QT_CFG+=' -D QT_NO_STYLESHEET'
QT_CFG+=' -D QT_NO_STYLE_CDE'
QT_CFG+=' -D QT_NO_STYLE_CLEANLOOKS'
QT_CFG+=' -D QT_NO_STYLE_MOTIF'
QT_CFG+=' -D QT_NO_STYLE_PLASTIQUE'
./configure -prefix $PWD $CFG
until [ -z "$1" ]; do
case $1 in
"--qt-config")
shift
QT_CFG+=" $1"
shift;;
"--jobs")
shift
COMPILE_JOBS=$1
shift;;
"--help")
echo "Usage: $0 [--qt-config CONFIG] [--jobs NUM]"
echo
echo " --qt-config CONFIG Specify extra config options to be used when configuring Qt"
echo " --jobs NUM How many parallel compile jobs to use. Defaults to 4."
echo
exit 0
;;
*)
echo "Unrecognised option: $1"
exit 1;;
esac
done
# For parallelizing the bootstrapping process, e.g. qmake and friends.
export MAKEFLAGS=-j$COMPILE_JOBS
./configure -prefix $PWD $QT_CFG
make -j$COMPILE_JOBS
# Extra step to ensure the static libraries are found

View File

@ -2,72 +2,97 @@
COMPILE_JOBS=4
export MAKEFLAGS=-j$COMPILE_JOBS
QT_CFG=''
QT_CFG+=' -opensource' # Use the open-source license
QT_CFG+=' -confirm-license' # Silently acknowledge the license confirmation
QT_CFG+=' -v' # Makes it easier to see what header dependencies are missing
CFG=''
# Static build. FIXME: How about Linux?
QT_CFG+=' -static'
CFG+=' -opensource' # Use the open-source license
CFG+=' -confirm-license' # Silently acknowledge the license confirmation
QT_CFG+=' -release' # Build only for release (no debugging support)
QT_CFG+=' -fast' # Accelerate Makefiles generation
QT_CFG+=' -nomake demos' # Don't build with the demos
QT_CFG+=' -nomake docs' # Don't generate the documentatio
QT_CFG+=' -nomake examples' # Don't build any examples
QT_CFG+=' -nomake translations' # Ignore the translations
QT_CFG+=' -nomake tools' # Don't built the tools
CFG+=' -release' # Build only for release (no debugging support)
CFG+=' -static' # Compile for static libraries
CFG+=' -fast' # Accelerate Makefiles generation
CFG+=' -nomake demos' # Don't build with the demos
CFG+=' -nomake docs' # Don't generate the documentatio
CFG+=' -nomake examples' # Don't build any examples
CFG+=' -nomake translations' # Ignore the translations
CFG+=' -nomake tools' # Don't built the tools
QT_CFG+=' -no-exceptions' # Don't use C++ exception
QT_CFG+=' -no-stl' # No need for STL compatibility
CFG+=' -no-exceptions' # Don't use C++ exception
CFG+=' -no-stl' # No need for STL compatibility
# Irrelevant Qt features (keep compatibility)
CFG+=' -no-avx'
CFG+=' -no-libmng'
CFG+=' -no-libtiff'
CFG+=' -no-neon'
# Irrelevant Qt features
QT_CFG+=' -no-libmng'
QT_CFG+=' -no-libtiff'
# Unnecessary Qt modules
CFG+=' -no-declarative'
CFG+=' -no-multimedia'
CFG+=' -no-opengl'
CFG+=' -no-openvg'
CFG+=' -no-phonon'
CFG+=' -no-qt3support'
CFG+=' -no-script'
CFG+=' -no-scripttools'
CFG+=' -no-svg'
CFG+=' -no-xmlpatterns'
QT_CFG+=' -no-declarative'
QT_CFG+=' -no-multimedia'
QT_CFG+=' -no-opengl'
QT_CFG+=' -no-openvg'
QT_CFG+=' -no-phonon'
QT_CFG+=' -no-qt3support'
QT_CFG+=' -no-script'
QT_CFG+=' -no-scripttools'
QT_CFG+=' -no-svg'
QT_CFG+=' -no-xmlpatterns'
# Graphics
CFG+=' -graphicssystem raster' # default is the software rasterizer
# Mac
CFG+=' -cocoa' # Cocoa only, ignore Carbon
CFG+=' -no-cups' # Disable CUPS support
CFG+=' -no-dwarf2'
# Sets the default graphics system to the raster engine
QT_CFG+=' -graphicssystem raster'
# Unix
CFG+=' -no-dbus' # Disable D-Bus feature
CFG+=' -no-glib' # No need for Glib integration
CFG+=' -no-gstreamer' # Turn off GStreamer support
CFG+=' -no-gtkstyle' # Disable theming integration with Gtk+
CFG+=' -no-sm'
CFG+=' -no-xinerama'
CFG+=' -no-xkb'
QT_CFG+=' -no-dbus' # Disable D-Bus feature
QT_CFG+=' -no-glib' # No need for Glib integration
QT_CFG+=' -no-gstreamer' # Turn off GStreamer support
QT_CFG+=' -no-gtkstyle' # Disable theming integration with Gtk+
QT_CFG+=' -no-cups' # Disable CUPs support
QT_CFG+=' -no-sm'
QT_CFG+=' -no-xinerama'
QT_CFG+=' -no-xkb'
# Use the bundled libraries, vs system-installed
CFG+=' -qt-libjpeg'
CFG+=' -qt-libpng'
CFG+=' -qt-zlib'
QT_CFG+=' -qt-libjpeg'
QT_CFG+=' -qt-libpng'
# Explicitly compile with SSL support, so build will fail if headers are missing
QT_CFG+=' -openssl'
# Useless styles
CFG+=' -D QT_NO_STYLESHEET'
CFG+=' -D QT_NO_STYLE_CDE'
CFG+=' -D QT_NO_STYLE_CLEANLOOKS'
CFG+=' -D QT_NO_STYLE_MOTIF'
QT_CFG+=' -D QT_NO_STYLESHEET'
QT_CFG+=' -D QT_NO_STYLE_CDE'
QT_CFG+=' -D QT_NO_STYLE_CLEANLOOKS'
QT_CFG+=' -D QT_NO_STYLE_MOTIF'
QT_CFG+=' -D QT_NO_STYLE_PLASTIQUE'
./configure -prefix $PWD $CFG
until [ -z "$1" ]; do
case $1 in
"--qt-config")
shift
QT_CFG+=" $1"
shift;;
"--jobs")
shift
COMPILE_JOBS=$1
shift;;
"--help")
echo "Usage: $0 [--qt-config CONFIG] [--jobs NUM]"
echo
echo " --qt-config CONFIG Specify extra config options to be used when configuring Qt"
echo " --jobs NUM How many parallel compile jobs to use. Defaults to 4."
echo
exit 0
;;
*)
echo "Unrecognised option: $1"
exit 1;;
esac
done
# For parallelizing the bootstrapping process, e.g. qmake and friends.
export MAKEFLAGS=-j$COMPILE_JOBS
./configure -prefix $PWD $QT_CFG
make -j$COMPILE_JOBS
# Extra step to ensure the static libraries are found