Files
operating-system/buildroot/package/netsurf/netsurf.mk
Stefan Agner a0871be6c0 Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2020-11-13 18:25:44 +01:00

115 lines
3.2 KiB
Makefile

################################################################################
#
# netsurf
#
################################################################################
NETSURF_VERSION = 3.10
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 = gtk2
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))