diff options
author | Eric Hameleers <alien@slackware.com> | 2018-01-18 18:21:16 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-01-18 18:21:16 +0000 |
commit | 2f160bc5c470a9245a1e641ad86db3a2ba19fa41 (patch) | |
tree | 501f453cfffb25b2e90843e60eee28b396e61d6b /poppler-qt5/build | |
parent | 8ed90c532965c9fcdd34f72c2504f46583f61f96 (diff) | |
download | asb-2f160bc5c470a9245a1e641ad86db3a2ba19fa41.tar.gz asb-2f160bc5c470a9245a1e641ad86db3a2ba19fa41.tar.xz |
Initial revision
Diffstat (limited to 'poppler-qt5/build')
-rwxr-xr-x | poppler-qt5/build/poppler-qt5.SlackBuild | 140 | ||||
-rw-r--r-- | poppler-qt5/build/slack-desc | 19 |
2 files changed, 159 insertions, 0 deletions
diff --git a/poppler-qt5/build/poppler-qt5.SlackBuild b/poppler-qt5/build/poppler-qt5.SlackBuild new file mode 100755 index 00000000..00fd1a29 --- /dev/null +++ b/poppler-qt5/build/poppler-qt5.SlackBuild @@ -0,0 +1,140 @@ +#!/bin/sh + +# Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2017, 2018 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. + + +# Modified 2016, 2017, 2018 by Eric Hameleers <alien@slackware.com> +# Package only contains Qt5 support libraries. + +PKGNAM=poppler-qt5 +SRCNAM=poppler +VERSION=${VERSION:-0.62.0} +BUILD=${BUILD:-1} +TAG=${TAG:-alien} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + 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" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + 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 || exit 1 +rm -rf ${SRCNAM}-${VERSION} +tar xvf $CWD/${SRCNAM}-$VERSION.tar.?z* || exit 1 +cd ${SRCNAM}-$VERSION || exit 1 + +# Force use of python2: +sed -i -e "s,python,python2," make-glib-api-docs + +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 {} \; + +mkdir build +cd build + +# Adding " -std=c++11" to CXXFLAGS is needed for compiling against Qt >= 5.7: +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -std=c++11" \ +cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_QT4=OFF \ + -DENABLE_QT5=ON \ + -DENABLE_XPDF_HEADERS=ON \ + -DENABLE_CMS=lcms2 \ + -DENABLE_DCTDECODER=libjpeg \ + -DENABLE_GTK_DOC=ON \ + -DENABLE_LIBOPENJPEG=openjpeg2 \ + -DENABLE_XPDF_HEADERS=ON \ + -DENABLE_ZLIB=ON \ + .. || exit 1 + +make $NUMBOBS || make || exit 1 + +# We only install the qt5 related stuff, +# the rest comes with the poppler package of Slackware: +make -C qt5 install DESTDIR=$PKG || exit 1 + +# Install the pkgconfig file: +install -m755 -d ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig +install -m644 poppler-qt5.pc ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig/ + +# Back to source tarball root directory: +cd .. + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a AUTHORS COPYING* INSTALL NEWS README* TODO \ + $PKG/usr/doc/${PKGNAM}-$VERSION +( cd $PKG/usr/doc/${PKGNAM}-$VERSION + ln -s /usr/share/gtk-doc/html/poppler html ) + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD$TAG.txz + diff --git a/poppler-qt5/build/slack-desc b/poppler-qt5/build/slack-desc new file mode 100644 index 00000000..6d4767a5 --- /dev/null +++ b/poppler-qt5/build/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 ':'. + + |-----handy-ruler------------------------------------------------------| +poppler-qt5: poppler (a library for rendering PDF documents) +poppler-qt5: +poppler-qt5: Poppler is a library based on the xpdf PDF viewer developed by Derek +poppler-qt5: Noonburg of Glyph and Cog, LLC. Since xpdf does not provide a shared +poppler-qt5: library, whenever a flaw was found potentially dozens of applications +poppler-qt5: incorporating code from xpdf would have to be patched. By providing +poppler-qt5: a centralized PDF library this duplicated effort will be eliminated. +poppler-qt5: +poppler-qt5: +poppler-qt5: Homepage: http://poppler.freedesktop.org +poppler-qt5: |