Skip to contentSkip to conversation

netsurf: add optional dependency freetype

PATCH New Francois Perrad 3 participants 7 messages Dec 12, 2018 – Dec 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 netsurf: add optional dependency freetype

---
 .../netsurf/0002-fix-freetype-detection.patch | 28 +++++++++++++++++++
 package/netsurf/netsurf.mk                    |  7 +++++
 2 files changed, 35 insertions(+)
 create mode 100644 package/netsurf/0002-fix-freetype-detection.patch
package/netsurf/0002-fix-freetype-detection.patch new file +28 -0
new file mode 100644
index 000000000..27c0440e1
@@ -0,0 +1,28 @@
+From 85336f2404b9583267019650ea0112ebf1bb571a Mon Sep 17 00:00:00 2001
+From: Francois Perrad <[email protected]>
+Date: Wed, 28 Nov 2018 17:59:44 +0100
+Subject: [PATCH 2/2] fix freetype detection
+
+Signed-off-by: Francois Perrad <[email protected]>
+---
+ netsurf/frontends/framebuffer/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/netsurf/frontends/framebuffer/Makefile b/netsurf/frontends/framebuffer/Makefile
+index bdedd90..249c7c4 100644
+--- a/netsurf/frontends/framebuffer/Makefile
++++ b/netsurf/frontends/framebuffer/Makefile
+@@ -35,8 +35,8 @@ LDFLAGS += -Wl,--no-whole-archive
+ 
+ # freetype is optional but does not use pkg-config
+ ifeq ($(NETSURF_FB_FONTLIB),freetype)
+-  CFLAGS += -DFB_USE_FREETYPE $(shell freetype-config --cflags)
+-  LDFLAGS += $(shell freetype-config --libs)
++  CFLAGS += -DFB_USE_FREETYPE $(shell $(PKG_CONFIG) --cflags freetype2)
++  LDFLAGS += $(shell $(PKG_CONFIG) --libs freetype2)
+ endif
+ 
+ 
+-- 
+2.17.1
+
package/netsurf/netsurf.mk +7 -0
index 3339b35c9..23e4de637 100644
@@ -27,6 +27,12 @@ endif
 ifeq ($(BR2_PACKAGE_NETSURF_SDL),y)
 NETSURF_DEPENDENCIES += sdl host-libpng
 NETSURF_FRONTEND = framebuffer
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+NETSURF_DEPENDENCIES += freetype
+define NETSURF_FONTLIB_CONFIGURE_CMDS
+	echo "override NETSURF_FB_FONTLIB := freetype"  >> $(@D)/netsurf/Makefile.config
+endef
+endif
 endif
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
@@ -41,6 +47,7 @@ define NETSURF_CONFIGURE_CMDS
 	echo "override NETSURF_USE_DUKTAPE := NO"       >  $(@D)/netsurf/Makefile.config
 	$(NETSURF_ICONV_CONFIGURE_CMDS)
 	$(NETSURF_SVG_CONFIGURE_CMDS)
+	$(NETSURF_FONTLIB_CONFIGURE_CMDS)
 endef
 
 NETSURF_MAKE_OPTS = \
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/4 netsurf: allow javascript (with duktape)

---
 .../0003-do-not-cross-compile-nsgenbind.patch | 26 +++++++++++++++++++
 package/netsurf/netsurf.mk                    |  1 -
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 package/netsurf/0003-do-not-cross-compile-nsgenbind.patch
package/netsurf/0003-do-not-cross-compile-nsgenbind.patch new file +26 -0
new file mode 100644
index 000000000..f0e5f4105
@@ -0,0 +1,26 @@
+From 2419ad79b25fcc1746178aba609fddbb0aa8c9e0 Mon Sep 17 00:00:00 2001
+From: Francois Perrad <[email protected]>
+Date: Sat, 1 Dec 2018 16:10:13 +0100
+Subject: [PATCH 3/3] do not cross compile nsgenbind
+
+Signed-off-by: Francois Perrad <[email protected]>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index f279f01..5698c87 100644
+--- a/Makefile
++++ b/Makefile
+@@ -109,7 +109,7 @@ endef
+ 
+ # prefixed install macro for each host sub target
+ define do_build_prefix_install
+-	$(MAKE) install --directory=$1 HOST=$(BUILD) PREFIX=$(TMP_PREFIX) Q=$(Q) DESTDIR=
++	$(MAKE) install --directory=$1 HOST=$(BUILD) CC=$(BUILD_CC) PREFIX=$(TMP_PREFIX) Q=$(Q) DESTDIR=
+ 
+ endef
+ 
+-- 
+2.17.1
+
package/netsurf/netsurf.mk +0 -1
index 23e4de637..004d58256 100644
@@ -44,7 +44,6 @@ endef
 endif
 
 define NETSURF_CONFIGURE_CMDS
-	echo "override NETSURF_USE_DUKTAPE := NO"       >  $(@D)/netsurf/Makefile.config
 	$(NETSURF_ICONV_CONFIGURE_CMDS)
 	$(NETSURF_SVG_CONFIGURE_CMDS)
 	$(NETSURF_FONTLIB_CONFIGURE_CMDS)
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/4 netsurf: add GTK+ 3 frontend

In reply to Francois Perrad
---
 package/netsurf/Config.in  | 10 ++++++++--
 package/netsurf/netsurf.mk |  8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
package/netsurf/Config.in +8 -2
index 21a3a992a..99360a99d 100644
@@ -9,7 +9,7 @@ config BR2_PACKAGE_NETSURF
 	help
 	  NetSurf is a compact graphical web browser which aims for
 	  HTML5, CSS and JavaScript support.
-	  Frontends: GTK+ 2 (X11), SDL 1.2 (framebuffer)
+	  Frontends: GTK (X11), SDL 1.2 (framebuffer)
 
 	  http://www.netsurf-browser.org/
 
@@ -29,7 +29,13 @@ config BR2_PACKAGE_NETSURF_GTK
 	bool "gtk frontend"
 	depends on BR2_PACKAGE_LIBGTK2
 	help
-	  Select GTK frontend.
+	  Select GTK+ 2 frontend.
+
+config BR2_PACKAGE_NETSURF_GTK3
+	bool "gtk3 frontend"
+	depends on BR2_PACKAGE_LIBGTK3
+	help
+	  Select GTK+ 3 frontend.
 
 endchoice
 
package/netsurf/netsurf.mk +8 -0
index 004d58256..8d29c5acc 100644
@@ -15,6 +15,14 @@ NETSURF_DEPENDENCIES = expat jpeg libcurl libpng openssl \
 ifeq ($(BR2_PACKAGE_NETSURF_GTK),y)
 NETSURF_DEPENDENCIES += libgtk2
 NETSURF_FRONTEND = gtk
+endif
+
+ifeq ($(BR2_PACKAGE_NETSURF_GTK3),y)
+NETSURF_DEPENDENCIES += libgtk3
+NETSURF_FRONTEND = gtk3
+endif
+
+ifeq ($(BR2_PACKAGE_NETSURF_GTK)$(BR2_PACKAGE_NETSURF_GTK3),y)
 ifeq ($(BR2_PACKAGE_LIBRSVG),y)
 NETSURF_DEPENDENCIES += librsvg
 define NETSURF_SVG_CONFIGURE_CMDS
Signature · 1 line
2.17.1
#3 lore raw

PATCH 4/4 netsurf: libcurl become optional

In reply to Francois Perrad
---
 .../0004-fix-compilation-without-curl.patch   | 27 +++++++++++++++++++
 package/netsurf/Config.in                     |  3 +--
 package/netsurf/netsurf.mk                    | 12 ++++++++-
 3 files changed, 39 insertions(+), 3 deletions(-)
 create mode 100644 package/netsurf/0004-fix-compilation-without-curl.patch
package/netsurf/0004-fix-compilation-without-curl.patch new file +27 -0
new file mode 100644
index 000000000..74ecd3a7b
@@ -0,0 +1,27 @@
+From 7d7c59dbfc92fcbcd0eac2c84e0fb98662c4bd71 Mon Sep 17 00:00:00 2001
+From: Francois Perrad <[email protected]>
+Date: Sat, 8 Dec 2018 09:43:40 +0100
+Subject: [PATCH 4/4] fix compilation without curl
+
+Signed-off-by: Francois Perrad <[email protected]>
+---
+ netsurf/content/fetch.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/netsurf/content/fetch.c b/netsurf/content/fetch.c
+index 7665029..0f41c49 100644
+--- a/netsurf/content/fetch.c
++++ b/netsurf/content/fetch.c
+@@ -54,7 +54,9 @@
+ #include "content/fetchers.h"
+ #include "content/fetchers/resource.h"
+ #include "content/fetchers/about.h"
++#ifdef WITH_CURL
+ #include "content/fetchers/curl.h"
++#endif
+ #include "content/fetchers/data.h"
+ #include "content/fetchers/file.h"
+ #include "javascript/fetcher.h"
+-- 
+2.17.1
+
package/netsurf/Config.in +1 -2
index 99360a99d..a99d94508 100644
@@ -2,10 +2,9 @@ config BR2_PACKAGE_NETSURF
 	bool "netsurf"
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_JPEG
-	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBPNG
-	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_OPENSSL if BR2_PACKAGE_LIBCURL
 	help
 	  NetSurf is a compact graphical web browser which aims for
 	  HTML5, CSS and JavaScript support.
package/netsurf/netsurf.mk +11 -1
index 8d29c5acc..692d2b770 100644
@@ -9,7 +9,7 @@ NETSURF_SOURCE = netsurf-all-$(NETSURF_VERSION).tar.gz
 NETSURF_SITE = http://download.netsurf-browser.org/netsurf/releases/source-full
 NETSURF_LICENSE = GPL-2.0
 NETSURF_LICENSE_FILES = netsurf/COPYING
-NETSURF_DEPENDENCIES = expat jpeg libcurl libpng openssl \
+NETSURF_DEPENDENCIES = expat jpeg libpng \
 	host-bison host-flex host-gperf host-pkgconf
 
 ifeq ($(BR2_PACKAGE_NETSURF_GTK),y)
@@ -51,10 +51,20 @@ define NETSURF_ICONV_CONFIGURE_CMDS
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCURL),y)
+NETSURF_DEPENDENCIES += libcurl openssl
+else
+define NETSURF_CURL_CONFIGURE_CMDS
+	echo "override NETSURF_USE_CURL := NO"          >> $(@D)/netsurf/Makefile.config
+	echo "override NETSURF_USE_OPENSSL := NO"       >> $(@D)/netsurf/Makefile.config
+endef
+endif
+
 define NETSURF_CONFIGURE_CMDS
 	$(NETSURF_ICONV_CONFIGURE_CMDS)
 	$(NETSURF_SVG_CONFIGURE_CMDS)
 	$(NETSURF_FONTLIB_CONFIGURE_CMDS)
+	$(NETSURF_CURL_CONFIGURE_CMDS)
 endef
 
 NETSURF_MAKE_OPTS = \
Signature · 1 line
2.17.1
#4 lore raw

PATCH 1/4 netsurf: add optional dependency freetype

In reply to Francois Perrad

Hello,

Quoted 6 lines · Francois Perrad
---
 .../netsurf/0002-fix-freetype-detection.patch | 28 +++++++++++++++++++
 package/netsurf/netsurf.mk                    |  7 +++++
 2 files changed, 35 insertions(+)
 create mode 100644 package/netsurf/0002-fix-freetype-detection.patch

Series applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/4 netsurf: add optional dependency freetype

In reply to Francois Perrad

Hello Fran?ois,

Even though I applied the series, I have a few comments.

Quoted 13 lines · Francois Perrad
---
 .../netsurf/0002-fix-freetype-detection.patch | 28 +++++++++++++++++++
 package/netsurf/netsurf.mk                    |  7 +++++
 2 files changed, 35 insertions(+)
 create mode 100644 package/netsurf/0002-fix-freetype-detection.patch
package/netsurf/0002-fix-freetype-detection.patch new file +0 -0
new file mode 100644
index 000000000..27c0440e1

package/netsurf/0002-fix-freetype-detection.patch line 4

Quoted 4 lines
package/netsurf/0002-fix-freetype-detection.patch new file +4 -0
@@ -0,0 +1,28 @@
+From 85336f2404b9583267019650ea0112ebf1bb571a Mon Sep 17 00:00:00 2001
+From: Francois Perrad <[email protected]>
+Date: Wed, 28 Nov 2018 17:59:44 +0100
+Subject: [PATCH 2/2] fix freetype detection

When generating patches, use the -N option of git format-patch to avoid the numbering: it provides patches that use [PATCH] instead of [PATCH X/Y]. We prefer just [PATCH] because the X/Y often get invalid. Your series is a good example: this patch adds a PATCH 2/2 patch, and the next patch adds a 3/3 patch, and then another patch adds a 4/4 patch.

Another comment: did you submit all those patches to the upstream netsurf project ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/4 netsurf: add optional dependency freetype

Le dim. 16 d?c. 2018 ? 21:51, Thomas Petazzoni <[email protected]> a ?crit :

Quoted 30 lines

Hello Fran?ois,

Even though I applied the series, I have a few comments.

Review

Quoted 8 lines · Francois Perrad
---
 .../netsurf/0002-fix-freetype-detection.patch | 28 +++++++++++++++++++
 package/netsurf/netsurf.mk                    |  7 +++++
 2 files changed, 35 insertions(+)
 create mode 100644 package/netsurf/0002-fix-freetype-detection.patch
(quoted diff) +0 -0

b/package/netsurf/0002-fix-freetype-detection.patch

package/netsurf/0002-fix-freetype-detection.patch line 4

Quoted 9 lines

new file mode 100644
index 000000000..27c0440e1

package/netsurf/0002-fix-freetype-detection.patch new file +4 -0
@@ -0,0 +1,28 @@
+From 85336f2404b9583267019650ea0112ebf1bb571a Mon Sep 17 00:00:00 2001
+From: Francois Perrad <[email protected]>
+Date: Wed, 28 Nov 2018 17:59:44 +0100
+Subject: [PATCH 2/2] fix freetype detection

When generating patches, use the -N option of git format-patch to avoid the numbering: it provides patches that use [PATCH] instead of [PATCH X/Y]. We prefer just [PATCH] because the X/Y often get invalid. Your series is a good example: this patch adds a PATCH 2/2 patch, and the next patch adds a 3/3 patch, and then another patch adds a 4/4 patch.

Quoted 3 lines

Another comment: did you submit all those patches to the upstream netsurf project ?

I will do.

note: this package still fail on autobuilders, see fix on
https://patchwork.ozlabs.org/patch/1013055/

Fran?ois

Quoted 13 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181217/012e8094/attachment-0001.html>