Add qt5 package.
This commit is contained in:
175
mingw-w64-qt5/PKGBUILD
Normal file
175
mingw-w64-qt5/PKGBUILD
Normal file
@@ -0,0 +1,175 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=qt5
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
pkgname="${_mingw_suff}-${_realname}"
|
||||
pkgver=5.2.0pre
|
||||
_pkgver=5.2.0
|
||||
pkgrel=194
|
||||
arch=('any')
|
||||
url='http://qt-project.org/'
|
||||
install=qt5.install
|
||||
license=('GPL3' 'LGPL' 'FDL' 'custom')
|
||||
depends=("${_mingw_suff}-gcc"
|
||||
"${_mingw_suff}-icu"
|
||||
"${_mingw_suff}-openssl"
|
||||
"${_mingw_suff}-libxml2"
|
||||
"${_mingw_suff}-libxslt"
|
||||
"${_mingw_suff}-fontconfig"
|
||||
"${_mingw_suff}-qtbinpatcher"
|
||||
"${_mingw_suff}-freetype"
|
||||
"${_mingw_suff}-libpng"
|
||||
"${_mingw_suff}-zlib"
|
||||
"${_mingw_suff}-libjpeg"
|
||||
"${_mingw_suff}-pcre"
|
||||
"${_mingw_suff}-sqlite3"
|
||||
"${_mingw_suff}-libwebp")
|
||||
makedepends=("${_mingw_suff}-gcc"
|
||||
"${_mingw_suff}-postgresql"
|
||||
"${_mingw_suff}-libmariadbclient"
|
||||
"${_mingw_suff}-libfbclient"
|
||||
"${_mingw_suff}-python2"
|
||||
"${_mingw_suff}-ruby"
|
||||
"${_mingw_suff}-perl"
|
||||
"${_mingw_suff}-gperf"
|
||||
"m4"
|
||||
"flex"
|
||||
"${_mingw_suff}-make")
|
||||
groups=("${_mingw_suff}-qt" "${_mingw_suff}-qt5")
|
||||
options=('!strip' 'staticlibs')
|
||||
_pkgfqn="qt-everywhere-opensource-src-${_pkgver}"
|
||||
source=(#"http://download.qt-project.org/development_releases/qt/5.2/${_pkgver}/single/${_pkgfqn}.tar.xz"
|
||||
http://download.qt-project.org/snapshots/qt/5.2/${_pkgver}/2013-12-04_194/single/${_pkgfqn}.tar.xz
|
||||
qt-5.0.0-oracle-driver-prompt.patch
|
||||
qt-5.0.0-use-fbclient-instead-of-gds32.patch
|
||||
qt-5.1.0-win32-g++-mkspec-optimization.patch
|
||||
qt-5.1.x-fix-configure-tests.patch
|
||||
qt-5.1.x-syncqt-fix.patch
|
||||
qt-5.1.x-win_flex-replace.patch)
|
||||
md5sums=('aaf2960db4a5b6137dd77ff2a31a7601'
|
||||
'10790f1672b5f2b83e5473ad6cd48cd3'
|
||||
'86899e8f2858c48d4827282c04696b76'
|
||||
'd675dbbe15d275c84f2792c75212ace0'
|
||||
'2488e70329d9bc71f8f4619ddfb8522a'
|
||||
'2235d876133956a788c393310fa8a526'
|
||||
'cc5fdd2eebc8d2d747271de091942336')
|
||||
|
||||
prepare() {
|
||||
cd ${_pkgfqn}
|
||||
|
||||
patch -p1 -i ${srcdir}/qt-5.0.0-oracle-driver-prompt.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.0.0-use-fbclient-instead-of-gds32.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.1.0-win32-g++-mkspec-optimization.patch
|
||||
#patch -p1 -i ${srcdir}/qt-5.1.x-fix-configure-tests.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.1.x-syncqt-fix.patch
|
||||
patch -p1 -i ${srcdir}/qt-5.1.x-win_flex-replace.patch
|
||||
|
||||
local _optim=
|
||||
case ${MINGW_CHOST} in
|
||||
i686*)
|
||||
_optim="-march=i686 -mtune=core2"
|
||||
;;
|
||||
x86_64*)
|
||||
_optim="-march=nocona -mtune=core2"
|
||||
;;
|
||||
esac
|
||||
|
||||
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 "/^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
|
||||
|
||||
# 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')
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${_pkgfqn}
|
||||
touch qtbase/.gitignore
|
||||
#BUILD_WIN=$(pwd -W)
|
||||
#echo "BUILD_WIN $BUILD_WIN"
|
||||
|
||||
#export QTDIR="${srcdir}"/${_pkgfqn}
|
||||
#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
|
||||
|
||||
export INCLUDE="${MINGW_PREFIX}/${MINGW_CHOST}/include:${MINGW_PREFIX}/include:${MINGW_PREFIX}/include/mysql:${MINGW_PREFIX}/include/libxml2"
|
||||
export LIB="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib"
|
||||
export CPATH="${MINGW_PREFIX}/${MINGW_CHOST}/include:${MINGW_PREFIX}/include:${MINGW_PREFIX}/include/mysql:${MINGW_PREFIX}/include/libxml2"
|
||||
export LIBRARY_PATH="${MINGW_PREFIX}/${MINGW_CHOST}/lib:${MINGW_PREFIX}/lib"
|
||||
export PATH=${srcdir}/${_pkgfqn}/qtbase/bin:${srcdir}/${_pkgfqn}/qtbase/lib:${PATH}
|
||||
|
||||
./configure.bat \
|
||||
-prefix ${QTDIR_WIN} \
|
||||
-opensource \
|
||||
-opengl desktop \
|
||||
-confirm-license \
|
||||
-debug-and-release \
|
||||
-plugin-sql-ibase \
|
||||
-plugin-sql-mysql \
|
||||
-plugin-sql-psql \
|
||||
-plugin-sql-odbc \
|
||||
-no-iconv \
|
||||
-icu \
|
||||
-fontconfig \
|
||||
-openssl \
|
||||
-no-dbus \
|
||||
-shared \
|
||||
-platform win32-g++ \
|
||||
-nomake tests \
|
||||
-nomake examples
|
||||
|
||||
${MINGW_PREFIX}/bin/mingw32-make ${MAKEFLAGS}
|
||||
|
||||
# Fix paths
|
||||
#find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} +
|
||||
#find "${QTDIR}" -name Makefile.qmake-docs -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} +
|
||||
#find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" {} +
|
||||
#find "${QTDIR}" -name Makefile.qmake-docs -exec sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" {} +
|
||||
#sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" qtwebkit/Source/Makefile.api
|
||||
}
|
||||
|
||||
package() {
|
||||
|
||||
cd ${_pkgfqn}
|
||||
|
||||
export PATH=${pkgdir}${MINGW_PREFIX}/bin:${srcdir}/${_pkgfqn}/qtbase/bin:${srcdir}/${_pkgfqn}/qtbase/lib:${PATH}
|
||||
|
||||
${MINGW_PREFIX}/bin/mingw32-make ${MAKEFLAGS} install #INSTALL_ROOT="${pkgdir}"
|
||||
${MINGW_PREFIX}/bin/mingw32-make ${MAKEFLAGS} docs
|
||||
${MINGW_PREFIX}/bin/mingw32-make ${MAKEFLAGS} install_qch_docs
|
||||
|
||||
install -D -m644 LGPL_EXCEPTION.txt \
|
||||
"${pkgdir}${MINGW_PREFIX}"/share/licenses/qt5/LGPL_EXCEPTION.txt
|
||||
|
||||
# Remove dll's from lib
|
||||
rm -f "${pkgdir}${MINGW_PREFIX}/lib"/*.dll
|
||||
|
||||
# Workaround for installing empty .pc files
|
||||
plain "---> Fix pkgconfig files..."
|
||||
local _pc_files=( $(find ${srcdir}/${_pkgfqn} -type f -name Qt5*.pc) )
|
||||
cp -f ${_pc_files[@]} ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/
|
||||
|
||||
# Fix wrong path in prl files
|
||||
#find "${pkgdir}${MINGW_PREFIX}/lib" -type f -name '*.prl' \
|
||||
# -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
|
||||
|
||||
# Fix wrong qmake path in pri file
|
||||
#sed -i "s|${srcdir}/${_pkgfqn}/qtbase|/usr|" \
|
||||
# "${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri
|
||||
}
|
||||
11
mingw-w64-qt5/qt-5.0.0-oracle-driver-prompt.patch
Normal file
11
mingw-w64-qt5/qt-5.0.0-oracle-driver-prompt.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/qtbase/tools/configure/configureapp.cpp.orig 2012-12-18 22:03:34 +0300
|
||||
+++ b/qtbase/tools/configure/configureapp.cpp 2013-01-24 15:51:59 +0300
|
||||
@@ -2275,7 +2275,7 @@
|
||||
cout << "WARNING: Qt does not support compiling the Oracle database driver with" << endl
|
||||
<< "MinGW, due to lack of such support from Oracle. Consider disabling the" << endl
|
||||
<< "Oracle driver, as the current build will most likely fail." << endl;
|
||||
- prompt = true;
|
||||
+ prompt = false;
|
||||
}
|
||||
if (dictionary["QMAKESPEC"].endsWith("win32-msvc.net")) {
|
||||
cout << "WARNING: The makespec win32-msvc.net is deprecated. Consider using" << endl
|
||||
10
mingw-w64-qt5/qt-5.0.0-use-fbclient-instead-of-gds32.patch
Normal file
10
mingw-w64-qt5/qt-5.0.0-use-fbclient-instead-of-gds32.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- qt5/qtbase/src/sql/drivers/ibase/qsql_ibase.pri.orig 2012-12-20 23:44:56 +0400
|
||||
+++ qt5/qtbase/src/sql/drivers/ibase/qsql_ibase.pri 2012-12-20 23:45:02 +0400
|
||||
@@ -5,6 +5,6 @@
|
||||
!contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
|
||||
} else {
|
||||
!contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
|
||||
- LIBS += -lgds32_ms
|
||||
+ LIBS += -lfbclient_ms
|
||||
}
|
||||
}
|
||||
20
mingw-w64-qt5/qt-5.1.0-win32-g++-mkspec-optimization.patch
Normal file
20
mingw-w64-qt5/qt-5.1.0-win32-g++-mkspec-optimization.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/qtbase/mkspecs/win32-g++/qmake.conf.orig 2013-01-05 19:39:08 +0400
|
||||
+++ b/qtbase/mkspecs/win32-g++/qmake.conf 2013-01-05 19:39:38 +0400
|
||||
@@ -25,7 +25,7 @@
|
||||
QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = byacc
|
||||
QMAKE_YACCFLAGS = -d
|
||||
-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
|
||||
+QMAKE_CFLAGS = %OPTIMIZE_OPT% -pipe -fno-keep-inline-dllexport
|
||||
QMAKE_CFLAGS_DEPS = -M
|
||||
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
|
||||
QMAKE_CFLAGS_WARN_OFF = -w
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
QMAKE_LINK = $${CROSS_COMPILE}g++
|
||||
QMAKE_LINK_C = $${CROSS_COMPILE}gcc
|
||||
-QMAKE_LFLAGS =
|
||||
+QMAKE_LFLAGS = %STATICFLAGS%
|
||||
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
|
||||
QMAKE_LFLAGS_EXCEPTIONS_OFF =
|
||||
QMAKE_LFLAGS_RELEASE = -Wl,-s
|
||||
16
mingw-w64-qt5/qt-5.1.x-fix-configure-tests.patch
Normal file
16
mingw-w64-qt5/qt-5.1.x-fix-configure-tests.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
--- qt-stable/qtbase/config.tests/unix/ibase/ibase.pro.orig 2013-06-07 09:13:54 +0300
|
||||
+++ qt-stable/qtbase/config.tests/unix/ibase/ibase.pro 2013-06-07 09:14:13 +0300
|
||||
@@ -1,4 +1,4 @@
|
||||
SOURCES = ibase.cpp
|
||||
CONFIG -= qt dylib
|
||||
mac:CONFIG -= app_bundle
|
||||
-LIBS += -lgds
|
||||
+LIBS += -lfbclient_ms
|
||||
--- qt-stable/qtbase/config.tests/unix/mysql/mysql.pro.orig 2013-06-07 09:14:27 +0300
|
||||
+++ qt-stable/qtbase/config.tests/unix/mysql/mysql.pro 2013-06-07 09:14:32 +0300
|
||||
@@ -1,4 +1,4 @@
|
||||
SOURCES = mysql.cpp
|
||||
CONFIG -= qt dylib
|
||||
mac:CONFIG -= app_bundle
|
||||
-LIBS += -lmysqlclient
|
||||
+LIBS += -lmysql
|
||||
10
mingw-w64-qt5/qt-5.1.x-syncqt-fix.patch
Normal file
10
mingw-w64-qt5/qt-5.1.x-syncqt-fix.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- qt-stable/qtbase/bin/syncqt.pl.orig 2013-06-18 09:28:07.034261200 +0000
|
||||
+++ qt-stable/qtbase/bin/syncqt.pl 2013-06-18 09:26:30.387962200 +0000
|
||||
@@ -210,6 +210,7 @@
|
||||
push @ret, $classname if ($classname);
|
||||
|
||||
my $parsable = "";
|
||||
+ local $/ = "\n";
|
||||
if(open(F, "<$iheader")) {
|
||||
while(<F>) {
|
||||
my $line = $_;
|
||||
47
mingw-w64-qt5/qt-5.1.x-win_flex-replace.patch
Normal file
47
mingw-w64-qt5/qt-5.1.x-win_flex-replace.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
--- qt-stable/qtbase/src/angle/src/compiler/translator_common.pro.orig 2013-06-18 08:49:51.975288500 +0000
|
||||
+++ qt-stable/qtbase/src/angle/src/compiler/translator_common.pro 2013-06-18 08:50:06.047321000 +0000
|
||||
@@ -92,7 +92,7 @@
|
||||
$$ANGLE_DIR/src/third_party/compiler/ArrayBoundsClamper.cpp
|
||||
|
||||
# NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin
|
||||
-flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME}
|
||||
+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}_lex.cpp ${QMAKE_FILE_NAME}
|
||||
flex.output = ${QMAKE_FILE_BASE}_lex.cpp
|
||||
flex.input = FLEX_SOURCES
|
||||
flex.dependency_type = TYPE_C
|
||||
--- qt-stable/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro.orig 2013-06-18 08:50:54.314442500 +0000
|
||||
+++ qt-stable/qtbase/src/angle/src/compiler/preprocessor/preprocessor.pro 2013-06-18 08:51:52.606574000 +0000
|
||||
@@ -43,7 +43,7 @@
|
||||
$$ANGLE_DIR/src/compiler/preprocessor/Token.cpp
|
||||
|
||||
# NOTE: 'win_flex' and 'bison' can be found in qt5/gnuwin32/bin
|
||||
-flex.commands = $$addGnuPath(win_flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME}
|
||||
+flex.commands = $$addGnuPath(flex) --noline --nounistd --outfile=${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_NAME}
|
||||
flex.output = ${QMAKE_FILE_BASE}.cpp
|
||||
flex.input = FLEX_SOURCES
|
||||
flex.dependency_type = TYPE_C
|
||||
--- qt-stable/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf.orig 2013-06-18 08:52:34.675598000 +0000
|
||||
+++ qt-stable/qtwebkit/Tools/qmake/mkspecs/features/default_pre.prf 2013-06-18 08:52:52.752632000 +0000
|
||||
@@ -100,7 +100,6 @@
|
||||
# A newer version of flex is required on Windows. At the moment the only
|
||||
# one that appears to provide binaries and is not cygwin is winflex.
|
||||
FLEX = flex
|
||||
-win32: FLEX = win_flex
|
||||
|
||||
BIN_EXTENSION =
|
||||
win32: BIN_EXTENSION = .exe
|
||||
--- qt-stable/qtwebkit/Tools/Scripts/webkitdirs.pm.orig 2013-06-18 08:55:27.150792500 +0000
|
||||
+++ qt-stable/qtwebkit/Tools/Scripts/webkitdirs.pm 2013-06-18 08:57:36.484427000 +0000
|
||||
@@ -1545,11 +1545,7 @@
|
||||
}
|
||||
} elsif (isGtk() or isQt() or isWx() or isEfl()) {
|
||||
my @cmds = qw(bison gperf);
|
||||
- if (isQt() and isWindows()) {
|
||||
- push @cmds, "win_flex";
|
||||
- } else {
|
||||
- push @cmds, "flex";
|
||||
- }
|
||||
+ push @cmds, "flex";
|
||||
my @missing = ();
|
||||
my $oldPath = $ENV{PATH};
|
||||
if (isQt() and isWindows()) {
|
||||
13
mingw-w64-qt5/qt5.install
Normal file
13
mingw-w64-qt5/qt5.install
Normal file
@@ -0,0 +1,13 @@
|
||||
post_install() {
|
||||
for qt in mingw32 mingw64; do
|
||||
if [ -f "${qt}/bin/qmake.exe" ]; then
|
||||
pushd ${qt}/bin > /dev/null
|
||||
./qtbinpatcher --verbose --nobackup
|
||||
popd > /dev/null
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
Reference in New Issue
Block a user