From 312a476890ae830b91ceda3773f9a858110e7586 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 20 Apr 2016 11:13:38 +0200 Subject: Refresh the 'deps' for upcoming KDE 5_16.04. New packages: - deps/ninja (needed for easier compilation of qt5-webkit) - deps/qt5-webkit (sources have been split off qt5) --- deps/qt5-webkit/.url | 1 + deps/qt5-webkit/doinst.sh | 9 ++ deps/qt5-webkit/patches/qt5-webkit.pthread.patch | 32 +++++ deps/qt5-webkit/qt5-webkit.SlackBuild | 158 +++++++++++++++++++++++ deps/qt5-webkit/slack-desc | 19 +++ 5 files changed, 219 insertions(+) create mode 100644 deps/qt5-webkit/.url create mode 100644 deps/qt5-webkit/doinst.sh create mode 100644 deps/qt5-webkit/patches/qt5-webkit.pthread.patch create mode 100755 deps/qt5-webkit/qt5-webkit.SlackBuild create mode 100644 deps/qt5-webkit/slack-desc (limited to 'deps/qt5-webkit') diff --git a/deps/qt5-webkit/.url b/deps/qt5-webkit/.url new file mode 100644 index 0000000..126a427 --- /dev/null +++ b/deps/qt5-webkit/.url @@ -0,0 +1 @@ +http://download.qt.io/community_releases/5.6/5.6.0/qtwebkit-opensource-src-5.6.0.tar.xz diff --git a/deps/qt5-webkit/doinst.sh b/deps/qt5-webkit/doinst.sh new file mode 100644 index 0000000..3e5691a --- /dev/null +++ b/deps/qt5-webkit/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/deps/qt5-webkit/patches/qt5-webkit.pthread.patch b/deps/qt5-webkit/patches/qt5-webkit.pthread.patch new file mode 100644 index 0000000..53d5439 --- /dev/null +++ b/deps/qt5-webkit/patches/qt5-webkit.pthread.patch @@ -0,0 +1,32 @@ +From 5f359baacdf92fabcece83f0a2b30f74c7c02a3c Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Mon, 22 Feb 2016 10:57:32 +0100 +Subject: [PATCH] Fix linking with libpthread + +WebKit use libpthread directly but is depending on other qt modules +causing it to be linked against, which might break unless -lpthread +is last. Instead just add it explicitly after the static libraries. + +Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33 +Reviewed-by: Simon Hausmann +(cherry picked from commit 5dd4bb67cfce812fd7686e43616e2069f354a7df) +Reviewed-by: Allan Sandfeld Jensen +--- + Tools/qmake/mkspecs/features/default_post.prf | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf +index 67276b7..39bb3f7 100644 +--- a/Tools/qmake/mkspecs/features/default_post.prf ++++ b/Tools/qmake/mkspecs/features/default_post.prf +@@ -201,6 +201,7 @@ needToLink() { + linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir)) + LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs) + } ++ posix:!darwin: LIBS += -lpthread + } + + creating_module { +-- +2.7.1 + diff --git a/deps/qt5-webkit/qt5-webkit.SlackBuild b/deps/qt5-webkit/qt5-webkit.SlackBuild new file mode 100755 index 0000000..5c818f6 --- /dev/null +++ b/deps/qt5-webkit/qt5-webkit.SlackBuild @@ -0,0 +1,158 @@ +#!/bin/sh + +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Derived from the qt5.SlackBuild + +# Modifications for qt5-webkit 5.6.0 2016 by Eric Hameleers, Eindhoven, NL + +PKGNAM=qt5-webkit +VERSION=${VERSION:-5.6.0} +BUILD=${BUILD:-1} + +NUMJOBS=${NUMJOBS:--j7} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i486 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + SLKLDFLAGS="" + SLKLDFLAGS="-L/usr/lib64" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + # To prevent "qatomic_armv6.h error: output number 2 not directly addressable" + # More permanent solution is to patch gcc: + # http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731 + SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" +fi + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-${PKGNAM} + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf qtwebkit-opensource-src-$VERSION +echo "Extracting qtwebkit-opensource-src-$VERSION.tar.xz" +tar xf $CWD/qtwebkit-opensource-src-$VERSION.tar.xz || exit 1 +cd qtwebkit-opensource-src-$VERSION || exit 1 + +# Fix linking to pthread: +cat $CWD/patches/qt5-webkit.pthread.patch | patch -p1 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Use -reduce-relocations only on i?86 and x86_64 architextures. +# https://bugreports.qt-project.org/browse/QTBUG-36129 +if echo $ARCH | grep -q '\(i.86\|x86_64\)' 2>/dev/null; then + RELOCATIONS="-reduce-relocations" +else + RELOCATIONS="" +fi + +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +export OPENSOURCE_CXXFLAGS="$SLKCFLAGS" +export QTDIR="/usr/lib$LIBDIRSUFFIX/qt5" +export LD_LIBRARY_PATH="${QTDIR}/qtbase/lib:${QTDIR}/qttools/lib:${LD_LIBRARY_PATH}" + +mkdir build +cd build + qmake-qt5 .. + make || exit 1 + make install INSTALL_ROOT=$PKG || exit 1 +cd .. + +# Strip binaries the Slackware way: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Fix internal linking for Qt5WebKit.pc , thanks to Larry Hajali's SBo script: +sed -i \ + -e "s|-Wl,-whole-archive -lWebKit1 -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WebKit[^ ]* ||" \ + -e "s|-Wl,-whole-archive -lWebKit2 -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WebKit2[^ ]* ||" \ + -e "s|-Wl,-whole-archive -lWebCore -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WebCore[^ ]* ||" \ + -e "s|-Wl,-whole-archive -lANGLE -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/ThirdParty/ANGLE[^ ]* ||" \ + -e "s|-Wl,-whole-archive -lJavaScriptCore -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/JavaScriptCore[^ ]* ||" \ + -e "s|-Wl,-whole-archive -lWTF -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WTF[^ ]* ||" \ + -e "s|-Wl,-whole-archive -lleveldb -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/ThirdParty/leveldb[^ ]* ||" \ + $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebKit.pc + +# Fix the path in prl files: +find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \ + -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \; + +# Fix the qmake path in pri file: +sed -i "s,${QTDIR}/qtbase,/usr/lib${LIBDIRSUFFIX}/qt5," \ + $PKG/usr/lib${LIBDIRSUFFIX}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + ChangeLog* VERSION \ + $PKG/usr/doc/$PKGNAM-$VERSION +if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt5/doc/html ]; then + ( cd $PKG/usr/doc/$PKGNAM-$VERSION + ln -sf /usr/lib${LIBDIRSUFFIX}/qt5/doc/html . + ) +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz + diff --git a/deps/qt5-webkit/slack-desc b/deps/qt5-webkit/slack-desc new file mode 100644 index 0000000..baba7e8 --- /dev/null +++ b/deps/qt5-webkit/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +qt5-webkit: qt5-webkit (Qt based web browser engine) +qt5-webkit: +qt5-webkit: Qtwebkit is a Qt based web browser engine. +qt5-webkit: This package contains the Qt5 based version. +qt5-webkit: +qt5-webkit: Homepage: http://qt-project.org +qt5-webkit: +qt5-webkit: +qt5-webkit: +qt5-webkit: +qt5-webkit: -- cgit v1.2.3