$NetBSD$ --- BUILD.gn.orig 2025-05-08 14:32:12.170063579 +0000 +++ BUILD.gn @@ -36,7 +36,7 @@ config("skia_public") { if (is_component_build) { defines += [ "SKIA_DLL" ] } - if (is_fuchsia || is_linux) { + if (is_fuchsia || is_linux || is_netbsd) { defines += [ "SK_R32_SHIFT=16" ] } if (skia_enable_optimize_size) { @@ -601,7 +601,7 @@ if (skia_compile_modules) { sources += [ "src/utils/SkGetExecutablePath_win.cpp" ] } else if (is_mac || is_ios) { sources += [ "src/utils/SkGetExecutablePath_mac.cpp" ] - } else if (is_linux || is_android) { + } else if (is_linux || is_android || is_netbsd) { sources += [ "src/utils/SkGetExecutablePath_linux.cpp" ] } if (is_win) { @@ -728,7 +728,7 @@ if (skia_compile_sksl_tests) { sources += [ "src/utils/SkGetExecutablePath_win.cpp" ] } else if (is_mac || is_ios) { sources += [ "src/utils/SkGetExecutablePath_mac.cpp" ] - } else if (is_linux || is_android) { + } else if (is_linux || is_android || is_netbsd) { sources += [ "src/utils/SkGetExecutablePath_linux.cpp" ] } if (is_win) { @@ -1016,7 +1016,7 @@ optional("gpu") { } } else if (skia_use_webgl) { sources += [ "src/gpu/ganesh/gl/webgl/GrGLMakeNativeInterface_webgl.cpp" ] - } else if (is_linux && skia_use_x11) { + } else if ((is_linux || is_netbsd) && skia_use_x11) { sources += [ "src/gpu/ganesh/gl/glx/GrGLMakeGLXInterface.cpp", "src/gpu/ganesh/gl/glx/GrGLMakeNativeInterface_glx.cpp", @@ -1740,7 +1740,7 @@ skia_component("skia") { ] } - if (is_linux || is_wasm) { + if (is_linux || is_wasm || is_netbsd) { sources += [ "src/ports/SkDebug_stdio.cpp" ] if (skia_use_egl) { libs += [ "GLESv2" ] @@ -2171,7 +2171,7 @@ if (skia_enable_tools) { if (is_android || skia_use_egl) { sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] libs += [ "EGL" ] - } else if (is_linux) { + } else if (is_linux || is_netbsd) { sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] libs += [ "GLU", @@ -2574,7 +2574,7 @@ if (skia_enable_tools) { ] } - if (is_linux || is_mac || skia_enable_optimize_size) { + if (is_linux || is_netbsd || is_mac || skia_enable_optimize_size) { if (skia_enable_skottie) { test_app("skottie_tool") { deps = [ "modules/skottie:tool" ] @@ -2750,7 +2750,7 @@ if (skia_enable_tools) { } } - if (is_linux && skia_use_icu) { + if ((is_linux || is_netbsd) && skia_use_icu) { test_app("sktexttopdf") { sources = [ "tools/using_skia_and_harfbuzz.cpp" ] deps = [ @@ -2760,7 +2760,7 @@ if (skia_enable_tools) { } } - if (is_linux || is_mac) { + if (is_linux || is_mac || is_netbsd) { test_app("create_test_font") { sources = [ "tools/fonts/create_test_font.cpp" ] deps = [ ":skia" ] @@ -3016,7 +3016,7 @@ if (skia_enable_tools) { "tools/sk_app/android/surface_glue_android.h", ] libs += [ "android" ] - } else if (is_linux) { + } else if (is_linux || is_netbsd) { sources += [ "tools/sk_app/unix/Window_unix.cpp", "tools/sk_app/unix/Window_unix.h", @@ -3066,7 +3066,7 @@ if (skia_enable_tools) { } } - if (!skia_use_vulkan && (is_mac || is_linux || is_win)) { + if (!skia_use_vulkan && (is_mac || is_linux || is_win || is_netbsd)) { test_app("fiddle_examples") { sources = [ "tools/fiddle/all_examples.cpp", @@ -3263,7 +3263,7 @@ if (skia_enable_tools) { } } - if (is_linux || is_win || is_mac) { + if (is_linux || is_win || is_mac || is_netbsd) { test_app("editor") { is_shared_library = is_android deps = [ "modules/skplaintexteditor:editor_app" ]