SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "epdfview-cups"

# SliTaz package receipt.

PACKAGE="epdfview-cups"
VERSION="0.1.8"
CATEGORY="office"
SHORT_DESC="Lightweight PDF document viewer using Poppler and Cups."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
SOURCE="epdfview"
TARBALL="$SOURCE-$VERSION.tar.gz"
WEB_SITE="https://github.com/JotaRandom/epdfview"
WGET_URL="https://github.com/jristz/epdfview/archive/$VERSION.tar.gz"
PROVIDE="epdfview:cups"

DEPENDS="gtk+ poppler glib libpng cups xorg-libXdamage gcc-lib-base libcomerr3"
BUILD_DEPENDS="gtk+-dev poppler-dev poppler cups cups-dev"

# What is the latest version available today?
current_version()
{
    wget -O - $WEB_SITE/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
        sed -i 's/FORMAT_RGB24/FORMAT_ARGB32/g' src/PDFDocument.cxx
    sed -i 's/<config.h>/&\n#include <stdio.h>\n#define g_fopen fopen/' \
        src/epdfview.h
    find . -name '*.[ch]*' | xargs sed -i 's|<glib/.*h|<glib.h|'
    # cups 1.6 support
    sed -i -e '/ippNew/{NNNNNNNNNd}' \
        -e 's/state->values\[0\].integer/ippGetInteger(state, 0)/' \
        -e 's/location->values\[0\].string.text/ippGetString(location, 0, NULL)/' \
        -e 's/.*IPP_TAG_KEYWORD.*/    ipp_t *request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);\n&/' \
        src/PrintPter.cxx
    patch -p1 -i $stuff/no-stock-icons.patch
    ./configure \
        --with-cups \
        $CONFIGURE_ARGS &&
    make &&    make install
    cp -f $stuff/*.desktop $install/usr/share/applications
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cook_copy_files epdfview *.desktop *.xml
    mkdir -p $fs/usr/share/icons/hicolor/48x48/apps
    cp $install/usr/share/epdfview/pixmaps/icon_epdfview-48.png \
        $fs/usr/share/icons/hicolor/48x48/apps/epdfview.png
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)