$NetBSD$ * Part of patchset to build electron on NetBSD * Based on OpenBSD's chromium patches, and FreeBSD's electron patches --- third_party/electron_node/deps/nghttp2/BUILD.gn.orig 2025-04-18 18:41:29.000000000 +0000 +++ third_party/electron_node/deps/nghttp2/BUILD.gn @@ -1,14 +1,51 @@ -############################################################################## -# # -# DO NOT EDIT THIS FILE! # -# # -############################################################################## - -# This file is used by GN for building, which is NOT the build system used for -# building official binaries. -# Please modify the gyp files if you are making changes to build system. +config("nghttp2_config") { + defines = [ "NGHTTP2_STATICLIB" ] + include_dirs = [ "lib/includes" ] +} +static_library("nghttp2") { + public_configs = [ ":nghttp2_config" ] + defines = [ + "_U_", + "BUILDING_NGHTTP2", + "NGHTTP2_STATICLIB", + "HAVE_CONFIG_H", + ] + include_dirs = [ "lib/includes" ] -import("unofficial.gni") + cflags_c = [ + "-Wno-implicit-function-declaration", + "-Wno-implicit-fallthrough", + "-Wno-string-plus-int", + "-Wno-unreachable-code-return", + "-Wno-unused-but-set-variable", + ] -nghttp2_gn_build("nghttp2") { + sources = [ + "lib/nghttp2_buf.c", + "lib/nghttp2_callbacks.c", + "lib/nghttp2_debug.c", + "lib/nghttp2_extpri.c", + "lib/nghttp2_frame.c", + "lib/nghttp2_hd.c", + "lib/nghttp2_hd_huffman.c", + "lib/nghttp2_hd_huffman_data.c", + "lib/nghttp2_helper.c", + "lib/nghttp2_http.c", + "lib/nghttp2_map.c", + "lib/nghttp2_mem.c", + "lib/nghttp2_alpn.c", + "lib/nghttp2_option.c", + "lib/nghttp2_outbound_item.c", + "lib/nghttp2_pq.c", + "lib/nghttp2_priority_spec.c", + "lib/nghttp2_queue.c", + "lib/nghttp2_ratelim.c", + "lib/nghttp2_rcbuf.c", + "lib/nghttp2_session.c", + "lib/nghttp2_stream.c", + "lib/nghttp2_submit.c", + "lib/nghttp2_time.c", + "lib/nghttp2_version.c", + "lib/sfparse.c", + ] }