diff options
author | Martchus | 2018-05-28 21:54:37 +0200 |
---|---|---|
committer | Martchus | 2018-05-28 21:54:37 +0200 |
commit | 4fb0ff182a8cef4e0e95ab5e759f6be6f1397d0d (patch) | |
tree | 53dfd7e68e90babb0125d9ae0a436d35cba63c4f | |
parent | 2f92ee836d3ae79a9295962f319a7f864708be35 (diff) | |
download | aur-4fb0ff182a8cef4e0e95ab5e759f6be6f1397d0d.tar.gz |
Update to 5.11.0
-rw-r--r-- | PKGBUILD.sync-conflict-20180528-210211-HP76RFD | 395 |
1 files changed, 395 insertions, 0 deletions
diff --git a/PKGBUILD.sync-conflict-20180528-210211-HP76RFD b/PKGBUILD.sync-conflict-20180528-210211-HP76RFD new file mode 100644 index 000000000000..eb3995687d10 --- /dev/null +++ b/PKGBUILD.sync-conflict-20180528-210211-HP76RFD @@ -0,0 +1,395 @@ +# Maintainer: Martchus <martchus@gmx.net> +# Contributor: ant32 <antreimer@gmail.com> +# Contributor: Filip Brcic <brcha@gna.org> +# Contributor: jellysheep <max.mail@dameweb.de> + +# BEFORE COMMENTING OR REPORING ISSUES, PLEASE READ THE FILE `README.md` IN THIS REPOSITORY. +# ALSO HAVE A LOOK AT THE COMMENTS IN THE AUR. + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +# All patches are managed at https://github.com/Martchus/qtbase + +# Helper functions for the split builds +isDefault() { + [[ $pkgname = 'mingw-w64-qt5-base' ]] || [[ $pkgname = 'mingw-w64-qt5-base-static' ]] +} +isStatic() { + [ "${pkgname##*-}" = 'static' ] +} +isOpenGL() { + # Currently use native OpenGL by default + isDefault || \ + [[ $pkgname = 'mingw-w64-qt5-base-opengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-opengl-static' ]] +} +isANGLE() { + [[ $pkgname = 'mingw-w64-qt5-base-angle' ]] || [[ $pkgname = 'mingw-w64-qt5-base-angle-static' ]] || \ + [[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]] + # Treat dynamic version like ANGLE version, correct? +} +isDynamic() { + [[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]] +} +isNoOpenGL() { + [[ $pkgname = 'mingw-w64-qt5-base-noopengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-noopengl-static' ]] +} + +pkgname=mingw-w64-qt5-base-static +pkgver=5.11.0 +pkgrel=1 +pkgdesc='A cross-platform application and UI framework (mingw-w64)' +# The static variant doesn't contain any executables which need to be executed on the build machine +isStatic && arch=('any') || arch=('i686' 'x86_64') +url='https://www.qt.io/' +license=('GPL3' 'LGPL3' 'FDL' 'custom') +depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite' + 'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz' + 'mingw-w64-pcre2') +groups=('mingw-w64-qt5') +optdepends=('mingw-w64-postgresql: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support') +makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' 'mingw-w64-pkg-config') +options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +_pkgfqn="qtbase-everywhere-src-${pkgver}" +source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" + '0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch' + '0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch' + '0003-Use-external-ANGLE-library.patch' + '0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch' + '0005-Make-sure-.pc-files-are-installed-correctly.patch' + '0006-Don-t-add-resource-files-to-LIBS-parameter.patch' + '0007-Prevent-debug-library-names-in-pkg-config-files.patch' + '0008-Fix-linking-against-shared-static-libpng.patch' + '0009-Fix-linking-against-static-D-Bus.patch' + '0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch' + '0011-Fix-linking-against-static-freetype2.patch' + '0012-Fix-linking-against-static-harfbuzz.patch' + '0013-Fix-linking-against-static-pcre.patch' + '0014-Fix-linking-against-shared-static-MariaDB.patch' + '0015-Fix-linking-against-shared-static-PostgreSQL.patch' + '0016-Rename-qtmain-to-qt5main.patch' + '0017-Build-dynamic-host-libraries.patch' + '0018-Enable-rpath-for-build-tools.patch' + '0019-Use-system-zlib-for-build-tools.patch' + '0020-Use-.dll.a-as-import-lib-extension.patch' + '0021-Merge-shared-and-static-library-trees.patch' + '0022-Pull-dependencies-of-static-libraries-in-CMake-modul.patch' + '0023-Allow-usage-of-static-version-with-CMake.patch' + '0024-Adjust-linker-flags-for-static-build-with-cmake-ming.patch' + '0025-Use-correct-pkg-config-static-flag.patch' + '0026-Fix-macro-invoking-moc-rcc-and-uic.patch' + '0027-Ignore-errors-about-missing-feature-static.patch' + '0028-Enable-and-fix-use-of-iconv.patch' + '0029-Ignore-failing-pkg-config-test.patch' + '0030-Prevent-qmake-from-messing-static-lib-dependencies.patch' + '0031-Hardcode-linker-flags-for-platform-plugins.patch' + '0032-Fix-linking-against-static-plugins-with-qmake.patch' + '0033-Disable-hardware-randomizer-for-32-bit.patch') +sha256sums=('ed6e46db84f7d34923ab4eae165c63e05ab3cfa9d19a73d3f57b4e7bfd41de66' + 'd01df5be5f96578f65c0343b1ae6eaac31e0c7608fb9b69e745865a5dfc8a1a3' + '29621ba67b026c9fb61ba865ba9d6198d3b8914623609b97bbc375feb33415b2' + '58435fde3af1478450c49637581884c217bd9080704dc80d035eb38df4706a6e' + '3b4dff095110e60257f794c31e5c3b7f73c91d690c7acb3182b489d04988dd27' + '2b62c549626e76da5c36779fe7dd18bddb8041fdb1b983cd29651cf5b0a2b905' + '5c94228d93b7a6340098968738477f9720908a360358f51cd1bc6590e83679c0' + '164b09da056113e19b859a151f93803f19e0c9ea5130db916722f5f0bcb7a8cd' + '351e61261c87d700f4076c6d3f19e81a60d1bfcc0e64f2164cb2696c47a0fafc' + 'a1ed220ddba56656fdbc37163e794f3b43e9a5dae6099b2b23967e870cd9214e' + '844d136f65d498dc1eea11e1882cf2645320d249c82fdcec5d25875e9158cb39' + 'a4a4f5ea9bc79b474ea3c5d86903054d6e9242a22b84589c210b3b8c2f797447' + '7d1d1d57bff00ae77d5480955b85737bd4f30185f5b99f8b34d89f90976f53fb' + '1937bb971912fa7021295174aee8c250a7be9c2d3e3ad76f700d9f7d80fd1117' + '504fd54855d13a326cb65cffc006d1c67d9e6236830df9f581106ae8fe319fff' + 'b732bca79bced6595e278e9e7ceec79306f51be121e78db0a9faa461344c918d' + 'f86242c7e013971812c9a17d667db362ac10d19a63b51cda23d1f306bc8f3242' + 'da007b133f51f27342854e0fb251a1784096f24dab454def99c8496c143f38e5' + 'e6e8f2290a019071ded71c090c3cb8b24e0e33a37dcabdc6f676b886c18dd06a' + '83645b01666aae48121ea9a952c6cfce9ba2aedb3edb9e1b11a893a5d8882831' + 'bb7e54a090ceb6cddac43acee2f34d888a15df2ae0e99808ef6aad9ff6e9ebcf' + '7166f4ab8b7c5a60c4a6e3ac86411719fab67ef6a6c5a16463c6541e9955ce17' + 'bf1defbedd5c0d26aa000178092ac2c87ecb70b992184dc8ffff4502351e70c2' + '29289ac6b2380c4a5d551d3c9b331f9b13190f4dafabdc203dcbfabcb4075c4d' + '0494a41d31ff097cd59117557a6869c5e0e7670eef33267f93974c15e4445e76' + 'bc53b50f4055170fea15b669366b8961e896d2705f91382ee3beea013979408e' + '08d299eb938edc1d535bbb68b5b720203e2dffbc49129218bb1368791e6fb384' + '20d945b374b0e73501013fcf6ba9fd7e8732b76060c948faeb42c605f2f9dd1f' + 'd9eeaceb89efd143918a1bfed6b60d33e004e8421a613036647f318320b25d6a' + 'fb54191f4479ed66446d9c6b9066be11c5d2d580ff4aa0910a3ad29183329e75' + 'df8bfa7901b6af9de447a4f4d0983419f7c1fe5882cc97614d0e5b0759c67dec' + '65d4a1aedc465dd9f5284cd1e2a352bc3c21e8e8e697e58ff9e89f54e5fcb173' + '178144d85cf4c69ae5cea694959a555c4a8eb3a0a5ad5116a2c979beac0e36c0' + '704c95d7fc157e58cc7d4436eb74bdcc0453ba29bb3326a3fe511ee35273e4c3') + +_architectures='i686-w64-mingw32 x86_64-w64-mingw32' + +isStatic && depends+=(${pkgname%-static}) +if isANGLE; then + if isDynamic; then + makedepends+=('mingw-w64-angleproject') + optdepends+=('mingw-w64-angleproject: use ANGLE instead of native OpenGL') + else + depends+=('mingw-w64-angleproject') + fi +fi +if ! isDefault; then + if isStatic; then + provides+=('mingw-w64-qt5-base-static') + conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static' + 'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static') + else + provides+=('mingw-w64-qt5-base') + conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl' + 'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql') + fi +fi + +patch() { + local input_found= + local patch_file= + for arg in $@; do + if [[ $input_found ]]; then + patch_file="$arg" + break + fi + [[ $arg == -i ]] && input_found=1 + done + msg2 "Applying patch $patch_file" + /usr/bin/patch $@ +} + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + # apply patches; further descriptions can be found in patch files itself + for patch in "$srcdir/"*.patch; do + patch -p1 -i "$patch" + done + + # make sure the Qt 5 build system uses our external ANGLE library + rm -rf src/3rdparty/angle include/QtANGLE/{EGL,GLES2,GLES3,KHR} + + # as well as our external PCRE library and zlib + rm -rf src/3rdparty/{pcre,zlib} +} + +build() { + cd "${srcdir}/${_pkgfqn}" + + # do not set any flags here, flags are configured via mkspec + # (Setting flags here is not appropriate as it does not allow to + # distinguish between flags for native compiler and cross compiler.) + unset CFLAGS + unset CXXFLAGS + unset LDFLAGS + unset PKG_CONFIG_PATH + + for _arch in ${_architectures}; do + # define general configure arguments + local qt_configure_args="\ + -xplatform win32-g++ \ + -optimized-qmake \ + -verbose \ + -opensource \ + -confirm-license \ + -force-pkg-config \ + -force-debug-info \ + -system-zlib \ + -system-libpng \ + -system-libjpeg \ + -system-sqlite \ + -system-freetype \ + -system-harfbuzz \ + -system-pcre \ + -no-fontconfig \ + -sql-mysql \ + -sql-psql \ + -sql-sqlite \ + -dbus-linked \ + -no-glib \ + -no-icu \ + -iconv \ + -nomake examples \ + -make tools \ + -hostprefix /usr/${_arch} \ + -hostdatadir /usr/${_arch}/lib/qt \ + -hostbindir /usr/${_arch}/lib/qt/bin \ + -prefix /usr/${_arch} \ + -bindir /usr/${_arch}/bin \ + -archdatadir /usr/${_arch}/lib/qt \ + -datadir /usr/${_arch}/share/qt \ + -docdir /usr/${_arch}/share/doc/qt \ + -examplesdir /usr/${_arch}/share/qt/examples \ + -headerdir /usr/${_arch}/include/qt \ + -libdir /usr/${_arch}/lib \ + -plugindir /usr/${_arch}/lib/qt/plugins \ + -sysconfdir /usr/${_arch}/etc \ + -translationdir /usr/${_arch}/share/qt/translations \ + -device-option CROSS_COMPILE=${_arch}- \ + -device-option CROSS_COMPILE_PREFIX=/usr/${_arch}" + + # allows using ccache despite the use of pre-compile header (sloppiness must be set to pch_defines,time_macros in ccache config for this) + qt_configure_args+=' -device-option CROSS_COMPILE_CFLAGS=-fpch-preprocess' + + # add include directory of freetype2 and dbus manually (pkg-config detection in qmake doesn't work which is currently ignored via a patch) + qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1 | sed -e "s/-I\/usr\/${_arch}\/include //g")" + # note: The sed is required to prevent -isystem /usr/${_arch}/include (qmake will turn -I into -isystem) which would lead to + # the same issue as here: https://github.com/Martchus/tageditor/issues/22#issuecomment-330899141 + + # enable debug build if MINGW_W64_QT_DEBUG_BUILD is set (could be set in eg. /etc/makepkg.config if debug build is wanted) + [[ $MINGW_W64_QT_DEBUG_BUILD ]] \ + && qt_configure_args+=' -debug-and-release' \ + || qt_configure_args+=' -release' + + # configure usage of ANGLE/OpenGL + if isOpenGL; then + msg2 'Using native OpenGL backend' + qt_configure_args+=' -opengl desktop' + elif isNoOpenGL; then + msg2 'Building without OpenGL support' + qt_configure_args+=' -no-opengl' + elif isANGLE; then + if isDynamic; then + msg2 'Using dynamic OpenGL backend' + qt_configure_args+=' -opengl dynamic' + else + msg2 'Using ANGLE as OpenGL backend' + qt_configure_args+=' -angle' + fi + # enable declarations of GLES functions + qt_configure_args+=' -DGL_GLEXT_PROTOTYPES' + fi + + # add include directory of MariaDB + qt_configure_args+=" -I/usr/${_arch}/include/mariadb" + + msg2 'Configure and build qmake' + mkdir -p ../build-${_arch} && pushd ../build-${_arch} + if isStatic; then + qt_configure_args+=' -static' + + # configure static version to use linked OpenSSL + qt_configure_args+=' -openssl-linked' + export OPENSSL_LIBS="/usr/${_arch}/lib/libssl.a /usr/${_arch}/lib/libcrypto.a -lws2_32 -lgdi32 -lcrypt32 -ldnsapi -liphlpapi" + + else + qt_configure_args+=' -shared' + + # configure shared version to load OpenSSL dynamically + qt_configure_args+=' -openssl-runtime' + + qt_configure_args+=' -device-option CROSS_COMPILE_CUSTOM_CONFIG=actually_a_shared_build' + + # override LD_LIBRARY_PATH so libraries for native build tools like libQt5Bootstrap.so are found + export LD_LIBRARY_PATH="$PWD/lib" + export LDFLAGS="-L$PWD/lib" + fi + + msg2 'Build qmake and configure' && ../${_pkgfqn}/configure $qt_configure_args + msg2 'Build Qt libraries' && make + + popd + done +} + +package() { + for _arch in ${_architectures}; do + cd "$srcdir/${_pkgfqn}" + make install -C ../build-${_arch} INSTALL_ROOT="${pkgdir}" + + # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE + pushd "$srcdir/build-${_arch}/lib" + find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} + + popd + pushd "$srcdir/build-${_arch}/plugins" + find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} + + popd + + if isStatic; then + # The static release contains only the static libs itself but relies on the + # shared release for Qt5Bootstrap library and tools (qmake, uic, ...). + + # drop Qt5Bootstrap and libraries which are only provided as static lib + # and hence already present in shared build (such as Qt5OpenGLExtensions) + rm -f \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5AccessibilitySupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5DeviceDiscoverySupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5EdidSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5EventDispatcherSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5FbSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5FontDatabaseSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformCompositorSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5ThemeSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \ + "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5WindowsUIAutomationSupport* \ + "${pkgdir}/usr/${_arch}/lib/"libQt5Bootstrap* \ + + # ensure config files don't conflict with shared version + pushd "${pkgdir}/usr/${_arch}/lib/cmake" + for cmake_dir in $(find . ! -path . -type d ! -name 'Static*'); do + mkdir -p "./Static${cmake_dir:2}"; + mv "${cmake_dir}/"* "./Static${cmake_dir:2}"; + rm -r "${cmake_dir}" + done + rm -r "./StaticQt5OpenGLExtensions" + popd + rm "${pkgdir}/usr/${_arch}/lib/pkgconfig/StaticQt5OpenGLExtensions.pc" + + # create links to static plugins in lib directory + pushd "${pkgdir}/usr/${_arch}/lib/" && ln -s "./qt/plugins/"*/*.a . && popd + + # keep a couple pri files not found in base + mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules/qt_plugin_"*.pri "${pkgdir}/usr/${_arch}" + + # delete duplicate files that are in the base package + rm -fR "${pkgdir}/usr/${_arch}/"{include,share} + rm -fR "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs} + + # move pri files back + mkdir -p "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules" + mv "${pkgdir}/usr/${_arch}/"*.pri "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules" + + else # shared version + # remove DLLs from libdir (DLLs are installed in both bindir and libdir, one copy is sufficient) + find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name "*.dll" -exec rm {} \; + + # create symlinks for tools + mkdir -p "${pkgdir}/usr/bin" + for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do + ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/usr/bin/${_arch}-${tool}-qt5" + done + fi + + # drop QMAKE_PRL_BUILD_DIR because reference the build dir + find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; + + # remove doc + rm -rf "${pkgdir}/usr/${_arch}/share/doc" + + # remove prl files for debug version + if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then + for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do + [ -f "${file%d*}${file##*d}" ] && rm "${file}"; + done + fi + + # replace library path in *.prl files so it points to the installed location and not the build directory + echo "replace: s:${PWD%/*}/build-${_arch}/lib:/usr/${_arch}/lib:g" + find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:${PWD%/*}/build-${_arch}/lib:/usr/${_arch}/lib:g" {} \; + + # strip binaries, remove unuseful files + if ! isStatic; then + strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl] + strip --strip-unneeded "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"{,DBus}.so.${pkgver} + fi + if isStatic || [[ $NO_EXECUTABLES ]]; then + find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete + else + find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-all {} \; + fi + find "${pkgdir}/usr/${_arch}" \( -name '*.bat' -o -name '*.def' -o -name '*.exp' \) -delete + find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \; + find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \; + done +} |