Patchwork [1/1] poppler: new package

login
register
mail settings
Submitter Olivier Schonken
Date April 16, 2013, 8:48 p.m.
Message ID <1366145284-29557-1-git-send-email-olivier.schonken@gmail.com>
Download mbox | patch
Permalink /patch/237087/
State Accepted
Headers show

Comments

Olivier Schonken - April 16, 2013, 8:48 p.m.
Poppler is a PDF rendering library based on the xpdf-3.0 code base.

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
---
 package/Config.in          |    1 +
 package/poppler/Config.in  |   46 ++++++++++++++++++++++++++++++++
 package/poppler/poppler.mk |   63 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 110 insertions(+)
 create mode 100644 package/poppler/Config.in
 create mode 100644 package/poppler/poppler.mk
Peter Korsgaard - April 23, 2013, 9:33 p.m.
>>>>> "Olivier" == Olivier Schonken <olivier.schonken@gmail.com> writes:

 Olivier> Poppler is a PDF rendering library based on the xpdf-3.0 code base.
 Olivier> Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
 Olivier> ---
 Olivier>  package/Config.in          |    1 +
 Olivier>  package/poppler/Config.in  |   46 ++++++++++++++++++++++++++++++++
 Olivier>  package/poppler/poppler.mk |   63 ++++++++++++++++++++++++++++++++++++++++++++
 Olivier>  3 files changed, 110 insertions(+)
 Olivier>  create mode 100644 package/poppler/Config.in
 Olivier>  create mode 100644 package/poppler/poppler.mk

 Olivier> diff --git a/package/Config.in b/package/Config.in
 Olivier> index f28cedd..a52705a 100644
 Olivier> --- a/package/Config.in
 Olivier> +++ b/package/Config.in
 Olivier> @@ -444,6 +444,7 @@ source "package/opencv/Config.in"
 Olivier>  source "package/opengl/Config.in"
 Olivier>  source "package/pango/Config.in"
 Olivier>  source "package/pixman/Config.in"
 Olivier> +source "package/poppler/Config.in"
 Olivier>  source "package/tiff/Config.in"
 Olivier>  source "package/webkit/Config.in"
 Olivier>  source "package/zxing/Config.in"
 Olivier> diff --git a/package/poppler/Config.in b/package/poppler/Config.in
 Olivier> new file mode 100644
 Olivier> index 0000000..ce31651
 Olivier> --- /dev/null
 Olivier> +++ b/package/poppler/Config.in
 Olivier> @@ -0,0 +1,46 @@
 Olivier> +config BR2_PACKAGE_POPPLER
 Olivier> +	bool "poppler"
 Olivier> +	depends on BR2_INSTALL_LIBSTDCPP
 Olivier> +	select BR2_PACKAGE_FONTCONFIG
 Olivier> +	help
 Olivier> +	   Poppler is a PDF rendering library based on the xpdf-3.0 code base.
 Olivier> +
 Olivier> +	   http://poppler.freedesktop.org/
 Olivier> +
 Olivier> +comment "qpdf requires a toolchain with C++ support enabled"
 Olivier> +	depends on !BR2_INSTALL_LIBSTDCPP

poppler, not qpdf.

 Olivier> +
 Olivier> +if BR2_PACKAGE_POPPLER
 Olivier> +menu "Poppler Options"

Because of the comment, this is no longer considered a suboption of
BR2_PACKAGE_POPPLER, so it doesn't get indented.

 Olivier> +config BR2_PACKAGE_POPPLER_CMS
 Olivier> +	bool "Color Management System support"
 Olivier> +	select BR2_PACKAGE_LCMS2
 Olivier> +

For most packages, we normally automatically enable library support if
those libraries are enabled, so all of these explicit options can go.

 Olivier> +#############################################################
 Olivier> +#
 Olivier> +# poppler
 Olivier> +#
 Olivier> +#############################################################
 Olivier> +
 Olivier> +POPPLER_VERSION = 0.22.3
 Olivier> +POPPLER_SITE = http://poppler.freedesktop.org
 Olivier> +POPPLER_DEPENDENCIES = fontconfig
 Olivier> +POPPLER_LICENSE = GPLv2

There's a bunch of 'any later version' references, so this should be
GPLv2+

Committed with those changes, thanks.

Patch

diff --git a/package/Config.in b/package/Config.in
index f28cedd..a52705a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -444,6 +444,7 @@  source "package/opencv/Config.in"
 source "package/opengl/Config.in"
 source "package/pango/Config.in"
 source "package/pixman/Config.in"
+source "package/poppler/Config.in"
 source "package/tiff/Config.in"
 source "package/webkit/Config.in"
 source "package/zxing/Config.in"
diff --git a/package/poppler/Config.in b/package/poppler/Config.in
new file mode 100644
index 0000000..ce31651
--- /dev/null
+++ b/package/poppler/Config.in
@@ -0,0 +1,46 @@ 
+config BR2_PACKAGE_POPPLER
+	bool "poppler"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_FONTCONFIG
+	help
+	   Poppler is a PDF rendering library based on the xpdf-3.0 code base.
+
+	   http://poppler.freedesktop.org/
+
+comment "qpdf requires a toolchain with C++ support enabled"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
+if BR2_PACKAGE_POPPLER
+menu "Poppler Options"
+config BR2_PACKAGE_POPPLER_CMS
+	bool "Color Management System support"
+	select BR2_PACKAGE_LCMS2
+
+config BR2_PACKAGE_POPPLER_JPEG
+	bool "JPEG support"
+	select BR2_PACKAGE_JPEG
+
+config BR2_PACKAGE_POPPLER_LIBCURL
+	bool "libCURL support"
+	select BR2_PACKAGE_LIBCURL
+
+config BR2_PACKAGE_POPPLER_PNG
+	bool "PNG support"
+	select BR2_PACKAGE_LIBPNG
+
+config BR2_PACKAGE_POPPLER_TIFF
+	bool "TIFF support"
+	select BR2_PACKAGE_TIFF
+
+config BR2_PACKAGE_POPPLER_ZLIB
+	bool "ZLIB support"
+	select BR2_PACKAGE_ZLIB
+
+config BR2_PACKAGE_POPPLER_X
+	bool "X support"
+	default y
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBXEXT
+	select BR2_PACKAGE_XLIB_LIBX11
+endmenu
+endif
diff --git a/package/poppler/poppler.mk b/package/poppler/poppler.mk
new file mode 100644
index 0000000..c390d1a
--- /dev/null
+++ b/package/poppler/poppler.mk
@@ -0,0 +1,63 @@ 
+#############################################################
+#
+# poppler
+#
+#############################################################
+
+POPPLER_VERSION = 0.22.3
+POPPLER_SITE = http://poppler.freedesktop.org
+POPPLER_DEPENDENCIES = fontconfig
+POPPLER_LICENSE = GPLv2
+POPPLER_LICENSE_FILES = COPYING
+POPPLER_CONF_OPT = --with-font-configuration=fontconfig
+
+ifeq ($(BR2_PACKAGE_POPPLER_CMS),y)
+	POPPLER_CONF_OPT += --enable-cms=lcms2
+	POPPLER_DEPENDENCIES += lcms2
+else
+	POPPLER_CONF_OPT += --enable-cms=none
+endif
+
+ifeq ($(BR2_PACKAGE_POPPLER_TIFF),y)
+	POPPLER_CONF_OPT += --enable-libtiff
+	POPPLER_DEPENDENCIES += tiff
+else
+	POPPLER_CONF_OPT += --disable-libtiff
+endif
+
+ifeq ($(BR2_PACKAGE_POPPLER_JPEG),y)
+	POPPLER_CONF_OPT += --enable-libjpeg
+	POPPLER_DEPENDENCIES += jpeg
+else
+	POPPLER_CONF_OPT += --disable-libjpeg
+endif
+
+ifeq ($(BR2_PACKAGE_POPPLER_PNG),y)
+	POPPLER_CONF_OPT += --enable-libpng
+	POPPLER_DEPENDENCIES += libpng
+else
+	POPPLER_CONF_OPT += --disable-libpng
+endif
+
+ifeq ($(BR2_PACKAGE_POPPLER_ZLIB),y)
+	POPPLER_CONF_OPT += --enable-zlib
+	POPPLER_DEPENDENCIES += zlib
+else
+	POPPLER_CONF_OPT += --disable-zlib
+endif
+
+ifeq ($(BR2_PACKAGE_POPPLER_LIBCURL),y)
+	POPPLER_CONF_OPT += --enable-libcurl
+	POPPLER_DEPENDENCIES += libcurl
+else
+	POPPLER_CONF_OPT += --disable-libcurl
+endif
+
+ifeq ($(BR2_PACKAGE_POPPLER_X),y)
+	POPPLER_CONF_OPT += --with-x
+	POPPLER_DEPENDENCIES += xlib_libX11 xlib_libXext
+else
+	POPPLER_CONF_OPT += --without-x
+endif
+
+$(eval $(autotools-package))