diff mbox

dillo: new package

Message ID 1401230307-17697-1-git-send-email-ps.report@gmx.net
State Superseded
Headers show

Commit Message

Peter Seiderer May 27, 2014, 10:38 p.m. UTC
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/Config.in       |  1 +
 package/dillo/Config.in | 21 ++++++++++++++++++++
 package/dillo/dillo.mk  | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)
 create mode 100644 package/dillo/Config.in
 create mode 100644 package/dillo/dillo.mk

Comments

Thomas Petazzoni May 28, 2014, 6:14 a.m. UTC | #1
Dear Peter Seiderer,

On Wed, 28 May 2014 00:38:27 +0200, Peter Seiderer wrote:

> diff --git a/package/dillo/Config.in b/package/dillo/Config.in
> new file mode 100644
> index 0000000..07198f1
> --- /dev/null
> +++ b/package/dillo/Config.in
> @@ -0,0 +1,21 @@
> +config BR2_PACKAGE_DILLO
> +	bool "dillo"
> +	depends on BR2_PACKAGE_XORG7
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_USE_MMU # fltk fork()
> +	select BR2_PACKAGE_FLTK
> +

No need for this empty line here.

> +	help
> +	  Dillo is a multi-platform graphical web browser known
> +	  for its speed and small footprint. 
> +
> +	  Enable jpeg and png packages to gain full feature image
> +	  support.

I believe this comment is not really necessary: fltk selects libpng and
jpeg, so they will also be there.

> +	  Enable openssl package to gain https support.

However, this one is indeed useful.

> +	  http://www.dillo.org
> +
> +comment "dillo needs a toolchain w/ C++"
> +        depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU
> +        depends on !BR2_INSTALL_LIBSTDCPP
> diff --git a/package/dillo/dillo.mk b/package/dillo/dillo.mk
> new file mode 100644
> index 0000000..f15a02a
> --- /dev/null
> +++ b/package/dillo/dillo.mk
> @@ -0,0 +1,51 @@
> +################################################################################
> +#
> +# dillo
> +#
> +################################################################################
> +
> +DILLO_VERSION = 3.0.4
> +DILLO_SOURCE = dillo-$(DILLO_VERSION).tar.bz2
> +DILLO_SITE = http://www.dillo.org/download
> +DILLO_LICENSE = GPLv3+
> +DILLO_LICENSE_FILES = COPYING
> +
> +DILLO_DEPENDENCIES = fltk
> +
> +# set additional path for fltk-config and libpng-config
> +DILLO_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)

It's not that nice to add $(STAGING_DIR)/usr/bin to the path, as it
means that if there are target binaries in there, they will be picked
up in preference to host binaries, which might break things. Instead,
we prefer to explicitly point to fltk-config and libpng-config. For
libpng:

DILLO_CONF_ENV = \
	PNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config

For fltk, you'd need to patch configure.ac a bit to make it use a
variable like FLTK_CONFIG instead of hardcoding the use of fltk-config.
Or better, make it use AC_PATH_PROG(), like:

	AC_PATH_PROG(FLTK_CONFIG,fltk-config)

and then use $FLTK_CONFIG throughout the configure.ac, and pass
ac_cv_path_FLTK_CONFIG=$(STAGING_DIR)/usr/bin/fltk-config

This patch could then be submitted upstream.

Thanks!

Thomas
Peter Seiderer May 28, 2014, 3:25 p.m. UTC | #2
Hello Thomas,

> Gesendet: Mittwoch, 28. Mai 2014 um 08:14 Uhr
> Von: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> An: "Peter Seiderer" <ps.report@gmx.net>
> Cc: buildroot@busybox.net
> Betreff: Re: [Buildroot] [PATCH] dillo: new package
>
> Dear Peter Seiderer,
> 
> On Wed, 28 May 2014 00:38:27 +0200, Peter Seiderer wrote:
> 
> > diff --git a/package/dillo/Config.in b/package/dillo/Config.in
> > new file mode 100644
> > index 0000000..07198f1
> > --- /dev/null
> > +++ b/package/dillo/Config.in
> > @@ -0,0 +1,21 @@
> > +config BR2_PACKAGE_DILLO
> > +	bool "dillo"
> > +	depends on BR2_PACKAGE_XORG7
> > +	depends on BR2_INSTALL_LIBSTDCPP
> > +	depends on BR2_USE_MMU # fltk fork()
> > +	select BR2_PACKAGE_FLTK
> > +
> 
> No need for this empty line here.
> 
o.k. will fix....

> > +	help
> > +	  Dillo is a multi-platform graphical web browser known
> > +	  for its speed and small footprint. 
> > +
> > +	  Enable jpeg and png packages to gain full feature image
> > +	  support.
> 
> I believe this comment is not really necessary: fltk selects libpng and
> jpeg, so they will also be there.
> 

o.k. will fix it...

> > +	  Enable openssl package to gain https support.
> 
> However, this one is indeed useful.
> 
> > +	  http://www.dillo.org
> > +
> > +comment "dillo needs a toolchain w/ C++"
> > +        depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU
> > +        depends on !BR2_INSTALL_LIBSTDCPP
> > diff --git a/package/dillo/dillo.mk b/package/dillo/dillo.mk
> > new file mode 100644
> > index 0000000..f15a02a
> > --- /dev/null
> > +++ b/package/dillo/dillo.mk
> > @@ -0,0 +1,51 @@
> > +################################################################################
> > +#
> > +# dillo
> > +#
> > +################################################################################
> > +
> > +DILLO_VERSION = 3.0.4
> > +DILLO_SOURCE = dillo-$(DILLO_VERSION).tar.bz2
> > +DILLO_SITE = http://www.dillo.org/download
> > +DILLO_LICENSE = GPLv3+
> > +DILLO_LICENSE_FILES = COPYING
> > +
> > +DILLO_DEPENDENCIES = fltk
> > +
> > +# set additional path for fltk-config and libpng-config
> > +DILLO_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
> 
> It's not that nice to add $(STAGING_DIR)/usr/bin to the path, as it
> means that if there are target binaries in there, they will be picked
> up in preference to host binaries, which might break things. Instead,
> we prefer to explicitly point to fltk-config and libpng-config. For
> libpng:
> 
> DILLO_CONF_ENV = \
> 	PNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config
> 

o.k. will fix it...

> For fltk, you'd need to patch configure.ac a bit to make it use a
> variable like FLTK_CONFIG instead of hardcoding the use of fltk-config.
> Or better, make it use AC_PATH_PROG(), like:
> 
> 	AC_PATH_PROG(FLTK_CONFIG,fltk-config)
> 
> and then use $FLTK_CONFIG throughout the configure.ac, and pass
> ac_cv_path_FLTK_CONFIG=$(STAGING_DIR)/usr/bin/fltk-config
> 
> This patch could then be submitted upstream.

o.k. will (try) to fix...

Regards,

Peter


> 
> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 3bc8d24..5a92032 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -224,6 +224,7 @@  source "package/x11r7/Config.in"
 comment "X applications"
 source "package/alsamixergui/Config.in"
 source "package/apitrace/Config.in"
+source "package/dillo/Config.in"
 source "package/docker/Config.in"
 source "package/feh/Config.in"
 source "package/freerdp/Config.in"
diff --git a/package/dillo/Config.in b/package/dillo/Config.in
new file mode 100644
index 0000000..07198f1
--- /dev/null
+++ b/package/dillo/Config.in
@@ -0,0 +1,21 @@ 
+config BR2_PACKAGE_DILLO
+	bool "dillo"
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # fltk fork()
+	select BR2_PACKAGE_FLTK
+
+	help
+	  Dillo is a multi-platform graphical web browser known
+	  for its speed and small footprint. 
+
+	  Enable jpeg and png packages to gain full feature image
+	  support.
+
+	  Enable openssl package to gain https support.
+
+	  http://www.dillo.org
+
+comment "dillo needs a toolchain w/ C++"
+        depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU
+        depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/dillo/dillo.mk b/package/dillo/dillo.mk
new file mode 100644
index 0000000..f15a02a
--- /dev/null
+++ b/package/dillo/dillo.mk
@@ -0,0 +1,51 @@ 
+################################################################################
+#
+# dillo
+#
+################################################################################
+
+DILLO_VERSION = 3.0.4
+DILLO_SOURCE = dillo-$(DILLO_VERSION).tar.bz2
+DILLO_SITE = http://www.dillo.org/download
+DILLO_LICENSE = GPLv3+
+DILLO_LICENSE_FILES = COPYING
+
+DILLO_DEPENDENCIES = fltk
+
+# set additional path for fltk-config and libpng-config
+DILLO_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+	DILLO_CONF_OPT += --enable-ssl
+	DILLO_DEPENDENCIES += openssl
+else
+	DILLO_CONF_OPT += --disable-ssl
+endif
+
+ifeq ($(BR2_INET_IPV6),y)
+	DILLO_CONF_OPT += --enable-ipv6
+else
+	DILLO_CONF_OPT += --disable-ipv6
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+	DILLO_CONF_OPT += --enable-png
+	DILLO_DEPENDENCIES += libpng
+else
+	DILLO_CONF_OPT += --disable-png
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+	DILLO_CONF_OPT += --enable-jpeg
+	DILLO_DEPENDENCIES += libjpeg
+else
+	DILLO_CONF_OPT += --disable-jpeg
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+	DILLO_CONF_OPT += --enable-threaded-dns
+else
+	DILLO_CONF_OPT += --disable-threaded-dns
+endif
+
+$(eval $(autotools-package))