Meta: Fix building skia on FreeBSD

This commit is contained in:
Undefine 2025-06-29 23:44:45 +02:00 committed by Andrew Kaster
commit f0cdf0e9b5
Notes: github-actions[bot] 2025-07-15 19:47:09 +00:00
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,28 @@
diff --git a/BUILD.gn b/BUILD.gn
index 72d9a23..9c0532e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,7 +26,8 @@ import("gn/ios.gni")
# Skia public API, generally provided by :skia.
config("skia_public") {
- include_dirs = [ "." ]
+ include_dirs = [ ".", "/usr/local/include" ]
+ lib_dirs = [ "/usr/local/lib" ]
defines = [
"SK_CODEC_DECODES_BMP",
diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn
index 85858b5..8d6a0ae 100644
--- a/gn/toolchain/BUILD.gn
+++ b/gn/toolchain/BUILD.gn
@@ -315,7 +315,7 @@ template("gcc_like_toolchain") {
rspfile = "{{output}}.rsp"
rspfile_content = "{{inputs}}"
rm_py = rebase_path("../rm.py")
- command = "$shell python3 \"$rm_py\" \"{{output}}\" && $ar rcs {{output}} @$rspfile"
+ command = "$shell python3 \"$rm_py\" \"{{output}}\" && $ar rcs {{output}} `cat $rspfile`"
}
outputs =

View file

@ -14,6 +14,7 @@ vcpkg_from_github(
vulkan-headers.patch
pdfsubsetfont-uwp.diff
skparagraph-gni.diff
fix-freebsd.patch
)
# De-vendor
@ -123,6 +124,8 @@ elseif(VCPKG_TARGET_IS_WINDOWS)
string(APPEND OPTIONS " skia_enable_skparagraph=false")
string(APPEND OPTIONS " skia_enable_bentleyottmann=false")
endif()
elseif(VCPKG_TARGET_IS_FREEBSD)
string(APPEND OPTIONS " target_os=\"linux\"")
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@ -131,6 +134,10 @@ else()
string(APPEND OPTIONS " is_component_build=false")
endif()
if(VCPKG_TARGET_IS_FREEBSD)
string(APPEND OPTIONS " skia_use_dng_sdk=false")
endif()
set(required_externals
dng_sdk
expat