contrib/scribus/Pkgfile

65 lines
1.9 KiB
Plaintext

# Description: layout tool
# URL: http://scribus.net
# Maintainer: Thomas Penteker, tek at serverop dot de
# Depends on: boost cups harfbuzz-icu hunspell libart_lgpl qt5
name=scribus
version=1.5.5
release=1
source=(https://downloads.sourceforge.net/$name/$name-$version.tar.xz
https://github.com/scribusproject/scribus/commit/6db15ec1.patch
https://poppler.freedesktop.org/poppler-0.82.0.tar.xz)
# snatched from contrib/inkscape, thx romster :>
poppler() {
#-boehm-gc boost gsl gtkmm poppler-glib popt
#+cmake cairo lcms2 boehm-gc boost gsl gtkmm popt
cd poppler-0.82.0
cmake . \
-DCMAKE_INSTALL_PREFIX=$SRC/poppler \
-DCMAKE_INSTALL_LIBDIR=$SRC/poppler/lib \
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-DENABLE_UTILS=ON \
-DENABLE_SPLASH=ON \
-DENABLE_CPP=ON \
-DENABLE_GLIB=ON \
-DENABLE_QT5=OFF \
-DENABLE_ZLIB=ON \
-DENABLE_CMS=lcms2 \
-DENABLE_LIBOPENJPEG=none \
-DWITH_NSS3=OFF
make
make install
install -D -t $PKG/usr/lib/ $SRC/poppler/lib/libpoppler.so.92
export CXXFLAGS+=" -I$SRC/poppler/include -I$SRC/poppler/include/poppler"
export PKG_CONFIG_PATH="$SRC/poppler/lib/pkgconfig:$PKG_CONFIG_PATH"
cd $SRC
}
build() {
# build a static poppler to use with the build
# scribus is using the internal poppler api which
# is known to break every other release
poppler
cd $name-$version
# fix building against poppler 0.82.0
patch -Np1 -i $SRC/6db15ec1.patch
sed \
-e 's|#!/usr/bin/python|#!/usr/bin/python3|' \
-e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \
-i scribus/plugins/scriptplugin/{samples,scripts}/*
cmake . -DCMAKE_INSTALL_PREFIX=/usr
make
make DESTDIR=$PKG install
rm -rf $PKG/usr/share/man/de
rm -rf $PKG/usr/share/man/pl
rm -rf $PKG/usr/share/doc
rm -rf $PKG/usr/share/$name/scripts/{ChangeLog,NEWS,TODO}
rm -rf $PKG/usr/share/scribus/dicts/README_*
}