2018-12-05 14:40:40 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# netsurf
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
NETSURF_VERSION = 3.8
|
|
|
|
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
|
2018-12-12 08:14:55 +01:00
|
|
|
NETSURF_DEPENDENCIES = expat jpeg libpng \
|
2018-12-05 14:40:40 +01:00
|
|
|
host-bison host-flex host-gperf host-pkgconf
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_GTK),y)
|
|
|
|
NETSURF_DEPENDENCIES += libgtk2
|
|
|
|
NETSURF_FRONTEND = gtk
|
2018-12-12 08:14:54 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_GTK3),y)
|
|
|
|
NETSURF_DEPENDENCIES += libgtk3
|
|
|
|
NETSURF_FRONTEND = gtk3
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_GTK)$(BR2_PACKAGE_NETSURF_GTK3),y)
|
2018-12-05 14:40:40 +01:00
|
|
|
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)
|
2018-12-11 16:02:09 +01:00
|
|
|
NETSURF_DEPENDENCIES += sdl host-libpng
|
2018-12-05 14:40:40 +01:00
|
|
|
NETSURF_FRONTEND = framebuffer
|
2018-12-13 19:54:33 +01:00
|
|
|
NETSURF_CONFIG = \
|
2018-12-27 14:18:17 +01:00
|
|
|
HOST_CFLAGS='$(HOST_CFLAGS)' \
|
|
|
|
HOST_LDFLAGS='$(HOST_LDFLAGS) -lpng'
|
2018-12-12 08:14:52 +01:00
|
|
|
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
|
2018-12-05 14:40:40 +01:00
|
|
|
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
|
|
|
|
|
2018-12-12 08:14:55 +01:00
|
|
|
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
|
|
|
|
|
2018-12-05 14:40:40 +01:00
|
|
|
define NETSURF_CONFIGURE_CMDS
|
|
|
|
$(NETSURF_ICONV_CONFIGURE_CMDS)
|
|
|
|
$(NETSURF_SVG_CONFIGURE_CMDS)
|
2018-12-12 08:14:52 +01:00
|
|
|
$(NETSURF_FONTLIB_CONFIGURE_CMDS)
|
2018-12-12 08:14:55 +01:00
|
|
|
$(NETSURF_CURL_CONFIGURE_CMDS)
|
2018-12-05 14:40:40 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
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=$(STAGING_DIR)/usr \
|
2018-12-13 19:54:33 +01:00
|
|
|
NETSURF_CONFIG="$(NETSURF_CONFIG)" \
|
2018-12-05 14:40:40 +01:00
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
define NETSURF_BUILD_CMDS
|
|
|
|
$(TARGET_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))
|