This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
From b42e4b5bfca030965dcfca993a47a6ddaa941287 Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Sun, 25 Nov 2018 18:27:54 +0100
Subject: [PATCH] avoid system perl dependencies
this subroutine format is used for android target.
with eval the load of HTML::Entities is deferred.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
netsurf/utils/split-messages.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netsurf/utils/split-messages.pl b/netsurf/utils/split-messages.pl
index 4b50dde..e47dded 100644
--- a/netsurf/utils/split-messages.pl
+++ b/netsurf/utils/split-messages.pl
@@ -311,7 +311,7 @@ TXT
sub footer { qq|</resources>| }
sub format
{
- use HTML::Entities qw(encode_entities);
+ eval q|use HTML::Entities qw(encode_entities);|;
my $escaped = encode_entities( $_[1], '<>&"' );
qq| <string name="$_[0]">$escaped</string>\n|;
}
--
2.17.1

View File

@@ -0,0 +1,30 @@
From 2419ad79b25fcc1746178aba609fddbb0aa8c9e0 Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Sat, 1 Dec 2018 16:10:13 +0100
Subject: [PATCH] build nsgenbind for the build machine
The nsgenbind tool is meant to be executed on the build machine during
the build, so it should not be built with the cross-compiler, but with
the native compiler.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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

View File

@@ -0,0 +1,27 @@
From 7d7c59dbfc92fcbcd0eac2c84e0fb98662c4bd71 Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Sat, 8 Dec 2018 09:43:40 +0100
Subject: [PATCH] fix compilation without curl
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
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

56
package/netsurf/Config.in Normal file
View File

@@ -0,0 +1,56 @@
# netsurf mixes up host and target CFLAGS, so it isn't compatible with
# architectures where we pass ABI specific compiler flags (TARGET_ABI)
config BR2_PACKAGE_NETSURF_ARCH_SUPPORTS
bool
default y if !((BR2_arc && BR2_ARC_ATOMIC_EXT) || \
BR2_powerpc_8540 || BR2_powerpc_8548 || BR2_powerpc_e500mc || \
BR2_xtensa)
comment "netsurf needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
depends on BR2_PACKAGE_NETSURF_ARCH_SUPPORTS
config BR2_PACKAGE_NETSURF
bool "netsurf"
# static linking support is broken beyond repair
depends on !BR2_STATIC_LIBS
depends on BR2_PACKAGE_NETSURF_ARCH_SUPPORTS
select BR2_PACKAGE_EXPAT
select BR2_PACKAGE_JPEG
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
select BR2_PACKAGE_LIBPNG
select BR2_PACKAGE_OPENSSL if BR2_PACKAGE_LIBCURL
help
NetSurf is a compact graphical web browser which aims for
HTML5, CSS and JavaScript support.
Frontends: GTK (X11), SDL 1.2 (framebuffer)
http://www.netsurf-browser.org/
if BR2_PACKAGE_NETSURF
choice
prompt "Netsurf frontend"
default BR2_PACKAGE_NETSURF_SDL
config BR2_PACKAGE_NETSURF_SDL
bool "sdl frontend"
select BR2_PACKAGE_SDL
help
Select SDL 1.2 frontend.
config BR2_PACKAGE_NETSURF_GTK
bool "gtk2 frontend"
depends on BR2_PACKAGE_LIBGTK2
help
Select GTK+ 2 frontend.
config BR2_PACKAGE_NETSURF_GTK3
bool "gtk3 frontend"
depends on BR2_PACKAGE_LIBGTK3
help
Select GTK+ 3 frontend.
endchoice
endif

View File

@@ -0,0 +1,3 @@
# Locally computed
sha256 11e384eaf47e65c186da5001f1055a02f2d72ff17b50f403b8392546a2cf65ff netsurf-all-3.9.tar.gz
sha256 55c4a7ae3953d720a462e69d1f128a20004933d12538be5314a33f8821675378 netsurf/COPYING

114
package/netsurf/netsurf.mk Normal file
View File

@@ -0,0 +1,114 @@
################################################################################
#
# netsurf
#
################################################################################
NETSURF_VERSION = 3.9
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
# host-vim needed for the xxd utility
NETSURF_DEPENDENCIES = expat jpeg libpng \
host-bison host-flex host-gperf host-pkgconf host-vim
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
echo "override NETSURF_USE_RSVG := YES" >> $(@D)/netsurf/Makefile.config
echo "override NETSURF_USE_NSSVG := NO" >> $(@D)/netsurf/Makefile.config
endef
endif
endif
ifeq ($(BR2_PACKAGE_NETSURF_SDL),y)
NETSURF_DEPENDENCIES += sdl host-libpng
NETSURF_FRONTEND = framebuffer
NETSURF_CONFIG = \
BUILD_CFLAGS='$(HOST_CFLAGS)' \
BUILD_LDFLAGS='$(HOST_LDFLAGS) -lpng'
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)
NETSURF_DEPENDENCIES += libiconv
define NETSURF_ICONV_CONFIGURE_CMDS
echo "CFLAGS += -DWITH_ICONV_FILTER" >> $(@D)/libparserutils/Makefile.config.override
echo "override NETSURF_USE_LIBICONV_PLUG := NO" >> $(@D)/netsurf/Makefile.config
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
ifeq ($(BR2_PACKAGE_WEBP),y)
NETSURF_DEPENDENCIES += webp
define NETSURF_WEBP_CONFIGURE_CMDS
echo "override NETSURF_USE_WEBP := YES" >> $(@D)/netsurf/Makefile.config
endef
else
define NETSURF_WEBP_CONFIGURE_CMDS
echo "override NETSURF_USE_WEBP := 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)
$(NETSURF_WEBP_CONFIGURE_CMDS)
endef
NETSURF_MAKE_ENV = \
$(TARGET_MAKE_ENV) \
CFLAGS="$(TARGET_CFLAGS) -I$(@D)/tmpusr/include" \
LDFLAGS="$(TARGET_LDFLAGS) -L$(@D)/tmpusr/lib"
NETSURF_MAKE_OPTS = \
TARGET=$(NETSURF_FRONTEND) \
BISON="$(HOST_DIR)/bin/bison" \
FLEX="$(HOST_DIR)/bin/flex" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
BUILD_CC="$(HOSTCC)" \
CC="$(TARGET_CC)" \
AR="$(TARGET_AR)" \
TMP_PREFIX=$(@D)/tmpusr \
NETSURF_CONFIG="$(NETSURF_CONFIG)" \
PREFIX=/usr
define NETSURF_BUILD_CMDS
mkdir -p $(@D)/tmpusr
$(NETSURF_MAKE_ENV) $(MAKE) -C $(@D) $(NETSURF_MAKE_OPTS) \
build
endef
define NETSURF_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(NETSURF_MAKE_OPTS) \
DESTDIR=$(TARGET_DIR) install
endef
$(eval $(generic-package))