On Wed, Sep 27, 2017 at 02:22:19PM +0200, Roland Hieber wrote: > This is quite a version bump, spanning six years of poppler development. > Upstream now provides data for rendering cyrillic languages in the > package poppler-data, but this dependency is only detected at compile > time, so make sure the build order is right. > > Some applications require the old xpdf headers, the CPP wrapper or CMYK > support, so make these configure options selectable. Same for the Splash > backend, which can now also be built with single precision or > fixed-point arithmetic. PNG and JPEG support is no longer broken, > poppler now also includes an internal DCT decoder. The GTK dependency > has been dropped (or was it even necessary in the first place?) > > Don't wonder about --disable-relocatable, it only applies to Windows. > > poppler allows using zlib to uncompress flate streams, but with the > warning that this is "not totally safe", so I disabled it. > > Additionally, poppler could benefit from packaging libopenjpeg and > libtiff in ptxdist for parsing embedded JPEG2000 or TIFF in PDFs.
An option marked broken with a comment about the missing library would be nice. We have stuff like this in gstreamer too. > Likewise, libnss could be packaged for PDF signature support. Also I've some libnss rules somewhere that need to be cleaned up a bit, if you're interrested :-). > there is the option to build a Qt5 wrapper, but I don't have a good way > to test this, so it is currently disabled. Just build tested is ok to start with. > Signed-off-by: Roland Hieber <r.hie...@pengutronix.de> > --- > > Notes: > changes in v1 -> v2: > - version bump to 0.59.0, includes our 0.57.0 patches from v1 > - bring back old vim modeline > - simplify single-precision/fixed-point logic > > rules/poppler.in | 88 > ++++++++++++++++++++++++++++++++++++++++++------------ > rules/poppler.make | 51 ++++++++++++++++++++++--------- > 2 files changed, 106 insertions(+), 33 deletions(-) > > diff --git a/rules/poppler.in b/rules/poppler.in > index b107dc7a5..af0306493 100644 > --- a/rules/poppler.in > +++ b/rules/poppler.in > @@ -4,18 +4,21 @@ menuconfig POPPLER > tristate > prompt "poppler " > select FONTCONFIG > + select FREETYPE > select HOST_GETTEXT > - select GLIB if POPPLER_GLIB > - select LIBPNG if POPPLER_PNG > - select LIBJPEG if POPPLER_JPEG > - select CAIRO if POPPLER_CAIRO > - select GTK if POPPLER_SPLASH && POPPLER_GLIB > - select ZLIB if POPPLER_ZLIB > - select LIBCURL if POPPLER_CURL > - select LCMS if POPPLER_CMS > - select QT4 if POPPLER_QT4 > - select QT4_BUILD_GUI if POPPLER_QT4 > - select QT4_BUILD_XML if POPPLER_QT4 > + select POPPLER_DATA if POPPLER_WITH_DATA > + select GLIB if POPPLER_GLIB > + select LIBPNG if POPPLER_PNG > + select LIBJPEG if POPPLER_JPEG > + select CAIRO if POPPLER_CAIRO > + select CAIRO_FREETYPE if POPPLER_CAIRO > + select ZLIB if POPPLER_ZLIB > + select LIBCURL if POPPLER_CURL > + select LCMS if POPPLER_CMS > + select QT4 if POPPLER_QT4 > + select QT4_BUILD_GUI if POPPLER_QT4 > + select QT4_BUILD_XML if POPPLER_QT4 > + select QT4_BUILD_QTESTLIB if POPPLER_QT4 > help > Poppler is a PDF rendering library based on the xpdf-3.0 code base. > > @@ -29,6 +32,35 @@ config POPPLER_BIN > pdffonts, pdfimages, pdfinfo, pdftoabw, pdftohtml, pdftoppm, pdftops, > pdftotext. > > +config POPPLER_XPDF > + bool > + prompt "install unsupported xpdf headers" > + help > + Install XPDF headers for software that still depends on them. > + Normally, this option should not be needed. > + > +config POPPLER_BUILD_DEBUG > + bool > + prompt "enable poppler debug build" > + help > + Build with debug information and without optimization. You probably > + don't want this in a production system. What kind of debugging does this enable? Makefiles can easily be hacked for development and we have a global options for debugging symbols. Don't add package specific debug options unless there are use-cases to have it enabled in production system. E.g. gstreamer has an option like this. Michael > +config POPPLER_WITH_DATA > + bool > + prompt "install poppler-data" > + help > + poppler-data contains the encoding files which enable poppler to > + correctly render CJK and Cyrillic. > + > +config POPPLER_CMYK > + bool > + prompt "enable poppler CMYK raster support" > + > +config POPPLER_CPP > + bool > + prompt "enable poppler cpp wrapper" > + > config POPPLER_GLIB > select POPPLER_CAIRO > bool > @@ -42,14 +74,14 @@ config POPPLER_QT4 > help > build poppler Qt4 wrapper. > > -comment "least one graphics backend should be selected" > - depends on !(POPPLER_CAIRO || POPPLER_SPLASH) > +comment "at least one graphics backend should be selected" > + depends on !(POPPLER_CAIRO || POPPLER_SPLASH || POPPLER_QT4) > > config POPPLER_CAIRO > bool > prompt "enable poppler cairo graphics backend" > help > - built cairo graphics backend > + build cairo graphics backend > > config POPPLER_SPLASH > bool > @@ -57,17 +89,33 @@ config POPPLER_SPLASH > help > build splash graphics backend > > +config POPPLER_SPLASH_SINGLE > + bool > + prompt "use single precision float arithmetic" > + default n if HAS_HARDFLOAT > + depends on POPPLER_SPLASH > + help > + Use single precision instead of double precision floating point > + arithmetic in Splash backend > + > +config POPPLER_SPLASH_FIXED > + bool > + prompt "use fixed point arithmetic" > + default n if HAS_HARDFLOAT > + depends on POPPLER_SPLASH > + depends on !POPPLER_SPLASH_SINGLE > + help > + If enabled, the Splash backend will use floating point operations > + instead of fixed-point arithmetic. > + > config POPPLER_PNG > bool > - # fails to build with the current libpng > - depends on BROKEN > prompt "enable poppler png support" > help > compiles poppler with png support. > > config POPPLER_JPEG > bool > - depends on BROKEN > prompt "enable poppler jpeg support" > help > compiles poppler with jpeg support. > @@ -86,8 +134,10 @@ config POPPLER_CURL > > config POPPLER_CMS > bool > - prompt "enable poppler cms support" > + prompt "enable poppler color management support" > help > - compiles poppler with color management system support. > + compiles poppler with color management support. > > endif > + > +# vim: ft=kconfig ts=8 noet tw=80 > diff --git a/rules/poppler.make b/rules/poppler.make > index 7ac676bf1..dec2c5005 100644 > --- a/rules/poppler.make > +++ b/rules/poppler.make > @@ -2,13 +2,19 @@ > # > # Copyright (C) 2007 by Luotao Fu <l...@pengutronix.de> > # 2009 by Robert Schwebel > +# 2017 by Roland Hieber <r.hie...@pengutronix.de> > # > # See CREDITS for details about who has contributed to this project. > # > # For further information about the PTXdist project and license conditions > # see the README file. > # > - > +# TODOs for improvement: > +# - package libnss for signature support in PDFs > +# - package libtiff for additional TIFF support > +# - enable and test the Qt5 backend > +# - package libopenjpeg and build with --enable-libopenjpeg > +# - update lcms to lcms2 and use --enable-cms=lcms2 > # > # We provide this package > # > @@ -17,10 +23,10 @@ PACKAGES-$(PTXCONF_POPPLER) += poppler > # > # Paths and names > # > -POPPLER_VERSION := 0.18.0 > -POPPLER_MD5 := 4cd3bf2a0a13fa8eaf00d31368915f77 > +POPPLER_VERSION := 0.59.0 > +POPPLER_MD5 := 6e44408a3b4f4a738f8a6770d0aea8a5 > POPPLER := poppler-$(POPPLER_VERSION) > -POPPLER_SUFFIX := tar.gz > +POPPLER_SUFFIX := tar.xz > POPPLER_URL := http://poppler.freedesktop.org/$(POPPLER).$(POPPLER_SUFFIX) > POPPLER_SOURCE := $(SRCDIR)/$(POPPLER).$(POPPLER_SUFFIX) > POPPLER_DIR := $(BUILDDIR)/$(POPPLER) > @@ -35,17 +41,29 @@ POPPLER_ENV := $(CROSS_ENV) > # > # autoconf > # > -POPPLER_AUTOCONF := \ > +POPPLER_CONF_TOOL := autoconf > +POPPLER_CONF_OPT := \ > $(CROSS_AUTOCONF_USR) \ > - $(GLOBAL_LARGE_FILE_OPTION) \ > - --disable-xpdf-headers \ > - --$(call ptx/disen, PTXCONF_HAS_HARDFLOAT)-single-precision \ > - --disable-fixedpoint \ > - --disable-libopenjpeg \ > + --enable-option-checking \ > + --disable-silent-rules \ > + --disable-dependency-tracking \ > + --enable-shared \ > + --enable-fast-install \ > + --enable-libtool-lock \ > + --$(call ptx/endis, PTXCONF_POPPLER_XPDF)-xpdf-headers \ > + --enable-build-type=$(call > ptx/ifdef,PTXCONF_POPPLER_BUILD_DEBUG,debug,release) \ > + --$(call ptx/endis, PTXCONF_POPPLER_SINGLE)-single-precision \ > + --$(call ptx/endis, PTXCONF_POPPLER_FIXED)-fixedpoint \ > + --$(call ptx/endis, PTXCONF_POPPLER_CMYK)-cmyk \ > + --disable-relocatable \ > + --enable-libopenjpeg=none \ > + --disable-libnss \ > --disable-libtiff \ > + $(GLOBAL_LARGE_FILE_OPTION) \ > --$(call ptx/endis, PTXCONF_POPPLER_ZLIB)-zlib \ > + --disable-zlib-uncompress \ > --$(call ptx/endis, PTXCONF_POPPLER_CURL)-libcurl \ > - --$(call ptx/endis, PTXCONF_POPPLER_JPEG)-libjpeg \ > + --enable-dctdecoder=$(call ptx/ifdef,PTXCONF_POPPLER_JPEG,libjpeg,none) > \ > --$(call ptx/endis, PTXCONF_POPPLER_PNG)-libpng \ > --$(call ptx/endis, PTXCONF_POPPLER_SPLASH)-splash-output \ > --$(call ptx/endis, PTXCONF_POPPLER_CAIRO)-cairo-output \ > @@ -55,14 +73,16 @@ POPPLER_AUTOCONF := \ > --disable-gtk-doc-html \ > --disable-gtk-doc-pdf \ > --$(call ptx/endis, PTXCONF_POPPLER_QT4)-poppler-qt4 \ > - --disable-poppler-cpp \ > + --disable-poppler-qt5 \ > + --$(call ptx/endis, PTXCONF_POPPLER_CPP)-poppler-cpp \ > --disable-gtk-test \ > --$(call ptx/endis, PTXCONF_POPPLER_BIN)-utils \ > --disable-compile-warnings \ > - --$(call ptx/endis, PTXCONF_POPPLER_CMS)-cms \ > + --enable-cms=$(call ptx/ifdef,PTXCONF_POPPLER_CMS,lcms1,no) \ > --without-x \ > --with-font-configuration=fontconfig \ > - --without-libiconv-prefix > + --without-libiconv-prefix \ > + --with-testdatadir= > > # > ---------------------------------------------------------------------------- > # Target-Install > @@ -85,6 +105,9 @@ ifdef PTXCONF_POPPLER_BIN > $(call install_copy, poppler, 0, 0, 0755, -, /usr/bin/$$i); \ > done > endif > +ifdef PTXCONF_POPPLER_CPP > + @$(call install_lib, poppler, 0, 0, 0644, libpoppler-cpp) > +endif > ifdef PTXCONF_POPPLER_GLIB > @$(call install_lib, poppler, 0, 0, 0644, libpoppler-glib) > endif > -- > 2.11.0 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de