feat: ports - netsurf with the monkey frontend
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018Ae69wJS7sueQMUwNxV3nX
This commit is contained in:
+29
@@ -175,6 +175,24 @@ NS_ENV := \
|
||||
|
||||
# Build a NetSurf library in $(1) (its checkout dir) and copy the archive to
|
||||
# $(PORT_ARCHIVE). Usage in a recipe: $(call ns_build,upstream,wapcaplet)
|
||||
# ==== Patch series ====================================================
|
||||
# Most ports need no patches -- a stub header or a build variable is usually
|
||||
# enough, and both survive an upstream bump for free. Where upstream genuinely
|
||||
# has to change (platform detection inside its own headers, say), put unified
|
||||
# diffs in the port's patches/ directory and call ns_patch before building.
|
||||
#
|
||||
# The checkout is reset to its pinned commit first, so applying is idempotent
|
||||
# and the series always lands on a known state. NOTE: this discards any manual
|
||||
# edits inside the submodule -- edit the patch, not the checkout.
|
||||
ns_patch = \
|
||||
if ls patches/*.patch >/dev/null 2>&1; then \
|
||||
git -C $(1) checkout -- . && \
|
||||
for p in $(CURDIR)/patches/*.patch; do \
|
||||
echo " PATCH: $$(basename $$p)"; \
|
||||
git -C $(1) apply "$$p" || exit 1; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# A port may add its own flags by setting NS_CFLAGS_EXTRA (expanded at call
|
||||
# time, so it can be set after this file is included).
|
||||
ns_build = \
|
||||
@@ -214,11 +232,22 @@ $(PORT_SYSROOT_INC)/%: $(PORT_HEADER_ROOT)/%
|
||||
ifneq ($(PORT_PC_IN),)
|
||||
INSTALLED_PC := $(PORT_SYSROOT_LIB)/pkgconfig/$(PORT_NAME).pc
|
||||
|
||||
# Several .pc.in files carry a LIBRARIES placeholder that upstream's install
|
||||
# expands to the link flags (Makefile.top: 's#LIBRARIES#$(__libraries)#'). For
|
||||
# libnsutils, libnslog and libnspsl that placeholder holds the library's OWN
|
||||
# -l flag, so leaving it unexpanded produces a .pc that names no library at
|
||||
# all and puts a bare "LIBRARIES" token on the link line.
|
||||
#
|
||||
# Default to the port's own -l flag; a port whose placeholder means "my
|
||||
# dependencies" (libdom) overrides PORT_PC_LIBS.
|
||||
PORT_PC_LIBS ?= -l$(patsubst lib%,%,$(PORT_NAME))
|
||||
|
||||
$(INSTALLED_PC): $(PORT_PC_IN) Makefile
|
||||
@mkdir -p $(dir $@)
|
||||
sed -e 's|PREFIX|$(PORT_SYSROOT)|' \
|
||||
-e 's|LIBDIR|lib|' \
|
||||
-e 's|INCLUDEDIR|include|' \
|
||||
-e 's|LIBRARIES|$(PORT_PC_LIBS)|' \
|
||||
-e 's|VERSION|$(PORT_PC_VERSION)|' $< > $@
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user