opt/xpdf/Pkgfile

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2007-05-15 21:19:29 +02:00
# Description: PDF viewer
# URL: https://www.xpdfreader.com
2010-02-28 02:58:28 +01:00
# Maintainer: Thomas Penteker, tek at serverop dot de
# Depends on: qt5
# Optional: cups paper
2007-05-15 21:19:29 +02:00
name=xpdf
2020-04-15 16:46:03 +02:00
version=4.02
2020-12-05 06:58:52 +01:00
release=2
source=(https://dl.xpdfreader.com/$name-$version.tar.gz
xpdf-automagic.patch
xpdf-visibility.patch
xpdf-shared-libs.patch)
2007-05-15 21:19:29 +02:00
build() {
CXXFLAGS+=' -Wno-deprecated -Wno-deprecated-declarations'
2020-12-05 06:58:52 +01:00
patch -d $name-$version -p1 -i $SRC/xpdf-automagic.patch
patch -d $name-$version -p1 -i $SRC/xpdf-visibility.patch
patch -d $name-$version -p1 -i $SRC/xpdf-shared-libs.patch
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D A4_PAPER=ON \
-D XPDFWIDGET_PRINTING="$(prt-get isinst cups >/dev/null && echo ON || echo OFF)" \
-D WITH_LIBPAPER="$(prt-get isinst paper >/dev/null && echo ON || echo OFF)"
cmake --build build -- xpdf
DESTDIR=$PKG cmake --install build/xpdf-qt
2007-05-15 21:19:29 +02:00
}