Browse Source

l/qt5-webkit: Added qt5-webkit-5.7.1.

slackware-14.2
Damien Goutte-Gattat 5 years ago
parent
commit
03f57d410b
  1. 9
      l/qt5-webkit/doinst.sh
  2. 178
      l/qt5-webkit/qt5-webkit.SlackBuild
  3. 1
      l/qt5-webkit/qtwebkit-opensource-src-5.7.1.tar.xz.sha256
  4. 12
      l/qt5-webkit/slack-desc

9
l/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

178
l/qt5-webkit/qt5-webkit.SlackBuild

@ -0,0 +1,178 @@
#!/bin/sh
# Build script for Slackware
# Copyright (C) 2017 Damien Goutte-Gattat
# Copyright 2006-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.
#
# Adapted from Eric Hameleers' script.
#
# Latest QtWebKit sourcecode is available at: <http://www.qt.io/>.
#
# Depends: l/qt5
# Source package infos
NAMESRC=${NAMESRC:-qtwebkit}
VERSION=${VERSION:-5.7.1}
ARCHIVE=${ARCHIVE:-$NAMESRC-opensource-src-$VERSION.tar.xz}
WGET=${WGET:-https://download.qt.io/community_releases/5.7/$VERSION/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-qt5-webkit}
BUILD=${BUILD:-1}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity check
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exist or is not a directory!"
exit 1
fi
# Compilation flags
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
# 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"
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
mkdir $NAME/build
cd $NAME/build
qmake-qt5 ..
make -j $JOBS
make install INSTALL_ROOT=$PKG
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/' {} \;
# Add a documentation directory:
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
cp -a \
ChangeLog* VERSION \
$PKG/usr/doc/$NAMEPKG-$VERSION
if [ -d $PKG/usr/lib$LIBDIRSUFFIX/qt5/doc/html ]; then
( cd $PKG/usr/doc/$NAMEPKG-$VERSION
ln -sf /usr/lib$LIBDIRSUFFIX/qt5/doc/html .
)
fi
# Copy slack-desck and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
qt5
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $TMP/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

1
l/qt5-webkit/qtwebkit-opensource-src-5.7.1.tar.xz.sha256

@ -0,0 +1 @@
a46cf7c89339645f94a5777e8ae5baccf75c5fc87ab52c9dafc25da3327b5f03 qtwebkit-opensource-src-5.7.1.tar.xz

12
l/qt5-webkit/slack-desc

@ -0,0 +1,12 @@
|-----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:
Loading…
Cancel
Save