구글 Skia 를 freebsd 에서 내가 원하는 기능이 포함되어 컴파일되도록 수정 작업 중.


diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn index acf4a5403f..d240a4c8fe 100644 --- a/gn/BUILDCONFIG.gn +++ b/gn/BUILDCONFIG.gn @@ -67,6 +67,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_freebsd = current_os == "freebsd" is_mac = current_os == "mac" is_wasm = current_os == "wasm" is_win = current_os == "win" diff --git a/gn/skia.gni b/gn/skia.gni index 2ed781a6b3..728f935fe7 100644 --- a/gn/skia.gni +++ b/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_freebsd 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_freebsd || is_wasm skia_use_harfbuzz = true skia_use_gl = !is_fuchsia skia_use_icu = !is_fuchsia @@ -71,7 +71,7 @@ declare_args() { skia_use_lua = is_skia_dev_build && !is_ios skia_use_metal = false skia_use_ndk_images = is_android && defined(ndk_api) && ndk_api >= 30 - skia_use_perfetto = is_linux || is_mac || is_android + skia_use_perfetto = is_linux || is_freebsd || is_mac || is_android # Currently only supported in Android framework skia_android_framework_use_perfetto = false @@ -80,7 +80,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_freebsd skia_use_xps = true # Use the safe mode for libcxx @@ -128,7 +128,7 @@ declare_args() { skia_use_vulkan = false } - skia_build_fuzzers = is_clang && is_linux && target_cpu == "x64" + skia_build_fuzzers = is_clang && (is_linux || is_freebsd) && target_cpu == "x64" skia_use_libfuzzer_defaults = true } diff --git a/gn/skia/BUILD.gn b/gn/skia/BUILD.gn index ba42fd2f53..4d79e7114e 100644 --- a/gn/skia/BUILD.gn +++ b/gn/skia/BUILD.gn @@ -250,7 +250,7 @@ config("default") { } } - if (is_linux) { + if (is_linux || is_freebsd) { libs += [ "pthread" ] } @@ -361,7 +361,7 @@ config("default") { ldflags += [ "-fsanitize=$sanitizers" ] } - if (is_linux) { + if (is_linux || is_freebsd) { cflags_cc += [ "-stdlib=libc++" ] ldflags += [ "-stdlib=libc++" ] } @@ -721,7 +721,7 @@ config("executable") { ] } else if (is_mac) { ldflags = [ "-Wl,-rpath,@loader_path/." ] - } else if (is_linux) { + } else if (is_linux || is_freebsd) { ldflags = [ "-rdynamic", "-Wl,-rpath,\$ORIGIN", diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn index dcf79cc842..78cf9ecfc4 100644 --- a/gn/toolchain/BUILD.gn +++ b/gn/toolchain/BUILD.gn @@ -302,7 +302,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 = diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp index 77fd082d61..080f4c2e6c 100644 --- a/tools/skiaserve/skiaserve.cpp +++ b/tools/skiaserve/skiaserve.cpp @@ -20,6 +20,7 @@ #if !defined _WIN32 #include <sys/socket.h> #include <arpa/inet.h> +#include <netinet/in.h> #endif using namespace skia_private;