fix: ports - netsurf renders pages (mmap, resources, error loop)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NQRTGoYgnZQsh7uCh6Jsxm
This commit is contained in:
@@ -86,6 +86,12 @@ NETSURF_ARGS := \
|
||||
# it references.
|
||||
COMPAT_LIB := $(CURDIR)/compat/libnscompat.a
|
||||
|
||||
# NetSurf formats floats (page load time in the status bar, plot coordinates).
|
||||
# The Montauk libc keeps %e/%f/%g in a separate archive member reached by a
|
||||
# WEAK reference, and a weak undefined ref does not extract a member -- without
|
||||
# this the status bar reads "Done (%fs)". See programs/lib/libc/printf_float.c.
|
||||
NS_LDFLAGS := $(COMPAT_LIB) -Wl,-u,_pf_putfloat
|
||||
|
||||
$(COMPAT_LIB): compat/iconv.c compat/iconv.h
|
||||
$(CC) $(NETSURF_CFLAGS) -std=gnu99 -c compat/iconv.c -o compat/iconv.o
|
||||
$(AR) rcs $@ compat/iconv.o
|
||||
@@ -96,7 +102,7 @@ all: netsurf-build
|
||||
|
||||
netsurf-build: $(COMPAT_LIB)
|
||||
@$(call ns_patch,$(UPSTREAM))
|
||||
CFLAGS="$(NETSURF_CFLAGS)" LDFLAGS="$(COMPAT_LIB)" $(NS_ENV) \
|
||||
CFLAGS="$(NETSURF_CFLAGS)" LDFLAGS="$(NS_LDFLAGS)" $(NS_ENV) \
|
||||
$(NS_MAKE) -C $(UPSTREAM) $(NETSURF_ARGS)
|
||||
@test -f $(NS_BUILD_OUT) || { echo "netsurf: expected $(NS_BUILD_OUT)" >&2; exit 1; }
|
||||
@echo "Built: $(NS_BUILD_OUT) ($$(stat -c%s $(NS_BUILD_OUT)) bytes)"
|
||||
@@ -108,7 +114,12 @@ netsurf-build: $(COMPAT_LIB)
|
||||
install: netsurf-build
|
||||
mkdir -p $(NS_INSTALL)/netsurf
|
||||
cp $(NS_BUILD_OUT) $(NS_INSTALL)/nsmonkey.elf
|
||||
cp -r $(UPSTREAM)/frontends/monkey/res/. $(NS_INSTALL)/netsurf/
|
||||
# -L, not -r alone: nearly everything in a NetSurf frontend res/ dir is a
|
||||
# symlink into ../../../resources/. Copied as links they dangle outside
|
||||
# the installed tree, and the ramdisk turns a symlink into a ZERO-LENGTH
|
||||
# FILE (Fs/Ramdisk.cpp only handles typeflag '5'), so default.css and
|
||||
# welcome.html arrive empty and every page lays out to nothing.
|
||||
cp -rL $(UPSTREAM)/frontends/monkey/res/. $(NS_INSTALL)/netsurf/
|
||||
@echo "installed: 0:/os/nsmonkey.elf + 0:/os/netsurf/ resources"
|
||||
|
||||
uninstall:
|
||||
|
||||
Reference in New Issue
Block a user