libraries/poppler-qt5: Added (Qt5 bindings for poppler).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Larry Hajali 2013-12-23 13:58:07 +07:00 committed by Robby Workman
parent 9e72f5fac1
commit 5e8b8382a4
5 changed files with 169 additions and 0 deletions

View file

@ -0,0 +1,4 @@
Poppler is a PDF rendering library based on the xpdf-3.0 code base.
This package provides the Qt5 bindings for the version of poppler
that comes with Slackware.

View file

@ -0,0 +1,27 @@
diff -up poppler-0.24.2/configure.ac.mocversiongrep poppler-0.24.2/configure.ac
--- poppler-0.24.2/configure.ac.mocversiongrep 2013-10-18 09:51:24.223114884 -0500
+++ poppler-0.24.2/configure.ac 2013-10-18 09:54:33.408681067 -0500
@@ -661,20 +661,20 @@ if test x$enable_poppler_qt5 = xyes; the
AC_CHECK_TOOL(MOCQT5, moc)
AC_MSG_CHECKING([for Qt5 moc])
mocversion=`$MOCQT5 -v 2>&1`
- mocversiongrep=`echo $mocversion | grep "Qt 5"`
+ mocversiongrep=`echo $mocversion | grep " 5\."`
if test x"$mocversiongrep" != x"$mocversion"; then
AC_MSG_RESULT([no])
# moc was not the qt5 one, try with moc-qt5
AC_CHECK_TOOL(MOCQT52, moc-qt5)
AC_MSG_CHECKING([for Qt5 moc-qt5])
mocversion=`$MOCQT52 -v 2>&1`
- mocversiongrep=`echo $mocversion | grep "Qt 5"`
+ mocversiongrep=`echo $mocversion | grep " 5\."`
if test x"$mocversiongrep" != x"$mocversion"; then
AC_CHECK_TOOL(QTCHOOSER, qtchooser)
AC_MSG_CHECKING([for qtchooser])
qt5tooldir=`QT_SELECT=qt5 qtchooser -print-env | grep QTTOOLDIR | cut -d '=' -f 2 | cut -d \" -f 2`
mocversion=`$qt5tooldir/moc -v 2>&1`
- mocversiongrep=`echo $mocversion | grep "Qt 5"`
+ mocversiongrep=`echo $mocversion | grep " 5\."`
if test x"$mocversiongrep" != x"$mocversion"; then
# no valid moc found
enable_poppler_qt5=no;

View file

@ -0,0 +1,109 @@
#!/bin/sh
# Slackware build script for poppler-qt5
# Copyright 2013 Larry Hajali <larryhaja[at]gmail[dot]com>
# 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.
PRGNAM=poppler-qt5
VERSION=${VERSION:-0.24.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM/-*/}-$VERSION
tar xvf $CWD/${PRGNAM/-*/}-$VERSION.tar.xz
cd ${PRGNAM/-*/}-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p1 < $CWD/poppler-0.24.2-mocversiongrep.patch
autoreconf -if
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--enable-xpdf-headers \
--enable-poppler-qt4 \
--enable-poppler-qt5 \
--disable-silent-rules \
--enable-cairo-output \
--mandir=/usr/man \
--disable-static \
--without-testdatadir \
--enable-zlib \
--build=$ARCH-slackware-linux
make
make -C qt5 install DESTDIR=$PKG
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
install -m 0644 $PRGNAM.pc $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="poppler-qt5"
VERSION="0.24.3"
HOMEPAGE="http://poppler.freedesktop.org/"
DOWNLOAD="http://poppler.freedesktop.org/poppler-0.24.3.tar.xz"
MD5SUM="31299f26a998029c85295dbbf4c30beb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="qt5"
MAINTAINER="Larry Hajali"
EMAIL="larryhaja[at]gmail[dot]com"

View file

@ -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------------------------------------------------------|
poppler-qt5: poppler-qt5 (Qt5 bindings for poppler)
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: Homepage: http://poppler.freedesktop.org/
poppler-qt5:
poppler-qt5: