qt5 + qt5-static: tidy up PKGBUILD files
This commit is contained in:
@@ -3,12 +3,16 @@
|
||||
|
||||
_realname=qt5-static
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
#_configure=./configure.bat
|
||||
_configure=./configure
|
||||
# When using the configure bash script, MSYS2 make is
|
||||
# probably a better choice as otherwise the Makefiles
|
||||
# can have MSYS2 paths in them. We try to handle this
|
||||
# but it is ad-hoc at best. '${_make}' docs fails ATM
|
||||
# but it is ad-hoc at best.
|
||||
_make=make
|
||||
#_make=${MINGW_PREFIX}/bin/mingw32-make
|
||||
_opengl=angle
|
||||
#_opengl=desktop
|
||||
pkgname="${_mingw_suff}-${_realname}"
|
||||
_ver_base=5.3.0-beta
|
||||
pkgver=${_ver_base//-/}
|
||||
@@ -52,6 +56,7 @@ source=("http://download.qt-project.org/development_releases/qt/${pkgver%.*}/${_
|
||||
qt-5.2.1-win32-g-Enable-static-builds.patch
|
||||
qt-5.2.1-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch
|
||||
qt-5.2.1-qmlimportscanner-Ensure-the-correct-variant-is-run.patch
|
||||
qt5-add-angle-support.patch
|
||||
qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch
|
||||
qt-5.3.0-beta-0001-fix-debug_and_release-builds.patch
|
||||
qt-5.3.0-beta-0001-qdoc-increase-stack-size-for-win32-g-too.patch
|
||||
@@ -66,12 +71,13 @@ md5sums=('4f4a8302c52ef80bbb62bf764e682e47'
|
||||
'0f2e3a2f790b07442f0964f4f2f96596'
|
||||
'b0706aaa70fe6cb9a4b77676b808e1b0'
|
||||
'd7d745b5915cff6a7e7f4cc4e9760de0'
|
||||
'e2d98dd1a5f95a3b84f5cd7cb44130bb'
|
||||
'6384ff636647fce0bc153e42d4aab769'
|
||||
'734ba2c458cb46f1c812413d3db404df'
|
||||
'6914a82ad728ff0da3c959f53367384c'
|
||||
'1259c9487744757c81a9d4c507348d9e')
|
||||
'655025d19501de43956a2625db54d2ca')
|
||||
|
||||
translate_to_native() {
|
||||
translate_for_make() {
|
||||
if [ "${_make}" = "make" ]; then
|
||||
echo "${1}"
|
||||
else
|
||||
@@ -91,6 +97,10 @@ prepare() {
|
||||
# My qt-5.2.1 win32-g++ static patches are against qtbase's dev branch.
|
||||
pushd qtbase
|
||||
patch -p1 -i ${srcdir}/qt-5.2.1-win32-g-Enable-static-builds.patch
|
||||
# Despite qt-5.2.1-use-.dll.a-as-MINGW_IMPORT_LIB-extension.patch the following .a (i.e. non-import)
|
||||
# static libraries end up being made:
|
||||
# ActiveQt (which is always built statically), libQt5OpenGLExtensions{d}.a, libQt5PlatformSupport{d}.a
|
||||
# libQt5QmlDevTools.a, libQt5UiTools{d}.a libqtmain{d}.a
|
||||
patch -p1 -i ${srcdir}/qt-5.2.1-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.2.1-qmlimportscanner-Ensure-the-correct-variant-is-run.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-beta-0001-fix-debug_and_release-builds.patch
|
||||
@@ -98,6 +108,9 @@ prepare() {
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-beta-0001-fix-install-qt-harfbuzz.patch
|
||||
popd
|
||||
|
||||
if [ "${_opengl}" = "angle" ]; then
|
||||
patch -p1 -i ${srcdir}/qt5-add-angle-support.patch
|
||||
fi
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch
|
||||
|
||||
# See: https://bugreports.qt-project.org/browse/QTBUG-37902
|
||||
@@ -106,12 +119,12 @@ prepare() {
|
||||
|
||||
local _optim=
|
||||
case ${MINGW_CHOST} in
|
||||
i686*)
|
||||
_optim="-march=i686 -mtune=core2"
|
||||
;;
|
||||
x86_64*)
|
||||
_optim="-march=nocona -mtune=core2"
|
||||
;;
|
||||
i686*)
|
||||
_optim="-march=i686 -mtune=core2"
|
||||
;;
|
||||
x86_64*)
|
||||
_optim="-march=nocona -mtune=core2"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Determine the CFLAGS, DEBUG_CFLAGS and LDFLAGS that we will tell {g++,gcc}-base.conf about
|
||||
@@ -119,8 +132,8 @@ prepare() {
|
||||
CFLAGS_MKS_DEBUG="${CFLAGS} ${DEBUG_CFLAGS}"
|
||||
LDFLAGS_MKS="${LDFLAGS}"
|
||||
# If not using MSYS2 make then transform -I${MINGW_PREFIX}/blah or -L${MINGW_PREFIX}/blah from MSYS2 to native
|
||||
CFLAGS_MKS_RELEASE=$(translate_to_native "${CFLAGS_MKS_RELEASE}")
|
||||
CFLAGS_MKS_DEBUG=$(translate_to_native "${CFLAGS_MKS_DEBUG}")
|
||||
CFLAGS_MKS_RELEASE=$(translate_for_make "${CFLAGS_MKS_RELEASE}")
|
||||
CFLAGS_MKS_DEBUG=$(translate_for_make "${CFLAGS_MKS_DEBUG}")
|
||||
LDFLAGS_MKS=$(translate_to_native "${LDFLAGS_MKS}")
|
||||
|
||||
sed -i "s|%OPTIMIZE_OPT%|${_optim}|g" qtbase/mkspecs/win32-g++/qmake.conf
|
||||
@@ -129,13 +142,15 @@ prepare() {
|
||||
sed -i "s|^QMAKE_CFLAGS_DEBUG *+= .*$|QMAKE_CFLAGS_DEBUG += ${CFLAGS_MKS_DEBUG}|g" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
||||
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" qtbase/mkspecs/common/gcc-base-unix.conf
|
||||
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS_MKS}|g" qtbase/mkspecs/common/gcc-base.conf
|
||||
}
|
||||
|
||||
build() {
|
||||
# To keep the build folder name quite small (MAXPATH limit)
|
||||
# the source folder (long) is renamed to $CARCH (i686 or x86_64)
|
||||
[ -d ${CARCH} ] && rm -rf ${CARCH}
|
||||
cd ${srcdir}
|
||||
mv ${_pkgfqn} ${CARCH}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${CARCH}
|
||||
touch qtbase/.gitignore
|
||||
#BUILD_WIN=$(pwd -W)
|
||||
@@ -144,59 +159,63 @@ build() {
|
||||
mkdir -p ${pkgdir}${MINGW_PREFIX}/qt5-static
|
||||
pushd ${pkgdir}${MINGW_PREFIX}/qt5-static > /dev/null
|
||||
QTDIR_WIN=$(pwd -W)
|
||||
echo "QTDIR_WIN $QTDIR_WIN"
|
||||
popd > /dev/null
|
||||
|
||||
local _extra_inc_string="$(pkg-config --cflags dbus-1)"
|
||||
local -a _extra_inc
|
||||
for _inc in $(translate_to_native "$(pkg-config --cflags dbus-1)"); do
|
||||
for _inc in "$(translate_for_make $_extra_inc_string)"; do
|
||||
_extra_inc+=("$_inc")
|
||||
done
|
||||
plain "_extra_inc is ${_extra_inc[@]}"
|
||||
export PATH=${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${MINGW_PREFIX}/qt5-static/bin:${MINGW_PREFIX}/bin:"${PATH}"
|
||||
|
||||
# We're deliberately knocking out the system includes of -I/mingw64/include and system libraries of -L/mingw64/lib (actually all -I and -L)
|
||||
# .. there's another way but Ossi and Thiago didn't want to go there .. (REFERENCE?)
|
||||
# .. for us an alternative that will probably work is to prepend LDFLAGS with -LC:/repo/mingw-w64-qt5-static/src/${CARCH}/qtbase/lib
|
||||
#
|
||||
export PATH="${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${MINGW_PREFIX}/qt5-static/bin:${MINGW_PREFIX}/bin:${PATH}"
|
||||
|
||||
# Set the correct one of _extra_inc or _extra_inc_string, never both.
|
||||
if [ "${_configure}" = "./configure.bat" ]; then
|
||||
_extra_inc_string=${_extra_inc_string//-I/:}
|
||||
_extra_inc_string=${_extra_inc_string// /}
|
||||
_extra_inc=("")
|
||||
plain "_extra_inc_string (for ${_configure}) is ${_extra_inc_string}"
|
||||
else
|
||||
_extra_inc_string=""
|
||||
plain "_extra_inc (for ${_configure}) is ${_extra_inc[@]}"
|
||||
fi
|
||||
export CPATH="${MINGW_PREFIX}/${MINGW_CHOST}/include:${MINGW_PREFIX}/include:${MINGW_PREFIX}/include/noX:${_extra_inc_string}"
|
||||
# export LIB="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib"
|
||||
# Qt manages the compiler flags for release / debug configs separately, so having our own values (-O2) is harmful here ..
|
||||
# I think that we should unset CFLAGS/CXXFLAGS before building Qt since gcc-base.conf is responsible for managing
|
||||
# them. We need to patch the values of QMAKE_CFLAGS_OPTIMIZE, QMAKE_CFLAGS_DEBUG in there instead, reworking the seds (^)
|
||||
# export CFLAGS=$(echo $CFLAGS | sed 's#\([ ]*-I[^ ]*\)##g')
|
||||
# export CXXFLAGS=$(echo $CXXFLAGS | sed 's#\([ ]*-I[^ ]*\)##g')
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset LDFLAGS
|
||||
|
||||
OPENSSL_LIBS="-lssl -lcrypto -lcrypt32 -lgdi32" \
|
||||
./configure \
|
||||
-prefix ${QTDIR_WIN} \
|
||||
-opengl desktop \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-device-option QMAKE_EXTENSION_IMPORTLIB="dll.a" \
|
||||
-platform win32-g++ \
|
||||
-static \
|
||||
-debug-and-release \
|
||||
"${_extra_inc[@]}" \
|
||||
-no-fontconfig \
|
||||
-qt-zlib \
|
||||
-qt-pcre \
|
||||
-qt-libpng \
|
||||
-qt-libjpeg \
|
||||
-qt-harfbuzz \
|
||||
-qt-freetype \
|
||||
-icu \
|
||||
-no-gtkstyle \
|
||||
-no-glib \
|
||||
-qt-sql-sqlite \
|
||||
-openssl-linked \
|
||||
-dbus \
|
||||
-make libs \
|
||||
-make tools \
|
||||
-nomake examples \
|
||||
-nomake tests
|
||||
${_configure} \
|
||||
-prefix ${QTDIR_WIN} \
|
||||
-opengl ${_opengl} \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-device-option QMAKE_EXTENSION_IMPORTLIB="dll.a" \
|
||||
-platform win32-g++ \
|
||||
-static \
|
||||
-debug-and-release \
|
||||
"${_extra_inc[@]}" \
|
||||
-no-fontconfig \
|
||||
-qt-zlib \
|
||||
-qt-pcre \
|
||||
-qt-libpng \
|
||||
-qt-libjpeg \
|
||||
-qt-harfbuzz \
|
||||
-qt-freetype \
|
||||
-icu \
|
||||
-no-gtkstyle \
|
||||
-no-glib \
|
||||
-qt-sql-sqlite \
|
||||
-openssl-linked \
|
||||
-dbus \
|
||||
-make libs \
|
||||
-make tools \
|
||||
-nomake examples \
|
||||
-nomake tests
|
||||
|
||||
${_make}
|
||||
${_make} ${MAKEFLAGS}
|
||||
}
|
||||
|
||||
package() {
|
||||
@@ -205,7 +224,7 @@ package() {
|
||||
|
||||
export PATH=${pkgdir}${MINGW_PREFIX}/qt5-static/bin:${pkgdir}${MINGW_PREFIX}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH}
|
||||
|
||||
${_make} -j1 install #INSTALL_ROOT="${pkgdir}"
|
||||
${_make} -j1 install
|
||||
${_make} -j1 docs
|
||||
${_make} -j1 install_qch_docs
|
||||
|
||||
|
||||
@@ -3,46 +3,57 @@
|
||||
|
||||
_realname=qt5
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
_configure=./configure.bat
|
||||
#_configure=./configure
|
||||
# When using the configure bash script, MSYS2 make is
|
||||
# probably a better choice as otherwise the Makefiles
|
||||
# can have MSYS2 paths in them. We try to handle this
|
||||
# but it is ad-hoc at best.
|
||||
_make=make
|
||||
#_make=${MINGW_PREFIX}/bin/mingw32-make
|
||||
#_opengl=angle
|
||||
_opengl=desktop
|
||||
pkgname="${_mingw_suff}-${_realname}"
|
||||
_ver_base=5.3.0-beta
|
||||
pkgver=${_ver_base//-/}
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
arch=('any')
|
||||
pkgdesc="A cross-platform application and UI framework (mingw-w64)"
|
||||
url='http://qt-project.org/'
|
||||
install=qt5-${CARCH}.install
|
||||
license=('GPL3' 'LGPL' 'FDL' 'custom')
|
||||
depends=("${_mingw_suff}-gcc-libs"
|
||||
"${_mingw_suff}-icu"
|
||||
"${_mingw_suff}-openssl"
|
||||
"${_mingw_suff}-libxml2"
|
||||
"${_mingw_suff}-libxslt"
|
||||
"${_mingw_suff}-fontconfig"
|
||||
"${_mingw_suff}-qtbinpatcher"
|
||||
"${_mingw_suff}-freetype"
|
||||
"${_mingw_suff}-harfbuzz"
|
||||
"${_mingw_suff}-libpng"
|
||||
"${_mingw_suff}-zlib"
|
||||
"${_mingw_suff}-libjpeg"
|
||||
"${_mingw_suff}-pcre"
|
||||
"${_mingw_suff}-sqlite3"
|
||||
"${_mingw_suff}-libwebp"
|
||||
"${_mingw_suff}-xpm-nox"
|
||||
"${_mingw_suff}-dbus")
|
||||
makedepends=("${_mingw_suff}-gcc"
|
||||
"${_mingw_suff}-postgresql"
|
||||
"${_mingw_suff}-libmariadbclient"
|
||||
"${_mingw_suff}-libfbclient"
|
||||
"${_mingw_suff}-python2"
|
||||
"${_mingw_suff}-ruby"
|
||||
"perl"
|
||||
"gperf"
|
||||
"m4"
|
||||
"flex"
|
||||
"${_mingw_suff}-make"
|
||||
"${_mingw_suff}-pkg-config")
|
||||
"${_mingw_suff}-icu"
|
||||
"${_mingw_suff}-openssl"
|
||||
"${_mingw_suff}-libxml2"
|
||||
"${_mingw_suff}-libxslt"
|
||||
"${_mingw_suff}-fontconfig"
|
||||
"${_mingw_suff}-qtbinpatcher"
|
||||
"${_mingw_suff}-freetype"
|
||||
"${_mingw_suff}-harfbuzz"
|
||||
"${_mingw_suff}-libpng"
|
||||
"${_mingw_suff}-zlib"
|
||||
"${_mingw_suff}-libjpeg"
|
||||
"${_mingw_suff}-pcre"
|
||||
"${_mingw_suff}-sqlite3"
|
||||
"${_mingw_suff}-libwebp"
|
||||
"${_mingw_suff}-xpm-nox"
|
||||
"${_mingw_suff}-dbus")
|
||||
makedepends=("perl"
|
||||
"gperf"
|
||||
"m4"
|
||||
"flex"
|
||||
"patch"
|
||||
"diffutils"
|
||||
"make"
|
||||
"${_mingw_suff}-gcc"
|
||||
"${_mingw_suff}-postgresql"
|
||||
"${_mingw_suff}-libmariadbclient"
|
||||
"${_mingw_suff}-libfbclient"
|
||||
"${_mingw_suff}-python2"
|
||||
"${_mingw_suff}-ruby"
|
||||
"${_mingw_suff}-make"
|
||||
"${_mingw_suff}-pkg-config")
|
||||
groups=("${_mingw_suff}-qt" "${_mingw_suff}-qt5")
|
||||
options=('!strip' 'staticlibs')
|
||||
_pkgfqn="qt-everywhere-opensource-src-${_ver_base}"
|
||||
@@ -94,9 +105,18 @@ md5sums=('4f4a8302c52ef80bbb62bf764e682e47'
|
||||
'b0b5cc641cf8ebc2660fa819bede0089'
|
||||
'65e8bbc16b3d0d4e03687ef139e07c90')
|
||||
|
||||
translate_for_make() {
|
||||
if [ "${_make}" = "make" ]; then
|
||||
echo "${1}"
|
||||
else
|
||||
echo "${1}" | sed "s|${MINGW_PREFIX}|$(cygpath -m ${MINGW_PREFIX})|g"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}
|
||||
#cp -rf qt3d ${_pkgfqn}/
|
||||
# cd ${srcdir}
|
||||
# cp -rf qt3d ${_pkgfqn}/
|
||||
cd ${_pkgfqn}
|
||||
|
||||
patch -p1 -i ${srcdir}/qt-5.0.0-oracle-driver-prompt.patch
|
||||
@@ -109,6 +129,10 @@ prepare() {
|
||||
# My qt-5.2.1 win32-g++ static patches are against qtbase's dev branch.
|
||||
pushd qtbase
|
||||
patch -p1 -i ${srcdir}/qt-5.2.1-win32-g-Enable-static-builds.patch
|
||||
# Despite qt-5.2.1-use-.dll.a-as-MINGW_IMPORT_LIB-extension.patch the following .a (i.e. non-import)
|
||||
# static libraries end up being made:
|
||||
# ActiveQt (which is always built statically), libQt5OpenGLExtensions{d}.a, libQt5PlatformSupport{d}.a
|
||||
# libQt5QmlDevTools.a, libQt5UiTools{d}.a libqtmain{d}.a
|
||||
patch -p1 -i ${srcdir}/qt-5.2.1-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.2.1-qmlimportscanner-Ensure-the-correct-variant-is-run.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-beta-0001-qdoc-increase-stack-size-for-win32-g-too.patch
|
||||
@@ -120,20 +144,20 @@ prepare() {
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-win32-g++-use-qpa-genericunixfontdatabase.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-fix-examples-building.patch
|
||||
|
||||
# Hacks to use external ANGLE libraries.
|
||||
## patch -p1 -i ${srcdir}/qt5-add-angle-support.patch
|
||||
## patch -p1 -i ${srcdir}/qt5-qtwebkit-angle-build-fix.patch
|
||||
# patch -p1 -i ${srcdir}/qt5-use-external-angle-library.patch
|
||||
# patch -p1 -i ${srcdir}/qtwebkit-dont-use-bundled-angle-libraries.patch
|
||||
# patch -p1 -i ${srcdir}/qt-5.3.0-qtwebkit-angle-update-for-angleproject-76985f-and-51b4a0.patch
|
||||
# patch -p1 -i ${srcdir}/env-set-external-angle.patch
|
||||
|
||||
if [ "${_opengl}" = "angle" ]; then
|
||||
# Hacks to use external ANGLE libraries.
|
||||
# patch -p1 -i ${srcdir}/qt5-add-angle-support.patch
|
||||
# patch -p1 -i ${srcdir}/qt5-qtwebkit-angle-build-fix.patch
|
||||
patch -p1 -i ${srcdir}/qt5-use-external-angle-library.patch
|
||||
patch -p1 -i ${srcdir}/qtwebkit-dont-use-bundled-angle-libraries.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.3.0-qtwebkit-angle-update-for-angleproject-76985f-and-51b4a0.patch
|
||||
patch -p1 -i ${srcdir}/env-set-external-angle.patch
|
||||
fi
|
||||
|
||||
# See: https://bugreports.qt-project.org/browse/QTBUG-37902
|
||||
_ver_num=${_ver_base%%-*}
|
||||
sed -i "s/^MODULE_VERSION = .*$/MODULE_VERSION = ${_ver_num}/g" qtenginio/.qmake.conf
|
||||
|
||||
#mv configure.bat configure.bat.orig
|
||||
#mv qtbase/configure.bat qtbase/configure.bat.orig
|
||||
local _optim=
|
||||
case ${MINGW_CHOST} in
|
||||
i686*)
|
||||
@@ -144,21 +168,25 @@ prepare() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# Determine the CFLAGS, DEBUG_CFLAGS and LDFLAGS that we will tell {g++,gcc}-base.conf about
|
||||
CFLAGS_MKS_RELEASE="${CFLAGS}"
|
||||
CFLAGS_MKS_DEBUG="${CFLAGS} ${DEBUG_CFLAGS}"
|
||||
LDFLAGS_MKS="${LDFLAGS}"
|
||||
# If not using MSYS2 make then transform -I${MINGW_PREFIX}/blah or -L${MINGW_PREFIX}/blah from MSYS2 to native
|
||||
CFLAGS_MKS_RELEASE=$(translate_for_make "${CFLAGS_MKS_RELEASE}")
|
||||
CFLAGS_MKS_DEBUG=$(translate_for_make "${CFLAGS_MKS_DEBUG}")
|
||||
LDFLAGS_MKS=$(translate_for_make "${LDFLAGS_MKS}")
|
||||
|
||||
sed -i "s|%OPTIMIZE_OPT%|${_optim}|g" qtbase/mkspecs/win32-g++/qmake.conf
|
||||
sed -i "s|%STATICFLAGS%||g" qtbase/mkspecs/win32-g++/qmake.conf # -static-libstdc++ -static-libgcc
|
||||
sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
||||
sed -i "s|^QMAKE_CFLAGS_RELEASE *+= .*$|QMAKE_CFLAGS_RELEASE += ${CFLAGS_MKS_RELEASE}|g" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
||||
sed -i "s|^QMAKE_CFLAGS_DEBUG *+= .*$|QMAKE_CFLAGS_DEBUG += ${CFLAGS_MKS_DEBUG}|g" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
||||
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" qtbase/mkspecs/common/gcc-base-unix.conf
|
||||
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" qtbase/mkspecs/common/gcc-base.conf
|
||||
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS_MKS}|g" qtbase/mkspecs/common/gcc-base.conf
|
||||
|
||||
# Use python2 for Python 2.x
|
||||
#patch -p1 -i "${srcdir}"/use-python2.patch
|
||||
#sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
|
||||
# -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
|
||||
# $(find . -name '*.py')
|
||||
|
||||
# To keep the build folder name quite small (MAXPATH limit)
|
||||
# the source folder (long) is renamed to $CARCH (i686 or x86_64)
|
||||
#[ -d ${CARCH} ] && rm -rf ${CARCH}
|
||||
[ -d ${CARCH} ] && rm -rf ${CARCH}
|
||||
cd ${srcdir}
|
||||
mv ${_pkgfqn} ${CARCH}
|
||||
}
|
||||
@@ -169,50 +197,53 @@ build() {
|
||||
#BUILD_WIN=$(pwd -W)
|
||||
#echo "BUILD_WIN $BUILD_WIN"
|
||||
|
||||
#export QTDIR="${srcdir}"/${CARCH}
|
||||
#export LD_LIBRARY_PATH="${QTDIR}"/qtbase/lib:"${QTDIR}"/qttools/lib:"${LD_LIBRARY_PATH}"
|
||||
#export QT_PLUGIN_PATH="${QTDIR}"/qtbase/plugins
|
||||
|
||||
mkdir -p ${pkgdir}${MINGW_PREFIX}
|
||||
pushd ${pkgdir}${MINGW_PREFIX} > /dev/null
|
||||
QTDIR_WIN=$(pwd -W)
|
||||
#echo "QTDIR_WIN $QTDIR_WIN"
|
||||
popd > /dev/null
|
||||
|
||||
#pushd ${MINGW_PREFIX} > /dev/null
|
||||
#MINGW_WIN=$(pwd -W)
|
||||
#echo "MINGW_WIN $MINGW_WIN"
|
||||
#popd > /dev/null
|
||||
|
||||
_extra_inc="$(pkg-config --cflags-only-I dbus-1 libxml-2.0 freetype2) -I${MINGW_PREFIX}/include/GLSLANG"
|
||||
_extra_inc=${_extra_inc//-I/:}
|
||||
_extra_inc=${_extra_inc// /}
|
||||
local _extra_inc_string="$(pkg-config --cflags-only-I dbus-1 libxml-2.0 freetype2) -I${MINGW_PREFIX}/include/GLSLANG"
|
||||
local -a _extra_inc
|
||||
for _inc in "$(translate_for_make $_extra_inc_string)"; do
|
||||
_extra_inc+=("$_inc")
|
||||
done
|
||||
|
||||
export PATH="${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH}"
|
||||
export EXTERNAL_ANGLE=1
|
||||
export LIBRARY_PATH="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib"
|
||||
export CPATH="${MINGW_PREFIX}/${MINGW_CHOST}/include:${MINGW_PREFIX}/include:${MINGW_PREFIX}/include/mariadb:${MINGW_PREFIX}/include/noX:${_extra_inc}"
|
||||
#export LIB="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib"
|
||||
export PATH="${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH}"
|
||||
|
||||
#unset LDFLAGS
|
||||
#export CFLAGS=$(echo $CFLAGS | sed 's#\([ ]*-I[^ ]*\)##g')
|
||||
#export CXXFLAGS=$(echo $CXXFLAGS | sed 's#\([ ]*-I[^ ]*\)##g')
|
||||
#QMAKE_LDFLAGS+=" -L${MINGW_PREFIX}/${MINGW_CHOST}/lib -L${MINGW_PREFIX}/lib"
|
||||
#export LDFLAGS=$(echo $LDFLAGS | sed 's#\([ ]*-L[^ ]*\)##g')
|
||||
# Set the correct one of _extra_inc or _extra_inc_string, never both.
|
||||
if [ "${_configure}" = "./configure.bat" ]; then
|
||||
_extra_inc_string=${_extra_inc_string//-I/:}
|
||||
_extra_inc_string=${_extra_inc_string// /}
|
||||
unset _extra_inc
|
||||
plain "_extra_inc_string (for ${_configure}) is ${_extra_inc_string}"
|
||||
else
|
||||
_extra_inc_string=""
|
||||
plain "_extra_inc (for ${_configure}) is ${_extra_inc}"
|
||||
fi
|
||||
export CPATH="${MINGW_PREFIX}/${MINGW_CHOST}/include:${MINGW_PREFIX}/include:${MINGW_PREFIX}/include/mariadb:${MINGW_PREFIX}/include/noX:${_extra_inc_string}"
|
||||
# export LIB="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib"
|
||||
|
||||
# Qt manages the compiler flags for release / debug configs separately, so having our own values (-O2) is harmful here ..
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset LDFLAGS
|
||||
|
||||
./configure.bat \
|
||||
${_configure} \
|
||||
-prefix ${QTDIR_WIN} \
|
||||
-datadir ${QTDIR_WIN}/share/qt5 \
|
||||
-archdatadir ${QTDIR_WIN}/share/qt5 \
|
||||
-examplesdir ${QTDIR_WIN}/share/qt5/examples \
|
||||
-testsdir ${QTDIR_WIN}/share/qt5/tests \
|
||||
-opengl desktop \
|
||||
-opengl ${_opengl} \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-device-option QMAKE_EXTENSION_IMPORTLIB="dll.a" \
|
||||
-platform win32-g++ \
|
||||
-shared \
|
||||
-debug-and-release \
|
||||
"${_extra_inc[@]}" \
|
||||
-no-iconv \
|
||||
-icu \
|
||||
-plugin-sql-ibase \
|
||||
@@ -241,7 +272,7 @@ package() {
|
||||
|
||||
export PATH=${pkgdir}${MINGW_PREFIX}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH}
|
||||
|
||||
${_make} install #INSTALL_ROOT="${pkgdir}"
|
||||
${_make} install
|
||||
${_make} docs
|
||||
${_make} install_qch_docs
|
||||
|
||||
@@ -264,11 +295,3 @@ package() {
|
||||
#sed -i "s|${srcdir}/${CARCH}/qtbase|/usr|" \
|
||||
# "${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri
|
||||
}
|
||||
|
||||
# Despite qt-5.2.1-use-.dll.a-as-MINGW_IMPORT_LIB-extension.patch the following static libraries end up being made:
|
||||
# ActiveQt (which is always built statically)
|
||||
# .. apart from that there's libQt5OpenGLExtensions{d}.a
|
||||
# libQt5PlatformSupport{d}.a
|
||||
# libQt5QmlDevTools.a
|
||||
# libQt5UiTools{d}.a
|
||||
# libqtmain{d}.a
|
||||
|
||||
Reference in New Issue
Block a user