aboutsummaryrefslogtreecommitdiff
path: root/netsurf
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2011-01-02 02:07:27 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2011-01-02 02:07:27 +0100
commit0a95e15cdc87de0136734e784d487f9b03170bbb (patch)
treeadae83e51ba5b78869f51aa43cfe8ebfb762ec41 /netsurf
downloadnanonote-ports-0a95e15cdc87de0136734e784d487f9b03170bbb.tar.gz
initial checkin of my nanonote ports feed, including a small README.
Diffstat (limited to 'netsurf')
-rw-r--r--netsurf/Makefile66
-rw-r--r--netsurf/files/DejaVuSans.ttfbin0 -> 622020 bytes
-rw-r--r--netsurf/files/Makefile.config114
-rw-r--r--netsurf/patches/010-flags.patch11
-rw-r--r--netsurf/patches/100-default-options.patch48
5 files changed, 239 insertions, 0 deletions
diff --git a/netsurf/Makefile b/netsurf/Makefile
new file mode 100644
index 0000000..75ec8e4
--- /dev/null
+++ b/netsurf/Makefile
@@ -0,0 +1,66 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=netsurf
+PKG_VERSION:=r10879
+PKG_RELEASE:=1
+
+PKG_SOURCE:=netsurf-$(PKG_VERSION).tar.gz
+#PKG_SOURCE_URL:=
+PKG_MD5SUM:=6edade4588c6183376d9bb4f1b172385
+
+PKG_BUILD_DIR=$(BUILD_DIR)/netsurf-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/netsurf
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Web
+ DEPENDS:=+libparserutils +libwapcaplet +hubbub +libcss +libnsgif +libnsfb \
+ +libjpeg +libpng +libfreetype +libcurl +libxml2 +libiconv
+ TITLE:=NetSurf Web Browser (Framebuffer)
+ URL:=http://www.netsurf-browser.org/
+endef
+
+define Package/netsurf/description
+NetSurf is a free, open source web browser.
+It is written in C and released under the GNU Public Licence version 2.
+NetSurf has its own layout and rendering engine entirely written from scratch.
+It is small and capable of handling many of the web standards in use today.
+endef
+
+# SDL depends on DirectFB but somehow the libs are not not found automatically
+EXTRA_LDFLAGS += $(shell $(STAGING_DIR)/root-xburst/usr/bin/directfb-config --libs --prefix=$(STAGING_DIR)/usr)
+
+EXTRA_CPPFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv/include
+EXTRA_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv
+
+# for libcurl
+# EXTRA_LDFLAGS += -lgnutls
+
+MAKE_VARS := \
+ TARGET=framebuffer \
+ PREFIX=/usr
+
+define Build/Configure
+ $(CP) $(SOURCE)/files/Makefile.config $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+ $(CONFIGURE_VARS) \
+ $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" \
+ $(MAKE_VARS) install
+endef
+
+define Package/netsurf/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/netsurf $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/usr/share
+ $(CP) -r $(PKG_INSTALL_DIR)/usr/share/netsurf $(1)/usr/share
+
+ # provide at least one font, so netsurf will still start up even when no fonts are installed
+ $(INSTALL_DATA) $(SOURCE)/files/DejaVuSans.ttf $(1)/usr/share/netsurf/sans_serif.ttf
+endef
+
+$(eval $(call BuildPackage,netsurf))
diff --git a/netsurf/files/DejaVuSans.ttf b/netsurf/files/DejaVuSans.ttf
new file mode 100644
index 0000000..569a6e2
--- /dev/null
+++ b/netsurf/files/DejaVuSans.ttf
Binary files differ
diff --git a/netsurf/files/Makefile.config b/netsurf/files/Makefile.config
new file mode 100644
index 0000000..2a4ac74
--- /dev/null
+++ b/netsurf/files/Makefile.config
@@ -0,0 +1,114 @@
+#
+# NetSurf Nanonote build setup
+# based on Makefile.defaults
+#
+
+# ----------------------------------------------------------------------------
+# Options relating to all versions of NetSurf
+# ----------------------------------------------------------------------------
+
+# Enable NetSurf's use of libnsbmp for displaying BMPs and ICOs
+# Valid options: YES, NO
+NETSURF_USE_BMP := NO
+
+# Enable NetSurf's use of libnsgif for displaying GIFs
+# Valid options: YES, NO (highly recommended)
+NETSURF_USE_GIF := YES
+
+# Enable NetSurf's use of libjpeg for displaying JPEGs
+# Valid options: YES, NO (highly recommended)
+NETSURF_USE_JPEG := YES
+
+# Enable NetSurf's use of libpng for displaying PNGs. If MNG and PNG
+# are both enabled then NetSurf will choose libpng for PNGs, leaving
+# MNGs and JNGs to libmng.
+# Valid options: YES, NO (at least one of PNG/MNG highly recommended)
+NETSURF_USE_PNG := YES
+
+# Enable NetSurf's use of libmng for displaying MNGs, JNGs and PNGs
+# Valid options: YES, NO (at least one of PNG/MNG highly recommended)
+NETSURF_USE_MNG := NO
+
+# Enable NetSurf's use of libwebp/libvpx for displaying WebPs
+# Valid options: YES, NO
+NETSURF_USE_WEBP := NO
+
+# Enable NetSurf's use of libharu for PDF export and GTK printing support.
+# There is no auto-detection available for this, as it does not have a
+# pkg-config file.
+# Valid options: YES, NO
+NETSURF_USE_HARU_PDF := NO
+
+# Enable stripping the NetSurf binary
+# Valid options: YES, NO
+# (OpenWRT toolchain does that...)
+NETSURF_STRIP_BINARY := NO
+
+# Template used for constructing the User Agent: string. The first two
+# replacements are major/minor version, second two are OS and architecture.
+# Please don't be tempted to mention Mozilla here! Let's let that lie die.
+NETSURF_UA_FORMAT_STRING := "NetSurf/%d.%d (%s; %s)"
+
+# Default home page, if one is not defined by the user. Note that this
+# option does not apply to the RISC OS version, as it has its own local
+# home page, and it can be changed by editing the end of gui_init2() in
+# riscos/gui.c
+NETSURF_HOMEPAGE := "http://www.netsurf-browser.org/welcome/"
+
+# Force using glibc internal iconv implementation instead of external libiconv
+# Valid options: YES, NO
+NETSURF_USE_LIBICONV_PLUG := NO
+
+# Initial CFLAGS. Optimisation level etc. tend to be target specific.
+# (you would like to overwrite what's passed from the environment, wouldn't you?)
+CFLAGS ?=
+
+# Default installation/execution prefix
+PREFIX ?= /usr
+
+# ----------------------------------------------------------------------------
+# Framebuffer-target-specific options
+# ----------------------------------------------------------------------------
+ifeq ($(TARGET),framebuffer)
+ # Optimisation levels
+ CFLAGS += -O2 -Wuninitialized
+
+ # Framebuffer default surface provider.
+ # Valid values are: x, sdl, linux, vnc, able,
+ NETSURF_FB_FRONTEND := sdl
+
+ # Use libharu to enable PDF export and GTK printing support.
+ # Valid options: YES, NO
+ NETSURF_USE_HARU_PDF := NO
+
+ # Enable NetSurf's use of librosprite for displaying RISC OS Sprites
+ # Valid options: YES, NO, AUTO
+ NETSURF_USE_ROSPRITE := NO
+
+ # Library to use for font plotting
+ # Valid options: internal, freetype
+ NETSURF_FB_FONTLIB := freetype
+
+ # freetype compiled in font locations
+ NETSURF_FB_FONT_SANS_SERIF := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+ NETSURF_FB_FONT_SANS_SERIF_BOLD := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
+ NETSURF_FB_FONT_SANS_SERIF_ITALIC := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
+ NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
+ NETSURF_FB_FONT_SERIF := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
+ NETSURF_FB_FONT_SERIF_BOLD := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
+ NETSURF_FB_FONT_MONOSPACE := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
+ NETSURF_FB_FONT_MONOSPACE_BOLD := /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
+ NETSURF_FB_FONT_CURSIVE := /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
+ NETSURF_FB_FONT_FANTASY := /usr/share/fonts/truetype/msttcorefonts/Impact.ttf
+
+ # Framebuffer frontends may have differing root paths for resources
+ # As such, these specify the resource path and config path.
+ NETSURF_FB_RESPATH_linux := $(PREFIX)/share/netsurf/
+ NETSURF_FB_RESPATH_dummy := ./
+ NETSURF_FB_RESPATH_sdl := $(PREFIX)/share/netsurf/
+
+ NETSURF_FRAMEBUFFER_RESOURCES = $(NETSURF_FB_RESPATH_$(NETSURF_FB_FRONTEND))
+ NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
+
+endif
+
diff --git a/netsurf/patches/010-flags.patch b/netsurf/patches/010-flags.patch
new file mode 100644
index 0000000..d28552f
--- /dev/null
+++ b/netsurf/patches/010-flags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.defaults 2010-10-10 18:49:57.849134975 +0200
++++ b/Makefile.defaults 2010-10-10 18:50:32.767910968 +0200
+@@ -83,7 +83,7 @@
+ NETSURF_USE_LIBICONV_PLUG := YES
+
+ # Initial CFLAGS. Optimisation level etc. tend to be target specific.
+-CFLAGS :=
++CFLAGS += $(CPPFLAGS)
+
+ # Default installation/execution prefix
+ PREFIX ?= /usr/local
diff --git a/netsurf/patches/100-default-options.patch b/netsurf/patches/100-default-options.patch
new file mode 100644
index 0000000..f8036e2
--- /dev/null
+++ b/netsurf/patches/100-default-options.patch
@@ -0,0 +1,48 @@
+--- a/framebuffer/options.h 2010-10-10 19:41:15.917891618 +0200
++++ b/framebuffer/options.h 2010-10-10 19:43:03.217893158 +0200
+@@ -59,13 +59,13 @@
+
+
+ #define EXTRA_OPTION_DEFINE \
+- int option_fb_depth = 32; \
++ int option_fb_depth = 24; \
+ int option_fb_refresh = 70; \
+ char *option_fb_device = 0; \
+ char *option_fb_input_devpath = 0; \
+ char *option_fb_input_glob = 0; \
+- int option_fb_furniture_size = 18; \
+- int option_fb_toolbar_size = 30; \
++ int option_fb_furniture_size = 10; \
++ int option_fb_toolbar_size = 15; \
+ char *option_fb_toolbar_layout; \
+ bool option_fb_osk = false; \
+ bool option_fb_font_monochrome = false; \
+--- a/framebuffer/gui.c 2010-10-10 19:34:23.097901020 +0200
++++ b/framebuffer/gui.c 2010-10-10 19:48:12.397888727 +0200
+@@ -59,7 +59,7 @@
+ #include "desktop/history_core.h"
+ #include "content/fetch.h"
+
+-#define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrut"
++#define NSFB_TOOLBAR_DEFAULT_LAYOUT "bfsrut"
+
+ char *default_stylesheet_url;
+ char *quirks_stylesheet_url;
+@@ -389,14 +389,14 @@
+ LOG(("argc %d, argv %p", argc, argv));
+
+ fename = "sdl";
+- febpp = 32;
++ febpp = 24;
+
+ if ((option_window_width != 0) && (option_window_height != 0)) {
+ fewidth = option_window_width;
+ feheight = option_window_height;
+ } else {
+- fewidth = 800;
+- feheight = 600;
++ fewidth = 320;
++ feheight = 240;
+ }
+
+ if (option_homepage_url != NULL && option_homepage_url[0] != '\0')