34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
# Description: PDF viewer
|
|
# URL: https://www.xpdfreader.com
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
|
# Depends on: qt5
|
|
# Optional: cups paper
|
|
|
|
name=xpdf
|
|
version=4.03
|
|
release=1
|
|
source=(https://dl.xpdfreader.com/$name-$version.tar.gz
|
|
xpdf-automagic.patch
|
|
xpdf-visibility.patch
|
|
xpdf-shared-libs.patch)
|
|
|
|
build() {
|
|
CXXFLAGS+=' -Wno-deprecated -Wno-deprecated-declarations'
|
|
|
|
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
|
|
}
|