summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD178
1 files changed, 78 insertions, 100 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 5463dce483cb..2d0c3914f73c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,12 +5,18 @@
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
-# See the comment below for additional dependencies/functionality.
+# See the comments to enable further dependencies/functionality.
+
+# Includes dynamic and static versions; if only one version is requried, just
+# set $NO_STATIC_LIBS or $NO_SHARED_LIBS.
+
+# All patches are managed at https://github.com/Martchus/qtwebkit
+# Note: most patches are originally from http://pkgs.fedoraproject.org/git/rpms/mingw-qt5-qtwebkit.git
_qt_module=qtwebkit
pkgname=mingw-w64-qt5-webkit
-pkgver=5.6.1
-pkgrel=1
+pkgver=5.7.0
+pkgrel=3
arch=('any')
pkgdesc="Classes for a WebKit2 based implementation and a new QML API (mingw-w64)"
depends=('mingw-w64-qt5-declarative'
@@ -26,128 +32,100 @@ depends=('mingw-w64-qt5-declarative'
'mingw-w64-icu'
'mingw-w64-sqlite'
'mingw-w64-libwebp')
-# these dependencies will enable further functionality
+# These dependencies will enable further functionality
#depends+=('mingw-w64-webchannel')
#depends+=('mingw-w64-gst-plugins-base')
#optdepends+=('mingw-w64-gst-plugins-good: Webm codec support')
makedepends=('mingw-w64-gcc' 'python' 'gperf' 'ruby' 'mingw-w64-pkg-config')
options=('!strip' '!buildflags' 'staticlibs')
-license=("custom, FDL, GPL3, LGPL")
+license=('GPL3' 'LGPL' 'FDL' 'custom')
url="https://www.qt.io/"
_pkgfqn="${_qt_module}-opensource-src-${pkgver}"
groups=(mingw-w64-qt mingw-w64-qt5)
source=("https://download.qt.io/community_releases/${pkgver:0:3}/${pkgver}/${_pkgfqn}.tar.xz"
- qt5-qtwebkit-dont-depend-on-icu.patch
- qt5-qtwebkit-enable-pkgconfig-support-for-win32-target.patch
- qt5-qtwebkit-fix-compatibility-with-latest-angle.patch
- qt5-qtwebkit-use-correct-icu-libs.patch
- qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch
- qtwebkit-dont-use-bundled-angle-libraries.patch
- qtwebkit-opensource-src-5.0.1-debuginfo.patch
- revert-qt4-unicode-removal.patch
- webkit-commit-151422.patch)
-md5sums=('9ea7cb557375ba2fc7c62742c522d093'
- '37dd6b694e1e178aa8b1815f7fe3537d'
- 'ac574de962545d6a9e975b4db63c3e09'
- '4ad37c7d4dda8e77bb0a25c671f79adc'
- '228f28df2b10e417a325176f7878ebe1'
- '18b21fd8e9517f48db7748544d2aa92f'
- 'f452210683386f9c28f04d7dea0ecfc7'
- '6aba6468efafb64943887079e258b799'
- '4e374836f26853b4d82be0e87aa584a5'
- 'c36fe581e0f3b61cef19415782b257ca')
-
-_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+ '0001-Use-correct-ICU-libs.patch'
+ '0002-Use-pkg-config.patch'
+ '0003-Use-system-ANGLE-rather-than-bundled-version.patch'
+ '0004-Prevent-symbols-not-being-exported-in-Qt5WebKit.dll.patch'
+ '0005-Build-with-smaller-debug-info.patch'
+ '0006-Establish-compatibility-with-latest-ANGLE.patch'
+ '0007-Include-intrin.h-for-declaration-of-_mm_mfence.patch'
+ '0008-Link-against-ANGLE-even-if-Qt-is-configured-not-to.patch'
+ '0009-Fixed-crash-probably-miscompilation-with-MinGW-w64-5.patch')
+sha256sums=('c7a3253cbf8e6035c54c3b08d8a9457bd82efbce71d4b363c8f753fd07bd34df'
+ '922c12e3726cfcecd99d773a3135ea05a36bd325c24cf07463d21f8778d5c5a0'
+ '2f7887173f777c6fb5ff49a37e1015b8e1d8f22f692917b0b0a24e22ad3022c5'
+ '8c0dc51d02814577c4ac557493a2b7d7b74311649bf3c91072e798fd7b2d7a98'
+ '3e9893be250bcadf2a3437f2fd1cc0d454211e315071939d9ebf27f00d600253'
+ 'cc0c239676f747b9c30fe1b774a5208fde5650f02f8388379d164d9ccaccab17'
+ 'b87eaa3c18764347f04a8d5fcae322052a194508ea0ba6eb2cd69db6385633c1'
+ '4da5c29a054a8a087b95f4a7788aee83a1a4388efa948150f8cf4e233ec426bc'
+ '79587af527bbb80d7954de6fb23c279493166e88c0f44e3aaa956964b04fbd3e'
+ '8302e606050da917b01fa3af8388c0d7ae6ff999129b8eb2ed27bcf5d4d37dd9')
+
+_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
+
+# Disable building static version: building static Qt WebKit is not supported since Qt 4.7
+NO_STATIC_LIBS=true
+
+[[ $NO_STATIC_LIBS ]] || \
+ makedepends+=('mingw-w64-qt5-base-static') \
+ optdepends+=('mingw-w64-qt5-base-static: use of static libraries') \
+ _configurations+=('CONFIG+=static')
+[[ $NO_SHARED_LIBS ]] || \
+ _configurations+=('CONFIG+=shared')
prepare() {
cd "${srcdir}/${_pkgfqn}"
- # note: most patches are originally from http://pkgs.fedoraproject.org/git/rpms/mingw-qt5-qtwebkit.git
- # however, I needed to update most of them in order to update to 5.6.0 and to use the latest ANGLE
-
- # The ICU libraries used for cross-compilation are named exactly the same as their native Linux counterpart
- patch -p1 -b -i ../qt5-qtwebkit-use-correct-icu-libs.patch
-
- # By default the build system assumes that pkg-config isn't used for the win32 target
- # However, we're using it in the Fedora MinGW toolchain so make sure it is used automatically
- patch -p0 -b -i ../qt5-qtwebkit-enable-pkgconfig-support-for-win32-target.patch
-
- # Make sure the bundled copy of the ANGLE library isn't used
- patch -p1 -b -i ../qtwebkit-dont-use-bundled-angle-libraries.patch
-
- # qt5-webkit depends on qt5-base with ICU support.
- # As ICU support in qtbase also introduces over 20MB of additional dependency
- # bloat (and the qtbase libraries itself are only 13MB) the decision was made
- # to build qtbase without ICU support.
- # Make sure qtwebkit doesn't depend on a qtbase with ICU support any more
- patch -p1 -b -i ../qt5-qtwebkit-dont-depend-on-icu.patch
-
- # Undo the removal of the old Qt4 based unicode support
- # as we want to use it instead of the bloated ICU
- patch -p1 -R -b -i ../revert-qt4-unicode-removal.patch
-
- # WebKit svn commit 136242 implemented a split into QtWebKit and QtWebKitWidgets
- # Due to this change a static library named WebKit1.a is created first.
- # After this a shared library is created named Qt5WebKit.dll which contains
- # the contents of this static library and some other object files.
- # However, various symbols in the static library are expected to be exported
- # in the Qt5WebKit.dll shared library. As static libraries normally don't care
- # about exported symbols (everything is exported after all) the decoration
- # attribute Q_DECL_EXPORT won't be set.
- # This results in undefined references when trying to link the QtWebKitWidgets
- # shared library (which depends on various symbols which aren't exported properly
- # in the Qt5WebKit.dll shared library)
- patch -p0 -b -i ../qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch
-
- # Smaller debuginfo s/-g/-g1/ (debian uses -gstabs) to avoid 4gb size limit
- patch -p1 -b -i ../qtwebkit-opensource-src-5.0.1-debuginfo.patch
-
- # Revert commit 151422 to fix a build failure which happens because we're not using ICU
- patch -p1 -R -b -i ../webkit-commit-151422.patch
-
- # Fix compatibility issue when using the latest ANGLE
- patch -p1 -b -i ../qt5-qtwebkit-fix-compatibility-with-latest-angle.patch
+ # 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 bundled copy of the ANGLE libraries isn't used
rm -rf Source/ThirdParty/ANGLE
}
build() {
- unset PKG_CONFIG_PATH
cd "${srcdir}/${_pkgfqn}"
+ unset PKG_CONFIG_PATH
+ local default_cpath="$CPATH"
for _arch in ${_architectures}; do
- mkdir -p build-${_arch} && pushd build-${_arch}
-
- # Since Source/ThirdParty/ANGLE has been removed ensure files
- # from system ANGLE can be included (patches from Fedora don't help
- # here because Fedora uses other paths)
- export CPATH="$CPATH:/usr/$_arch/include:/usr/$_arch/include/GLSLANG"
-
- # SH_GLSL_OUTPUT has been renamed to SH_GLSL_COMPATIBILITY_OUTPUT
- # in the latest ANGLE version so I just add a definition for backward compatibility
-
- # intrin.h needs to be included otherwise declaration of _mm_mfence is missing
-
- ${_arch}-qmake-qt5 \
- "QMAKE_CXXFLAGS+=-Wno-c++0x-compat" \
- "QMAKE_CXXFLAGS+='-include /usr/i686-w64-mingw32/include/intrin.h'" \
- "DEFINES+=SH_GLSL_OUTPUT=SH_GLSL_COMPATIBILITY_OUTPUT" \
- ../WebKit.pro
- make
- popd
+ for _config in "${_configurations[@]}"; do
+ msg2 "Building ${_config##*=} version for ${_arch}"
+ mkdir -p build-${_arch}-${_config##*=} && pushd build-${_arch}-${_config##*=}
+ # Since Source/ThirdParty/ANGLE has been removed ensure files from system ANGLE can be included
+ export CPATH="${default_cpath}:/usr/$_arch/include:/usr/$_arch/include/GLSLANG"
+
+ ${_arch}-qmake-qt5 \
+ "QMAKE_CXXFLAGS+=-Wno-c++0x-compat" \
+ ../WebKit.pro
+ make
+ popd
+ done
done
}
package() {
+ cd "${srcdir}/${_pkgfqn}"
+
for _arch in ${_architectures}; do
- cd "${srcdir}/${_pkgfqn}/build-${_arch}"
- make INSTALL_ROOT="${pkgdir}" install
-
- # The .dll's are installed in both bindir and libdir
- # One copy of the .dll's is sufficient
- rm -f "${pkgdir}/usr/${_arch}/lib/"*.dll
- find "${pkgdir}/usr/${_arch}" -name "*.exe" -o -name "*.bat" -o -name "*.def" -o -name "*.exp" -o -name '*.prl' | xargs -rtl1 rm
- find "${pkgdir}/usr/${_arch}" -name "*.dll" -exec ${_arch}-strip --strip-unneeded {} \;
- find "${pkgdir}/usr/${_arch}" -name "*.a" -o -name "*.dll" | xargs -rtl1 ${_arch}-strip -g
+ for _config in "${_configurations[@]}"; do
+ pushd build-${_arch}-${_config##*=}
+
+ make INSTALL_ROOT="$pkgdir" install
+ find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name "*.dll" -exec rm {} \;
+ [ "$NO_STATIC_EXECUTABLES" -a "${_config##*=}" = static -o "$NO_EXECUTABLES" ] && \
+ find "${pkgdir}/usr/${_arch}" -name "*.exe" -exec rm {} \; || \
+ find "${pkgdir}/usr/${_arch}" -name "*.exe" -exec ${_arch}-strip --strip-all {} \;
+ find "${pkgdir}/usr/${_arch}" -name "*.dll" -exec ${_arch}-strip --strip-unneeded {} \;
+ find "${pkgdir}/usr/${_arch}" -name "*.a" -exec ${_arch}-strip -g {} \;
+ [[ -d "${pkgdir}/usr/${_arch}/lib/qt/bin/" ]] && \
+ find "${pkgdir}/usr/${_arch}/lib/qt/bin/" -exec strip --strip-all {} \;
+ find "${pkgdir}/usr/${_arch}/lib/" -iname "*.so.$pkgver" -exec strip --strip-unneeded {} \;
+ popd
+ done
done
}
+