[oe-commits] Dmitry Artamonow : netsurf: add recipe for version 2.1

git version control git at git.openembedded.org
Sat May 30 16:31:58 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 8fdae48f8fcadabf049b378a48a9dfea11ba02f4
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=8fdae48f8fcadabf049b378a48a9dfea11ba02f4

Author: Dmitry Artamonow <mad_soft at inbox.ru>
Date:   Sat May 23 22:45:05 2009 +0000

netsurf: add recipe for version 2.1

It's gtk+ version built with GIF,JPEG,PNG and without SVG,MNG and
PDF printing support.

Signed-off-by: Dmitry Artamonow <mad_soft at inbox.ru>
Acked-by: Tom Rini <trini at embeddedalley.com>

---

 recipes/netsurf/netsurf-2.1/Makefile.config    |    9 +++
 recipes/netsurf/netsurf-2.1/debugxml_fix.patch |   64 ++++++++++++++++++++++++
 recipes/netsurf/netsurf-2.1/fix_makefile.patch |   12 +++++
 recipes/netsurf/netsurf-2.1/netsurf.desktop    |   10 ++++
 recipes/netsurf/netsurf-2.1/netsurf.png        |  Bin 0 -> 9329 bytes
 recipes/netsurf/netsurf_2.1.bb                 |   32 ++++++++++++
 6 files changed, 127 insertions(+), 0 deletions(-)

diff --git a/recipes/netsurf/netsurf-2.1/Makefile.config b/recipes/netsurf/netsurf-2.1/Makefile.config
new file mode 100644
index 0000000..72c8600
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/Makefile.config
@@ -0,0 +1,9 @@
+override NETSURF_USE_BMP := YES
+override NETSURF_USE_GIF := YES
+override NETSURF_USE_JPEG := YES
+override NETSURF_USE_PNG := YES
+override NETSURF_USE_MNG := NO
+override NETSURF_USE_HARU_PDF := NO
+override NETSURF_USE_RSVG := NO
+override NETSURF_USE_ROSPRITE := NO
+
diff --git a/recipes/netsurf/netsurf-2.1/debugxml_fix.patch b/recipes/netsurf/netsurf-2.1/debugxml_fix.patch
new file mode 100644
index 0000000..3a6626a
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/debugxml_fix.patch
@@ -0,0 +1,64 @@
+--- netsurf-2.0/gtk/gtk_scaffolding.c.orig	2009-05-15 01:18:44.000000000 +0400
++++ netsurf-2.0/gtk/gtk_scaffolding.c	2009-05-15 01:24:32.000000000 +0400
+@@ -22,7 +22,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <gtk/gtk.h>
+-#include <libxml/debugXML.h>
+ #include "content/content.h"
+ #include "desktop/browser.h"
+ #include "desktop/history_core.h"
+@@ -1040,52 +1039,7 @@
+ 
+ MENUHANDLER(save_dom_tree)
+ {
+-	GtkWidget *save_dialog;
+-	struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
+-	
+-	save_dialog = gtk_file_chooser_dialog_new("Save File", gw->window,
+-			GTK_FILE_CHOOSER_ACTION_SAVE,
+-			GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+-			GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+-			NULL);
+-	
+-	gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(save_dialog),
+-			getenv("HOME") ? getenv("HOME") : "/");
+-	
+-	gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(save_dialog),
+-			"domtree.txt");
+-	
+-	if (gtk_dialog_run(GTK_DIALOG(save_dialog)) == GTK_RESPONSE_ACCEPT) {
+-		gchar *filename = gtk_file_chooser_get_filename(
+-				GTK_FILE_CHOOSER(save_dialog));
+-		FILE *fh;
+-		LOG(("Saving dom tree to %s...\n", filename));
+-		
+-		fh = fopen((const char *) filename, "w");
+-		if (fh == NULL) {
+-			warn_user("Error saving box tree dump.",
+-				"Unable to open file for writing.");
+-		} else {
+-			struct browser_window *bw;
+-			bw = nsgtk_get_browser_window(gw->top_level);
+-
+-			if (bw->current_content && 
+-					bw->current_content->type == 
+-					CONTENT_HTML) {
+-				xmlDebugDumpDocument(fh, 
+-					bw->current_content->
+-						data.html.document);
+-			}
+-
+-			fclose(fh);
+-		}
+-		
+-		g_free(filename);
+-	}
+-	
+-	gtk_widget_destroy(save_dialog);
+-	
+-	return TRUE;
++	return FALSE;
+ }
+ 
+ 
diff --git a/recipes/netsurf/netsurf-2.1/fix_makefile.patch b/recipes/netsurf/netsurf-2.1/fix_makefile.patch
new file mode 100644
index 0000000..1783921
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/fix_makefile.patch
@@ -0,0 +1,12 @@
+Index: Makefile
+===================================================================
+--- a/Makefile	(revision 7536)
++++ b/Makefile	(working copy)
+@@ -820,7 +820,6 @@
+ 	@cp -vRL gtk/res/netsurf-16x16.xpm $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+ 	@cp -vRL gtk/res/throbber/*.png $(DESTDIR)$(NETSURF_GTK_RESOURCES)/throbber
+ 	@cp -vRL gtk/res/Aliases $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+-	@cp -vrL gtk/res/docs $(DESTDIR)/$(NETSURF_GTK_RESOURCES)
+ 	gzip -9v < gtk/res/messages > $(DESTDIR)$(NETSURF_GTK_RESOURCES)messages
+ 	gzip -9v < gtk/res/downloads.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)downloads.glade
+ 	gzip -9v < gtk/res/netsurf.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)netsurf.glade
diff --git a/recipes/netsurf/netsurf-2.1/netsurf.desktop b/recipes/netsurf/netsurf-2.1/netsurf.desktop
new file mode 100644
index 0000000..4188d30
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/netsurf.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=NetSurf
+Comment=NetSurf Web Browser
+GenericName=Web Browser
+Icon=netsurf
+Exec=netsurf
+Terminal=false
+StartupNotify=false
+Categories=Network;WebBrowser;
diff --git a/recipes/netsurf/netsurf-2.1/netsurf.png b/recipes/netsurf/netsurf-2.1/netsurf.png
new file mode 100644
index 0000000..3064e5d
Binary files /dev/null and b/recipes/netsurf/netsurf-2.1/netsurf.png differ
diff --git a/recipes/netsurf/netsurf_2.1.bb b/recipes/netsurf/netsurf_2.1.bb
new file mode 100644
index 0000000..073f17f
--- /dev/null
+++ b/recipes/netsurf/netsurf_2.1.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Lightweight web browser capable of handling many of the \
+web standards in use today."
+HOMEPAGE = "http://www.netsurf-browser.org/"
+SECTION = "x11/network"
+LICENSE = "GPLv2"
+
+SRC_URI = "http://www.netsurf-browser.org/downloads/releases/netsurf-${PV}-src.tar.gz \
+	   file://fix_makefile.patch;patch=1 \
+	   file://debugxml_fix.patch;patch=1 \
+	   file://netsurf.png \
+	   file://netsurf.desktop \
+	   file://Makefile.config"
+
+# Workaround for 2.1 tarball (unpacks into netsurf/, not netsurf-2.1/ )
+S = "${WORKDIR}/netsurf"
+
+DEPENDS = "gtk+ lemon-native re2c-native jpeg openssl curl libxml2 \
+	   libglade hubbub libnsgif libnsbmp lcms"
+
+EXTRA_OEMAKE = "CURDIR=${S} DESTDIR=${D} PREFIX=${prefix}"
+
+do_configure() {
+	cp ${WORKDIR}/Makefile.config ${S}/
+}
+
+do_install() {
+	oe_runmake install
+	install -d ${D}/${datadir}/applications
+	install -d ${D}/${datadir}/pixmaps
+	install -m 0644 ${WORKDIR}/netsurf.png ${D}/${datadir}/pixmaps/
+	install -m 0644 ${WORKDIR}/netsurf.desktop ${D}/${datadir}/applications/
+}





More information about the Openembedded-commits mailing list