mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH v3 4/7] poppler: version bump 0.18.0 -> 0.59.0
Date: Wed, 25 Oct 2017 22:57:48 +0200	[thread overview]
Message-ID: <20171025205751.27273-4-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20171025205751.27273-1-r.hieber@pengutronix.de>

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 we 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 JPEG2000 or TIFF embedded in PDFs.
Likewise, libnss could be packaged for PDF signature support.  Also
there is the option to build a Qt5 wrapper, but this is currently only
build-tested and needs to be tested in runtime.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---

Notes:
    changes in v2 -> v3:
     - POPPLER_GLIB also needs HOST_GLIB for sysroot-host/bin/glib-mkenums
     - add optional dependency for gobject-introspection
     - add POPPLER_OPENJPEG, POPPLER_TIFF, POPPLER_NSS with depends on
       BROKEN for future use
     - respect PTXCONF_TARGET_DEBUG_* instead of introducing an extra
       POPPLER_BUILD_DEBUG
     - enable qt5 wrapper (only build-tested)
     - order kconfig options by usage and add section headers for more
       structure

 rules/poppler.in   | 138 ++++++++++++++++++++++++++++++++++++++++++++---------
 rules/poppler.make |  56 ++++++++++++++++------
 2 files changed, 156 insertions(+), 38 deletions(-)

diff --git a/rules/poppler.in b/rules/poppler.in
index b107dc7a5..3a74ead41 100644
--- a/rules/poppler.in
+++ b/rules/poppler.in
@@ -4,23 +4,33 @@ 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 HOST_GLIB			if POPPLER_GLIB
+	select GOBJECT_INTROSPECTION_HELPER	if POPPLER_GOI
+	select GOBJECT_INTROSPECTION		if POPPLER_GOI
+	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
+	select QT5				if POPPLER_QT5
+	select QT5_MODULE_QTBASE		if POPPLER_QT5
 	help
 	  Poppler is a PDF rendering library based on the xpdf-3.0 code base.
 
 if POPPLER
 
+comment "--- Install components ---"
+
 config POPPLER_BIN
 	bool
 	prompt "install poppler utilities"
@@ -29,6 +39,26 @@ 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_WITH_DATA
+	bool
+	prompt "install poppler-data"
+	help
+	  poppler-data contains the encoding files which enable poppler to
+	  correctly render CJK and Cyrillic.
+
+comment "--- Wrappers ---"
+
+config POPPLER_CPP
+	bool
+	prompt "enable poppler cpp wrapper"
+
 config POPPLER_GLIB
 	select POPPLER_CAIRO
 	bool
@@ -36,20 +66,37 @@ config POPPLER_GLIB
 	help
 	  build poppler glib wrapper.
 
+config POPPLER_GOI
+	select POPPLER_GLIB
+	bool
+	prompt "enable GObject introspection"
+	help
+	  build GObject introspection data for poppler. You may also want to
+	  select GOBJECT_INTROSPECTION if you want to use that on the target,
+	  but it's not a hard dependency for generating the data for poppler.
+
 config POPPLER_QT4
 	bool
 	prompt "enable poppler Qt4 wrapper"
 	help
 	  build poppler Qt4 wrapper.
 
-comment "least one graphics backend should be selected"
-	depends on !(POPPLER_CAIRO || POPPLER_SPLASH)
+config POPPLER_QT5
+	bool
+	prompt "enable poppler Qt5 wrapper"
+	help
+	  build poppler Qt5 wrapper.
+
+comment "--- Backends ---"
+
+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,37 +104,82 @@ 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.
+
+comment "--- Features --- "
+
+config POPPLER_CMYK
+	bool
+	prompt "enable poppler CMYK raster support"
+
 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.
+	  compile poppler with png support via libpng
 
 config POPPLER_JPEG
 	bool
-	depends on BROKEN
 	prompt "enable poppler jpeg support"
 	help
-	  compiles poppler with jpeg support.
+	  compile poppler with jpeg support via libjpeg
+
+config POPPLER_OPENJPEG
+	bool
+	depends on BROKEN
+	prompt "enable poppler jpeg2000 support"
+	help
+	  compile poppler with jpeg2000 (JPX) support via libopenjpeg
+
+config POPPLER_TIFF
+	bool
+	depends on BROKEN
+	prompt "enable poppler tiff support"
+	help
+	  compile poppler with support for TIFF via libtiff
+
+config POPPLER_NSS
+	bool
+	depends on BROKEN
+	prompt "enable poppler nss support"
+	help
+	  compile poppler with support for signed PDFs via libnss
 
 config POPPLER_ZLIB
 	bool
 	prompt "enable poppler zlib support"
 	help
-	  compiles poppler with zlib support.
+	  compile poppler with zlib support.
 
 config POPPLER_CURL
 	bool
 	prompt "enable poppler curl support"
 	help
-	  compiles poppler with curl support.
+	  compile poppler with libcurl support.
 
 config POPPLER_CMS
 	bool
-	prompt "enable poppler cms support"
+	prompt "enable poppler color management support"
 	help
-	  compiles poppler with color management system support.
+	  compile poppler with color management support via libcms1
 
 endif
+
+# vim: ft=kconfig ts=8 noet tw=80
diff --git a/rules/poppler.make b/rules/poppler.make
index 7ac676bf1..ba55162e5 100644
--- a/rules/poppler.make
+++ b/rules/poppler.make
@@ -2,13 +2,19 @@
 #
 # Copyright (C) 2007 by Luotao Fu <l.fu@pengutronix.de>
 #               2009 by Robert Schwebel
+#               2017 by Roland Hieber <r.hieber@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
+# - runtime-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,34 +41,51 @@ POPPLER_ENV 	:= $(CROSS_ENV)
 #
 # autoconf
 #
-POPPLER_AUTOCONF := \
+POPPLER_CONF_TOOL := autoconf
+POPPLER_CONF_OPT := \
 	$(CROSS_AUTOCONF_USR) \
+	--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 \
+	$(call ptx/ifdef,PTXCONF_TARGET_DEBUG_OFF,--enable-build-type=release,) \
+	$(call ptx/ifdef,PTXCONF_TARGET_DEBUG_KEEP,--enable-build-type=release,) \
+	$(call ptx/ifdef,PTXCONF_TARGET_DEBUG_ENABLE,--enable-build-type=debug,) \
+	$(call ptx/ifdef,PTXCONF_TARGET_DEBUG_FULL,--enable-build-type=debugfull,) \
+	--$(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=$(call ptx/ifdef,PTXCONF_POPPLER_OPENJPEG,openjpeg2,none) \
+	--$(call ptx/endis, PTXCONF_POPPLER_NSS)-libnss \
+	--$(call ptx/endis, PTXCONF_POPPLER_TIFF)-libtiff \
 	$(GLOBAL_LARGE_FILE_OPTION) \
-	--disable-xpdf-headers \
-	--$(call ptx/disen, PTXCONF_HAS_HARDFLOAT)-single-precision \
-	--disable-fixedpoint \
-	--disable-libopenjpeg \
-	--disable-libtiff \
 	--$(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 \
 	--$(call ptx/endis, PTXCONF_POPPLER_GLIB)-poppler-glib \
-	--disable-introspection \
+	--$(call ptx/endis, PTXCONF_POPPLER_GOI)-introspection \
 	--disable-gtk-doc \
 	--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 +108,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

  parent reply	other threads:[~2017-10-25 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 20:57 [ptxdist] [PATCH v3 1/7] libpaper: new package: system-wide papersize configuration Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 2/7] qpdf: new package: PDF inspection library and tools Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 3/7] poppler-data: new package: optional encoding data for poppler Roland Hieber
2017-10-25 20:57 ` Roland Hieber [this message]
2017-10-25 21:15   ` [ptxdist] [PATCH v3 4/7] poppler: version bump 0.18.0 -> 0.59.0 Roland Hieber
2017-10-28  9:46   ` Michael Olbrich
2017-10-25 20:57 ` [ptxdist] [PATCH v3 5/7] cups: new package: Common Unix Printing System Roland Hieber
2017-10-27 17:54   ` Michael Olbrich
2017-10-31 22:31     ` Roland Hieber
2017-11-01 10:45       ` Michael Olbrich
2017-10-28  9:54   ` Michael Olbrich
2017-10-31 21:17     ` Roland Hieber
2017-10-25 20:57 ` [ptxdist] [PATCH v3 6/7] host-cups: new package: CUPS host tools Roland Hieber
2017-10-28  9:57   ` Michael Olbrich
2017-10-25 20:57 ` [ptxdist] [PATCH v3 7/7] cups-filters: new package: additional filters and backends for CUPS Roland Hieber
2017-11-01 10:51 ` [ptxdist] [PATCH v3 1/7] libpaper: new package: system-wide papersize configuration Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171025205751.27273-4-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox