pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

skia-git: sprinkle is_netbsd conditionals



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Thu May 8 16:39:17 2025 +0200
Changeset:	2f91f29833dcc77305002d7c89835b32038b8fa3

Modified Files:
	skia-git/distinfo
	skia-git/patches/patch-gn_skia_BUILD.gn
Added Files:
	skia-git/patches/patch-BUILD.gn
	skia-git/patches/patch-gn_BUILDCONFIG.gn
	skia-git/patches/patch-gn_skia.gni
	skia-git/patches/patch-modules_skunicode_BUILD.gn
	skia-git/patches/patch-tools_window_BUILD.gn

Log Message:
skia-git: sprinkle is_netbsd conditionals

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2f91f29833dcc77305002d7c89835b32038b8fa3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 skia-git/distinfo                                 |   7 +-
 skia-git/patches/patch-BUILD.gn                   | 112 ++++++++++++++++++++++
 skia-git/patches/patch-gn_BUILDCONFIG.gn          |  12 +++
 skia-git/patches/patch-gn_skia.gni                |  26 +++++
 skia-git/patches/patch-gn_skia_BUILD.gn           |   7 +-
 skia-git/patches/patch-modules_skunicode_BUILD.gn |  13 +++
 skia-git/patches/patch-tools_window_BUILD.gn      |  31 ++++++
 7 files changed, 205 insertions(+), 3 deletions(-)

diffs:
diff --git a/skia-git/distinfo b/skia-git/distinfo
index 8783abbec7..12d9833662 100644
--- a/skia-git/distinfo
+++ b/skia-git/distinfo
@@ -1,7 +1,11 @@
 $NetBSD$
 
-SHA1 (patch-gn_skia_BUILD.gn) = 39bca4b8dba757869ea6a40714c627f33eff3383
+SHA1 (patch-BUILD.gn) = 65847b9a0b1662097aed229d77aab4e99dca64b0
+SHA1 (patch-gn_BUILDCONFIG.gn) = d0cf799c3889dc70913f4d9fc8d52159b6900fd4
+SHA1 (patch-gn_skia.gni) = 49a8bf634e396a3b996886bbb5724eaea2796600
+SHA1 (patch-gn_skia_BUILD.gn) = bb08353e15c2d0d2b6ca59e4172cfe980588639b
 SHA1 (patch-modules_skcms_BUILD.gn) = 064519f2fd7cfe3cfdae70779416c2aa204098a9
+SHA1 (patch-modules_skunicode_BUILD.gn) = 235b7d30d1a793ed87c3af9cc0d228bf797b1552
 SHA1 (patch-src_gpu_ganesh_GrAutoLocaleSetter.h) = dfa8f3c6b501dde779b1e0a54398f8e825e11f21
 SHA1 (patch-third__party_externals_dng__sdk_source_RawEnvironment.h) = 6b122f837dd702676ac2b3c6de511f3499deba14
 SHA1 (patch-third__party_externals_piex_src_image__type__recognition_image__type__recognition__lite.cc) = 3f0d9416829866239cde6c2c8c2382d1dcd50002
@@ -9,3 +13,4 @@ SHA1 (patch-third__party_harfbuzz_BUILD.gn) = a704d5deec6345717430b08c78820c01cf
 SHA1 (patch-third__party_icu_BUILD.gn) = 20bfc1be2f919123ec53cd4edd7b9b4fb39fbf39
 SHA1 (patch-third__party_libwebp_BUILD.gn) = 171bafcb57dc7d5f7ba3b52c804d6e7bb8e043bd
 SHA1 (patch-third__party_piex_BUILD.gn) = f30a35c99e77f2d099459ac3fe71194a48efc056
+SHA1 (patch-tools_window_BUILD.gn) = c41fddc7b4254810d790aa8db9ace3692d82cae1
diff --git a/skia-git/patches/patch-BUILD.gn b/skia-git/patches/patch-BUILD.gn
new file mode 100644
index 0000000000..e0e8a866e4
--- /dev/null
+++ b/skia-git/patches/patch-BUILD.gn
@@ -0,0 +1,112 @@
+$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" ]
diff --git a/skia-git/patches/patch-gn_BUILDCONFIG.gn b/skia-git/patches/patch-gn_BUILDCONFIG.gn
new file mode 100644
index 0000000000..5d6d1ddd8c
--- /dev/null
+++ b/skia-git/patches/patch-gn_BUILDCONFIG.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- gn/BUILDCONFIG.gn.orig	2025-05-08 12:56:51.035412725 +0000
++++ gn/BUILDCONFIG.gn
+@@ -68,6 +68,7 @@ is_fuchsia = current_os == "fuchsia"
+ is_ios = current_os == "ios" || current_os == "tvos"
+ is_tvos = current_os == "tvos"
+ is_linux = current_os == "linux"
++is_netbsd = current_os == "netbsd"
+ is_mac = current_os == "mac"
+ is_wasm = current_os == "wasm"
+ is_win = current_os == "win"
diff --git a/skia-git/patches/patch-gn_skia.gni b/skia-git/patches/patch-gn_skia.gni
new file mode 100644
index 0000000000..2e5d34b086
--- /dev/null
+++ b/skia-git/patches/patch-gn_skia.gni
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- gn/skia.gni.orig	2025-05-08 14:30:51.671511841 +0000
++++ gn/skia.gni
+@@ -48,10 +48,10 @@ declare_args() {
+   skia_use_expat = !is_wasm
+   skia_use_ffmpeg = false
+   skia_use_fixed_gamma_text = is_android
+-  skia_use_fontconfig = is_linux
++  skia_use_fontconfig = is_linux || is_netbsd
+   skia_use_fontations = false
+   skia_use_fonthost_mac = is_mac || is_ios
+-  skia_use_freetype = is_android || is_fuchsia || is_linux || is_wasm
++  skia_use_freetype = is_android || is_fuchsia || is_linux || is_wasm || is_netbsd
+   skia_use_harfbuzz = true
+   skia_use_gl = !is_fuchsia
+   skia_use_icu = !is_fuchsia
+@@ -84,7 +84,7 @@ declare_args() {
+   skia_use_webgl = is_wasm
+   skia_use_webgpu = is_wasm
+   skia_use_wuffs = true
+-  skia_use_x11 = is_linux
++  skia_use_x11 = is_linux || is_netbsd
+   skia_use_xps = true
+ 
+   # Use the safe mode for libcxx
diff --git a/skia-git/patches/patch-gn_skia_BUILD.gn b/skia-git/patches/patch-gn_skia_BUILD.gn
index 42687565a5..25cc40763e 100644
--- a/skia-git/patches/patch-gn_skia_BUILD.gn
+++ b/skia-git/patches/patch-gn_skia_BUILD.gn
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- gn/skia/BUILD.gn.orig	2025-05-07 14:02:54.000000000 +0000
+--- gn/skia/BUILD.gn.orig	2025-05-08 09:57:17.000000000 +0000
 +++ gn/skia/BUILD.gn
-@@ -406,6 +406,11 @@ config("default") {
+@@ -406,6 +406,14 @@ config("default") {
      }
    }
  
@@ -10,6 +10,9 @@ $NetBSD$
 +  ldflags += [ "-Wl,-R@X11BASE@/lib" ]
 +  ldflags += [ "-L/@PREFIX@/lib" ]
 +  ldflags += [ "-Wl,-R@PREFIX@/lib" ]
++  if (is_netbsd) {
++    ldflags += [ "-ljemalloc" ]
++  }
 +
    cflags_objcc += cflags_cc
  }
diff --git a/skia-git/patches/patch-modules_skunicode_BUILD.gn b/skia-git/patches/patch-modules_skunicode_BUILD.gn
new file mode 100644
index 0000000000..90264ac34b
--- /dev/null
+++ b/skia-git/patches/patch-modules_skunicode_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- modules/skunicode/BUILD.gn.orig	2025-05-08 14:36:23.810786729 +0000
++++ modules/skunicode/BUILD.gn
+@@ -84,7 +84,7 @@ if (skia_use_icu || skia_use_client_icu 
+       sources += skia_unicode_icu_sources
+ 
+       # only available for Android at the moment
+-      if (skia_use_runtime_icu && (is_android || is_linux)) {
++      if (skia_use_runtime_icu && (is_android || is_linux || is_netbsd)) {
+         sources += skia_unicode_runtime_icu_sources
+         defines += [ "SK_UNICODE_RUNTIME_ICU_AVAILABLE" ]
+         deps += [ "//third_party/icu:headers" ]
diff --git a/skia-git/patches/patch-tools_window_BUILD.gn b/skia-git/patches/patch-tools_window_BUILD.gn
new file mode 100644
index 0000000000..79d3793d8e
--- /dev/null
+++ b/skia-git/patches/patch-tools_window_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- tools/window/BUILD.gn.orig	2025-05-08 14:29:25.513455507 +0000
++++ tools/window/BUILD.gn
+@@ -38,7 +38,7 @@ skia_component("window") {
+       "android/WindowContextFactory_android.h",
+     ]
+     libs += [ "android" ]
+-  } else if (is_linux) {
++  } else if (is_linux || is_netbsd) {
+     sources += [
+       "unix/RasterWindowContext_unix.cpp",
+       "unix/RasterWindowContext_unix.h",
+@@ -72,7 +72,7 @@ skia_component("window") {
+     }
+     if (is_android) {
+       sources += [ "android/GLWindowContext_android.cpp" ]
+-    } else if (is_linux) {
++    } else if (is_linux || is_netbsd) {
+       sources += [
+         "unix/GaneshGLWindowContext_unix.cpp",
+         "unix/GaneshGLWindowContext_unix.h",
+@@ -178,7 +178,7 @@ skia_component("window") {
+   }
+ 
+   if (skia_use_dawn) {
+-    if (is_linux) {
++    if (is_linux || is_netbsd) {
+       if (dawn_enable_vulkan) {
+         defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
+         libs += [ "X11-xcb" ]


Home | Main Index | Thread Index | Old Index