summaryrefslogtreecommitdiff
path: root/www-client/netsurf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-client/netsurf
reinit the tree, so we can have metadata
Diffstat (limited to 'www-client/netsurf')
-rw-r--r--www-client/netsurf/Manifest11
-rw-r--r--www-client/netsurf/files/netsurf-3.6-CFLAGS.patch67
-rw-r--r--www-client/netsurf/files/netsurf-3.6-conditionally-include-image-headers.patch31
-rw-r--r--www-client/netsurf/files/netsurf-3.6-gstreamer.patch31
-rw-r--r--www-client/netsurf/files/netsurf-3.6-pdf-writer.patch80
-rw-r--r--www-client/netsurf/metadata.xml32
-rw-r--r--www-client/netsurf/netsurf-3.6.ebuild160
7 files changed, 412 insertions, 0 deletions
diff --git a/www-client/netsurf/Manifest b/www-client/netsurf/Manifest
new file mode 100644
index 000000000000..2326c410ff7c
--- /dev/null
+++ b/www-client/netsurf/Manifest
@@ -0,0 +1,11 @@
+AUX netsurf-3.6-CFLAGS.patch 1821 SHA256 f3cda73575d444c5eda021b1d734b6a46d155361732ec675293d709ef1eafd96 SHA512 4eed05c11dc548cce4a0d88fcff547d8efabf3d2bab2067136585fefc5b96ee79be318304c31ed7aa5bebca479d8af082198059de9a05782eb939f0c3f8338e9 WHIRLPOOL 2dbbb04e557279f608ce01cda8279b854f9be270249bd54c0d20926f49d4d2f413bbe656cde2c2b4a5b40a91642bfac9a78297db3aa5b436a1683feff7a4fec2
+AUX netsurf-3.6-conditionally-include-image-headers.patch 598 SHA256 33346c1fc0c71e6e458c6f92a8836a7ee8bb03a8844c9d16a2a4367162d07a67 SHA512 346e7befaeb337cb33963794303eb18cccd280eaa86aed205fee9b50bcb3cbea8d5c4025b439d7d737036e66a76354871b1765eae7dd11e2d1a71dc3084747c3 WHIRLPOOL 386667513660b439508ca0ee90422ac3f6a340fd5d7d280bc9f44146c12a330a7db8c65aea27a39862d2bf1812b932ed5dd86f7572a4706b8678fc25398b274e
+AUX netsurf-3.6-gstreamer.patch 900 SHA256 341bfbf9ee82190dcb19766019523b41b42c4ef5dfeba3cabe73ee58a11980d4 SHA512 9dd8510cc343c2b627001e7ec80603d8e0de8cb4bbd1e8f53e8ffea5b2adfa915633e50a0b6d99b13a453d3375fa66cfb466658931a0f5454f36363d56d53bb3 WHIRLPOOL bc1b2582d2b603c08b39715bd82642437fe3d719f0b0e50cfd81aa837f4af6a0874b4443614d429d64af6bd919428062938ccb99211c2bc245eb421c2f7d8c42
+AUX netsurf-3.6-pdf-writer.patch 2408 SHA256 301061f87a47eeb87d4cec695b47610ba84c877fc9b671d49a2d8a604b558ff4 SHA512 d3aee4ce0b509743a7efbf2262ca4ae64564d5e4b01453c621868eba20ef97bef8322a042a27606196456be38f09a7ca6be82fee3747cb93140e24b265133225 WHIRLPOOL 85c1b3aea9091c71264a73cf7859dfdf217bf6d1dff1f46d7b68b349e434e655f75ad291a80fdfb904a295ebc6890c2b6e225a6b301b404a2f7b908dd572993d
+DIST netsurf-3.6-src.tar.gz 4129091 SHA256 59ae4b50eff9e2a00a0a9742ef546c7de17223139c485af9644f195340979a9c SHA512 6141cd94b2b6c8e56f682599e4929690f6ca668d1f6ff20bad93e30cf3a3b27475146f2b3c9dbc9f1b2e44b729d74c346254959b7def1f8d194e1c6efac3078d WHIRLPOOL 20776d928a60a8da5d1871d2ce1e15af7853a07e3ec995135019bbf579f1b0dde0918f960fe2c51546c6a08b218f9e4143fae5777f52203f831f877382b94740
+DIST netsurf-buildsystem-1.5.tar.gz 38196 SHA256 dbc6afc639f6987b704e6ff4427668787ee7efba77e1bbf76b614699b5daaf71 SHA512 02d85e8f1d2101194a678f7ccf84051390953285a46951d7b327556f8df1a0c416620bd4c7a615e25de438d5d27cfffb69ec5d94eb8379a295dab4c85a96cae4 WHIRLPOOL 7b7d595a2e399b361e71769e509a129af42da5ce823f1b55183efb53898ac2ae731593eb13e1ecc2271ea26ee0948ac35bf99fea280eb72a2bb00164b4b29f09
+DIST netsurf-fb.modes-example.gz 4586 SHA256 df1514790be120f27bd23dfdca71c24112679d45d3cbd3916f9231ec5e2596bb SHA512 753a707dc428212803dd64250bb723a498fdc1c328fdac4df38be533eab3af45f727cdc6b7ced3faaa0e82db182c4eab140b8e81b0d3cfe2152252b89e6d2981 WHIRLPOOL 5a91c32a712b746c993d2fa1d47625f16241e845d556b8113ab957eda7385ac5bdde5f78b0de2dad4df544c7d7c13d8145ebb9d81272af9a3759ad4e307c3767
+EBUILD netsurf-3.6.ebuild 6584 SHA256 8e975424e3220bf2075f78f2f5551f574c9761d4d79ada8c550f6580fa00065a SHA512 5c0ca0d136ef9b2ed899a0626409117288f60424e1c6aee1ef0e0afc9ce32cf51384c9b861498fc13d487282fb705f3f9748e0dc9f557ea3d77e1e296e9ea553 WHIRLPOOL 7167b8d242ec3ee116c272646498df8019f79ac4fd7caaa3f6a2e3517c858d4c4e0acf00cc3271e24357837498cf3743404966e66729fd9e49a1226ca3de2fec
+MISC ChangeLog 5756 SHA256 31480b0376286678dcd5a631078b8a44566c9ceb7ebcffd6415fbd9c9558c8a7 SHA512 b8c8d48329849a72c4f4c834c79e0f87ffcc1595f1c941b42a9a0c681727b291d97e3c2508d0f46cac6b8ca73f54ef6355fe8a9703f0f57f577fe2ed692622c1 WHIRLPOOL f959a842426b8533830bbed0981cb051de2fc26835244e87ef28c135826c23d03bcb32bdeeb34841811e6b205d84cf4eb2b2877ec6daa1b8548391b3ec000b33
+MISC ChangeLog-2015 3374 SHA256 034981f9db4b3bac8a916443a55ec1eccbc7b1451e4c30bd6561bc24e2e4c537 SHA512 690f1b1221b5e4f75315ab2a27a4df25246000ab95cbea0fc2eff2ef39d264a5db88d7373e49a0f06f1c255c2021c435ce67f2b46c6b958a6039184e32f0c395 WHIRLPOOL 03ccbed25bedb2153fb106a1b5609ad5eea5e42b65aa96598b4d52a4f0fb20c1d1cbb69b790ad59b4085bb5e31987fa561e4c527bf9c8b5556976da41c3bb78f
+MISC metadata.xml 1855 SHA256 9bd3c65a1eb2a123860627a6cda185f60fef6507df38f7c10074eacfb6406d09 SHA512 bef58b8b699cd7d7259c6affd5fb4a12f0358b57b9a1e0b7db938a7ef5c633c82acd5136b047b42f55794cc9c555825bd7a407c9a15d2ade72ba2d1d831e21c1 WHIRLPOOL 7a591ccb13414b2b7a26259b7053650e9555e40abff0b3311c9cd119f9007e15415090f3148f2ac671d99068bc266e97a062b3bfc5554843fc993bcf52c51e68
diff --git a/www-client/netsurf/files/netsurf-3.6-CFLAGS.patch b/www-client/netsurf/files/netsurf-3.6-CFLAGS.patch
new file mode 100644
index 000000000000..8004aa4c6206
--- /dev/null
+++ b/www-client/netsurf/files/netsurf-3.6-CFLAGS.patch
@@ -0,0 +1,67 @@
+--- netsurf-3.6/Makefile.defaults
++++ netsurf-3.6/Makefile.defaults
+@@ -96,12 +96,6 @@
+ # Valid options: YES, NO
+ NETSURF_FS_BACKING_STORE := NO
+
+-# Initial CFLAGS. Optimisation level etc. tend to be target specific.
+-CFLAGS :=
+-
+-# Initial CXXFLAGS. Optimisation level etc. tend to be target specific.
+-CXXFLAGS :=
+-
+ # Default installation/execution prefix
+ PREFIX ?= /usr/local
+
+--- netsurf-3.6/frontends/framebuffer/Makefile
++++ netsurf-3.6/frontends/framebuffer/Makefile
+@@ -20,7 +20,7 @@
+ CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
+ CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
+
+-CFLAGS += -std=c99 -g -Dsmall \
++CFLAGS += -std=c99 -Dsmall \
+ -D_BSD_SOURCE \
+ -D_DEFAULT_SOURCE \
+ -D_XOPEN_SOURCE=600 \
+--- netsurf-3.6/frontends/framebuffer/Makefile.defaults
++++ netsurf-3.6/frontends/framebuffer/Makefile.defaults
+@@ -3,7 +3,7 @@
+ # ----------------------------------------------------------------------------
+
+ # Optimisation levels
+-CFLAGS += -O2
++CFLAGS +=
+
+ # Framebuffer default surface provider.
+ # Valid values are: x, sdl, linux, vnc, able,
+--- netsurf-3.6/frontends/gtk/Makefile
++++ netsurf-3.6/frontends/gtk/Makefile
+@@ -33,7 +33,7 @@
+ endif
+
+
+-GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk -g \
++GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk \
+ $(GTKDEPFLAGS) \
+ -D_BSD_SOURCE \
+ -D_DEFAULT_SOURCE \
+--- netsurf-3.6/frontends/gtk/Makefile.defaults
++++ netsurf-3.6/frontends/gtk/Makefile.defaults
+@@ -39,4 +39,4 @@
+ NETSURF_GTK_MAJOR ?= 2
+
+ # Optimisation levels
+-CFLAGS += -O2
++CFLAGS +=
+--- netsurf-3.6/test/Makefile
++++ netsurf-3.6/test/Makefile
+@@ -105,7 +105,7 @@
+ COMMON_WARNFLAGS += -Wno-unused-parameter
+ endif
+
+-TESTCFLAGS := -std=c99 -g \
++TESTCFLAGS := -std=c99 \
+ $(COMMON_WARNFLAGS) \
+ -D_BSD_SOURCE \
+ -D_POSIX_C_SOURCE=200809L \
diff --git a/www-client/netsurf/files/netsurf-3.6-conditionally-include-image-headers.patch b/www-client/netsurf/files/netsurf-3.6-conditionally-include-image-headers.patch
new file mode 100644
index 000000000000..06754464cb6c
--- /dev/null
+++ b/www-client/netsurf/files/netsurf-3.6-conditionally-include-image-headers.patch
@@ -0,0 +1,31 @@
+--- netsurf-3.6/content/handlers/image/image.c
++++ netsurf-3.6/content/handlers/image/image.c
+@@ -27,14 +27,28 @@
+ #include "netsurf/content.h"
+ #include "desktop/gui_internal.h"
+
++#ifdef WITH_BMP
+ #include "image/bmp.h"
++#endif
++#ifdef WITH_GIF
+ #include "image/gif.h"
++#endif
+ #include "image/ico.h"
++#ifdef WITH_JPEG
+ #include "image/jpeg.h"
++#endif
++#ifdef WITH_NSSPRITE
+ #include "image/nssprite.h"
++#endif
++#ifdef WITH_PNG
+ #include "image/png.h"
++#endif
++#ifdef WITH_RSVG
+ #include "image/rsvg.h"
++#endif
++#ifdef WITH_NS_SVG
+ #include "image/svg.h"
++#endif
+ #include "image/image.h"
+
+ /**
diff --git a/www-client/netsurf/files/netsurf-3.6-gstreamer.patch b/www-client/netsurf/files/netsurf-3.6-gstreamer.patch
new file mode 100644
index 000000000000..6aca4f6abdf9
--- /dev/null
+++ b/www-client/netsurf/files/netsurf-3.6-gstreamer.patch
@@ -0,0 +1,31 @@
+--- netsurf-3.6/frontends/gtk/Makefile
++++ netsurf-3.6/frontends/gtk/Makefile
+@@ -16,7 +16,6 @@
+
+ # GTK and GLIB flags to disable depricated usage
+ GTKDEPFLAGS := -DG_DISABLE_SINGLE_INCLUDES \
+- -DG_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_SINGLE_INCLUDES \
+ -DGTK_MULTIHEAD_SAFE \
+ -DPANGO_DISABLE_DEPRECATED
+--- netsurf-3.6/content/handlers/image/video.c
++++ netsurf-3.6/content/handlers/image/video.c
+@@ -22,6 +22,8 @@
+ #include "content/content_protected.h"
+
+ #include "image/video.h"
++#include "utils/http/parameter.h"
++#include "content/llcache.h"
+
+ typedef struct nsvideo_content {
+ struct content base;
+--- netsurf-3.6/content/content_factory.h
++++ netsurf-3.6/content/content_factory.h
+@@ -25,6 +25,7 @@
+
+ #include "netsurf/content_type.h"
+ #include "utils/errors.h"
++#include "utils/utils.h"
+
+ #define CONTENT_FACTORY_REGISTER_TYPES(HNAME, HTYPELIST, HHANDLER) \
+ \
diff --git a/www-client/netsurf/files/netsurf-3.6-pdf-writer.patch b/www-client/netsurf/files/netsurf-3.6-pdf-writer.patch
new file mode 100644
index 000000000000..5824adc1ecbf
--- /dev/null
+++ b/www-client/netsurf/files/netsurf-3.6-pdf-writer.patch
@@ -0,0 +1,80 @@
+--- netsurf-3.6/desktop/font_haru.c
++++ netsurf-3.6/desktop/font_haru.c
+@@ -37,7 +37,7 @@
+ #include <hpdf.h>
+
+ #include "utils/nsoption.h"
+-#include "desktop/save_pdf/font_haru.h"
++#include "desktop/font_haru.h"
+ #include "desktop/font.h"
+ #include "utils/log.h"
+
+--- netsurf-3.6/desktop/save_pdf.c
++++ netsurf-3.6/desktop/save_pdf.c
+@@ -60,6 +60,8 @@
+ #include "utils/useragent.h"
+ #include "content/hlcache.h"
+ #include "utils/nsoption.h"
++#include "desktop/gui_misc.h"
++#include "desktop/gui_internal.h"
+ #include "netsurf/bitmap.h"
+
+ #include "netsurf/plotters.h"
+@@ -450,11 +452,6 @@
+
+ switch(content_get_type(content)){
+ /*Handle "embeddable" types of images*/
+- case CONTENT_JPEG:
+- image = HPDF_LoadJpegImageFromMem(pdf_doc,
+- (const HPDF_BYTE *) source_data,
+- source_size);
+- break;
+
+ /*Disabled until HARU PNG support will be more stable.
+
+@@ -700,7 +697,7 @@
+
+
+ #ifndef PDF_DEBUG
+- if (option_enable_PDF_compression)
++ if (nsoption_bool(enable_PDF_compression))
+ HPDF_SetCompressionMode(pdf_doc, HPDF_COMP_ALL); /*Compression on*/
+ #endif
+ HPDF_SetInfoAttr(pdf_doc, HPDF_INFO_CREATOR, user_agent_string());
+@@ -774,7 +771,7 @@
+ assert(settings->output != NULL);
+
+ /*Encryption on*/
+- if (option_enable_PDF_password)
++ if (nsoption_bool(enable_PDF_password))
+ guit->misc->pdf_password(&owner_pass, &user_pass,
+ (void *)settings->output);
+ else
+@@ -789,7 +786,7 @@
+ {
+ nserror res = NSERROR_OK;
+
+- if (option_enable_PDF_password && owner_pass != NULL ) {
++ if (nsoption_bool(enable_PDF_password) && owner_pass != NULL ) {
+ HPDF_SetPassword(pdf_doc, owner_pass, user_pass);
+ HPDF_SetEncryptionMode(pdf_doc, HPDF_ENCRYPT_R3, 16);
+ free(owner_pass);
+--- netsurf-3.6/frontends/gtk/scaffolding.c
++++ netsurf-3.6/frontends/gtk/scaffolding.c
+@@ -731,14 +731,14 @@
+
+ free(url_name);
+
+- strncpy(dirname, option_downloads_directory, PATH_MAX);
++ strncpy(dirname, nsoption_charp(downloads_directory), PATH_MAX);
+ strncat(dirname, "/", PATH_MAX - strlen(dirname));
+ dirname[PATH_MAX - 1] = '\0';
+
+ /* this way the scale used by PDF functions is synchronized with that
+ * used by the all-purpose print interface
+ */
+- haru_nsfont_set_scale((float)option_export_scale / 100);
++ haru_nsfont_set_scale((float)nsoption_int(export_scale) / 100);
+
+ save_dialog = gtk_file_chooser_dialog_new("Export to PDF", g->window,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
diff --git a/www-client/netsurf/metadata.xml b/www-client/netsurf/metadata.xml
new file mode 100644
index 000000000000..e53232c547c3
--- /dev/null
+++ b/www-client/netsurf/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<upstream>
+ <changelog>http://download.netsurf-browser.org/netsurf/releases/ChangeLog.txt</changelog>
+</upstream>
+<use>
+ <flag name="bmp">BMP bitmap image support (media-libs/libnsbmp)</flag>
+ <flag name="fbcon_frontend_able">Use framebuffer frontend able</flag>
+ <flag name="fbcon_frontend_linux">Use framebuffer frontend linux</flag>
+ <flag name="fbcon_frontend_sdl">Use framebuffer frontend sdl</flag>
+ <flag name="fbcon_frontend_vnc">Use framebuffer frontend vnc</flag>
+ <flag name="fbcon_frontend_x">Use framebuffer frontend X</flag>
+ <flag name="pdf-writer">PDF output support (media-libs/libharu)</flag>
+ <flag name="rosprite">RISC OS Sprite bitmap image support (media-libs/librosprite)</flag>
+ <flag name="svgtiny">SVG image support via media-libs/svgatiny instead of gnome-base/librsvg</flag>
+ <flag name="webp">WebP image support (media-libs/libwebp)</flag>
+ <flag name="psl">Use public suffix list via media-libs/libnspsl</flag>
+ <flag name="gtk">Build GTK GUI, defaults to GTK3</flag>
+ <flag name="gtk2">Build GTK2 GUI</flag>
+ <flag name="gtk3">Build GTK3 GUI</flag>
+ <flag name="duktape">Use duktape.org javascript engine</flag>
+</use>
+<longdescription lang="en">
+NetSurf is a free, open source web browser. It is written in C, 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.
+Whether you want to check your webmail, read the news or post to discussion forums, NetSurf is your lightweight gateway to the world wide web. Actively developed, NetSurf is continually evolving and improving.
+</longdescription>
+</pkgmetadata>
diff --git a/www-client/netsurf/netsurf-3.6.ebuild b/www-client/netsurf/netsurf-3.6.ebuild
new file mode 100644
index 000000000000..4397fe9dfaa6
--- /dev/null
+++ b/www-client/netsurf/netsurf-3.6.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+NETSURF_COMPONENT_TYPE=binary
+NETSURF_BUILDSYSTEM=buildsystem-1.5
+inherit netsurf
+
+DESCRIPTION="a free, open source web browser"
+HOMEPAGE="http://www.netsurf-browser.org/"
+SRC_URI="http://download.netsurf-browser.org/netsurf/releases/source/${P}-src.tar.gz
+ http://xmw.de/mirror/netsurf-fb.modes-example.gz
+ ${NETSURF_BUILDSYSTEM_SRC_URI}"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc"
+IUSE="+bmp +duktape fbcon truetype +gif gstreamer gtk gtk2 gtk3 +javascript +jpeg +mng
+ pdf-writer +png +psl +rosprite +svg +svgtiny +webp fbcon_frontend_able
+ fbcon_frontend_linux fbcon_frontend_sdl fbcon_frontend_vnc fbcon_frontend_x"
+
+REQUIRED_USE="|| ( fbcon gtk gtk2 gtk3 )
+ amd64? ( abi_x86_32? ( javascript? ( duktape ) ) )
+ fbcon? ( ^^ ( fbcon_frontend_able fbcon_frontend_linux fbcon_frontend_sdl
+ fbcon_frontend_vnc fbcon_frontend_x ) )
+ duktape? ( javascript )"
+
+RDEPEND=">=dev-libs/libnsutils-0.0.2[${MULTILIB_USEDEP}]
+ >=dev-libs/libutf8proc-1.1.6-r1[${MULTILIB_USEDEP}]
+ dev-libs/libxml2:2[${MULTILIB_USEDEP}]
+ net-misc/curl[${MULTILIB_USEDEP}]
+ >=dev-libs/libcss-0.6.0[${MULTILIB_USEDEP}]
+ >=net-libs/libhubbub-0.3.1-r1[${MULTILIB_USEDEP}]
+ >=net-libs/libdom-0.3.0[${MULTILIB_USEDEP}]
+ bmp? ( >=media-libs/libnsbmp-0.1.2-r1[${MULTILIB_USEDEP}] )
+ fbcon? ( >=dev-libs/libnsfb-0.1.3-r1[${MULTILIB_USEDEP}]
+ truetype? ( media-fonts/dejavu
+ >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+ )
+ gif? ( >=media-libs/libnsgif-0.1.2-r1[${MULTILIB_USEDEP}] )
+ gtk2? ( dev-libs/glib:2[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:2[${MULTILIB_USEDEP}] )
+ gtk3? ( dev-libs/glib:2[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ gtk? ( dev-libs/glib:2[${MULTILIB_USEDEP}]
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] )
+ gstreamer? ( media-libs/gstreamer:0.10[${MULTILIB_USEDEP}] )
+ javascript? ( >=dev-libs/nsgenbind-0.3[${MULTILIB_USEDEP}]
+ !duktape? ( dev-lang/spidermonkey:0= ) )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ mng? ( >=media-libs/libmng-1.0.10-r2[${MULTILIB_USEDEP}] )
+ pdf-writer? ( media-libs/libharu[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.2.51:0[${MULTILIB_USEDEP}] )
+ psl? ( media-libs/libnspsl[${MULTILIB_USEDEP}] )
+ rosprite? ( >=media-libs/librosprite-0.1.2-r1[${MULTILIB_USEDEP}] )
+ svg? ( svgtiny? ( >=media-libs/libsvgtiny-0.1.3-r1[${MULTILIB_USEDEP}] )
+ !svgtiny? ( gnome-base/librsvg:2[${MULTILIB_USEDEP}] ) )
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ dev-libs/check[${MULTILIB_USEDEP}]
+ dev-perl/HTML-Parser"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.6-CFLAGS.patch
+ "${FILESDIR}"/${PN}-3.6-conditionally-include-image-headers.patch
+ "${FILESDIR}"/${PN}-3.6-pdf-writer.patch
+ "${FILESDIR}"/${PN}-3.6-gstreamer.patch )
+DOCS=( fb.modes README Docs/USING-Framebuffer
+ Docs/ideas/{cache,css-engine,render-library}.txt )
+
+src_prepare() {
+ rm -r frontends/{amiga,atari,beos,cocoa,monkey,riscos,windows} || die
+
+ mv "${WORKDIR}"/netsurf-fb.modes-example fb.modes
+
+ netsurf_src_prepare
+}
+
+src_configure() {
+ netsurf_src_configure
+
+ netsurf_makeconf+=(
+ NETSURF_USE_BMP=$(usex bmp YES NO)
+ NETSURF_USE_GIF=$(usex gif YES NO)
+ NETSURF_USE_JPEG=$(usex jpeg YES NO)
+ NETSURF_USE_PNG=$(usex png YES NO)
+ NETSURF_USE_NSPSL=$(usex psl YES NO)
+ NETSURF_USE_MNG=$(usex mng YES NO)
+ NETSURF_USE_WEBP=$(usex webp YES NO)
+ NETSURF_USE_MOZJS=$(usex javascript $(usex duktape NO YES) NO)
+ NETSURF_USE_JS=NO
+ NETSURF_USE_DUKTAPE=$(usex javascript $(usex duktape YES NO) NO)
+ NETSURF_USE_HARU_PDF=$(usex pdf-writer YES NO)
+ NETSURF_USE_NSSVG=$(usex svg $(usex svgtiny YES NO) NO)
+ NETSURF_USE_RSVG=$(usex svg $(usex svgtiny NO YES) NO)
+ NETSURF_USE_ROSPRITE=$(usex rosprite YES NO)
+ PKG_CONFIG=$(tc-getPKG_CONFIG)
+ $(usex fbcon_frontend_able NETSURF_FB_FRONTEND=able "")
+ $(usex fbcon_frontend_linux NETSURF_FB_FRONTEND=linux "")
+ $(usex fbcon_frontend_sdl NETSURF_FB_FRONTEND=sdl "")
+ $(usex fbcon_frontend_vnc NETSURF_FB_FRONTEND=vnc "")
+ $(usex fbcon_frontend_x NETSURF_FB_FRONTEND=x "")
+ NETSURF_FB_FONTLIB=$(usex truetype freetype internal)
+ NETSURF_FB_FONTPATH=${EROOT}usr/share/fonts/dejavu
+ TARGET=dummy
+ NETSURF_USE_VIDEO=dummy
+ )
+}
+
+src_compile() {
+ if use fbcon ; then
+ netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=framebuffer}" )
+ netsurf_makeconf=( "${netsurf_makeconf[@]/NETSURF_USE_VIDEO=*/NETSURF_USE_VIDEO=NO}" )
+ netsurf_src_compile
+ fi
+ if use gtk2 ; then
+ netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk}" )
+ netsurf_makeconf=( "${netsurf_makeconf[@]/NETSURF_USE_VIDEO=*/NETSURF_USE_VIDEO=$(usex gstreamer YES NO)}" )
+ netsurf_src_compile
+ fi
+ if use gtk3 || use gtk ; then
+ netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk3}" )
+ netsurf_makeconf=( "${netsurf_makeconf[@]/NETSURF_USE_VIDEO=*/NETSURF_USE_VIDEO=$(usex gstreamer YES NO)}" )
+ netsurf_src_compile
+ fi
+}
+
+src_install() {
+ sed -e '1iexit;' \
+ -i "${WORKDIR}"/*/utils/git-testament.pl || die
+
+ if use fbcon ; then
+ netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=framebuffer}" )
+ netsurf_makeconf=( "${netsurf_makeconf[@]/NETSURF_USE_VIDEO=*/NETSURF_USE_VIDEO=NO}" )
+ netsurf_src_install
+ elog "framebuffer binary has been installed as netsurf-fb"
+ make_desktop_entry "${EROOT}"usr/bin/netsurf-fb NetSurf-framebuffer netsurf "Network;WebBrowser"
+ elog "In order to setup the framebuffer console, netsurf needs an /etc/fb.modes"
+ elog "You can use an example from /usr/share/doc/${PF}/fb.modes.* (bug 427092)."
+ elog "Please make /dev/input/mice readable to the account using netsurf-fb."
+ elog "Either use chmod a+r /dev/input/mice (security!!!) or use an group."
+ fi
+ if use gtk2 ; then
+ netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk}" )
+ netsurf_makeconf=( "${netsurf_makeconf[@]/NETSURF_USE_VIDEO=*/NETSURF_USE_VIDEO=$(usex gstreamer YES NO)}" )
+ netsurf_src_install
+ elog "netsurf gtk2 version has been installed as netsurf-gtk"
+ make_desktop_entry "${EROOT}"usr/bin/netsurf-gtk NetSurf-gtk netsurf "Network;WebBrowser"
+ fi
+ if use gtk3 || use gtk ; then
+ netsurf_makeconf=( "${netsurf_makeconf[@]/TARGET=*/TARGET=gtk3}" )
+ netsurf_makeconf=( "${netsurf_makeconf[@]/NETSURF_USE_VIDEO=*/NETSURF_USE_VIDEO=$(usex gstreamer YES NO)}" )
+ netsurf_src_install
+ elog "netsurf gtk3 version has been installed as netsurf-gtk3"
+ make_desktop_entry "${EROOT}"usr/bin/netsurf-gtk3 NetSurf-gtk3 netsurf "Network;WebBrowser"
+ fi
+
+ insinto /usr/share/pixmaps
+ doins frontends/gtk/res/netsurf.xpm
+}