From 041d5bff910d734f3f87a4a0885f7a43c75f970d Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 19 Aug 2023 20:38:08 -0600 Subject: [PATCH] Meta: Port changes to gn build This commit includes gn changes for the following commits: 625aac23670f4c33d91b2690bd3147c3618732b9 8451c4d91c577249eefdf5b413d89283219a215c 8fcf42f684f286209ae96479dbba18ba7c1591e5 9ba4c339406520931c56cb2def162387ae5308ca 1d6c2cb2877b8be40c62c4eac431d734fcdde79d 8e5b2907f668097ef4f88ef5a5d1f5063471b752 d68433653a69655a628698ed5fc2472cea32800f --- Meta/gn/secondary/AK/BUILD.gn | 2 + Meta/gn/secondary/Ladybird/BUILD.gn | 5 ++ .../CodeGenerators/LibPublicSuffix/BUILD.gn | 6 ++ .../Userland/Libraries/LibGfx/BUILD.gn | 1 + .../Libraries/LibPublicSuffix/BUILD.gn | 59 +++++++++++++++++++ .../Libraries/LibWeb/CSS/Parser/BUILD.gn | 3 + 6 files changed, 76 insertions(+) create mode 100644 Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix/BUILD.gn create mode 100644 Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn diff --git a/Meta/gn/secondary/AK/BUILD.gn b/Meta/gn/secondary/AK/BUILD.gn index e18c2b043a5..0d1a5cd9d7f 100644 --- a/Meta/gn/secondary/AK/BUILD.gn +++ b/Meta/gn/secondary/AK/BUILD.gn @@ -267,6 +267,7 @@ write_cmake_config("ak_debug_gen") { "FILE_CONTENT_DEBUG=", "FILE_WATCHER_DEBUG=", "FILL_PATH_DEBUG=", + "FLAC_ENCODER_DEBUG=", "GEMINI_DEBUG=", "GENERATE_DEBUG=", "GHASH_PROCESS_DEBUG=", @@ -286,6 +287,7 @@ write_cmake_config("ak_debug_gen") { "ILBM_DEBUG=", "IMAGE_DECODER_DEBUG=", "IMAGE_LOADER_DEBUG=", + "IMAP_PARSER_DEBUG=", "ITEM_RECTS_DEBUG=", "JOB_DEBUG=", "JPEG_DEBUG=", diff --git a/Meta/gn/secondary/Ladybird/BUILD.gn b/Meta/gn/secondary/Ladybird/BUILD.gn index 17ee27e3168..1fec92dfa0e 100644 --- a/Meta/gn/secondary/Ladybird/BUILD.gn +++ b/Meta/gn/secondary/Ladybird/BUILD.gn @@ -12,6 +12,7 @@ group("ladybird") { moc_qt_objects("generate_moc") { sources = [ + "Qt/AutoComplete.h", "Qt/BrowserWindow.h", "Qt/ConsoleWidget.h", "Qt/EventLoopImplementationQtEventTarget.h", @@ -71,6 +72,7 @@ executable("ladybird_executable") { "//Userland/Libraries/LibJS", "//Userland/Libraries/LibMain", "//Userland/Libraries/LibProtocol", + "//Userland/Libraries/LibPublicSuffix", "//Userland/Libraries/LibSQL", "//Userland/Libraries/LibWeb", "//Userland/Libraries/LibWebView", @@ -80,6 +82,7 @@ executable("ladybird_executable") { "//Userland/Applications/Browser/Database.cpp", "//Userland/Applications/Browser/History.cpp", "HelperProcess.cpp", + "Qt/AutoComplete.cpp", "Qt/BrowserWindow.cpp", "Qt/ConsoleWidget.cpp", "Qt/EventLoopImplementationQt.cpp", @@ -181,6 +184,7 @@ if (current_os == "mac") { "//Userland/Libraries/LibLine", "//Userland/Libraries/LibMarkdown", "//Userland/Libraries/LibProtocol", + "//Userland/Libraries/LibPublicSuffix", "//Userland/Libraries/LibRegex", "//Userland/Libraries/LibSQL", "//Userland/Libraries/LibSoftGPU", @@ -215,6 +219,7 @@ if (current_os == "mac") { "$root_out_dir/lib/liblagom-line.dylib", "$root_out_dir/lib/liblagom-markdown.dylib", "$root_out_dir/lib/liblagom-protocol.dylib", + "$root_out_dir/lib/liblagom-publicsuffix.dylib", "$root_out_dir/lib/liblagom-regex.dylib", "$root_out_dir/lib/liblagom-softgpu.dylib", "$root_out_dir/lib/liblagom-sql.dylib", diff --git a/Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix/BUILD.gn b/Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix/BUILD.gn new file mode 100644 index 00000000000..8d083c5188a --- /dev/null +++ b/Meta/gn/secondary/Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix/BUILD.gn @@ -0,0 +1,6 @@ +import("//Meta/Lagom/Tools/lagom_tool.gni") + +lagom_tool("GeneratePublicSuffixData") { + sources = [ "GeneratePublicSuffixData.cpp" ] + deps = [ "//Userland/Libraries/LibMain" ] +} diff --git a/Meta/gn/secondary/Userland/Libraries/LibGfx/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibGfx/BUILD.gn index 9e5608d93e8..6b7b1caf7fc 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibGfx/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibGfx/BUILD.gn @@ -29,6 +29,7 @@ shared_library("LibGfx") { "Font/ScaledFont.cpp", "Font/Typeface.cpp", "Font/WOFF/Font.cpp", + "Font/WOFF2/Font.cpp", "GradientPainting.cpp", "ICC/BinaryWriter.cpp", "ICC/Profile.cpp", diff --git a/Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn new file mode 100644 index 00000000000..ac3fb0eb309 --- /dev/null +++ b/Meta/gn/secondary/Userland/Libraries/LibPublicSuffix/BUILD.gn @@ -0,0 +1,59 @@ +import("//Meta/gn/build/compiled_action.gni") +import("//Meta/gn/build/download_cache.gni") +import("//Meta/gn/build/download_file.gni") + +declare_args() { + # If true, Download public suffix list from GitHub. + # Data will be downloaded to $cache_path/PublicSuffix and used by LibPublicSuffix + enable_public_suffix_list_download = true +} + +public_suffix_cache = cache_path + "PublicSuffix/" + +if (enable_public_suffix_list_download) { + download_file("public_suffix_list_download") { + version = "master" + url = "https://raw.githubusercontent.com/publicsuffix/list/" + version + + "/public_suffix_list.dat" + output = "$public_suffix_cache/public_suffix_list.dat" + version_file = public_suffix_cache + "version.txt" + } + + compiled_action("generate_public_suffix_list_sources") { + tool = "//Meta/Lagom/Tools/CodeGenerators/LibPublicSuffix:GeneratePublicSuffixData" + deps = [ ":public_suffix_list_download" ] + outputs = [ + "$target_gen_dir/PublicSuffixData.h", + "$target_gen_dir/PublicSuffixData.cpp", + ] + args = [ + "-h", + rebase_path(outputs[0], root_build_dir), + "-c", + rebase_path(outputs[1], root_build_dir), + "-p", + rebase_path("$public_suffix_cache/public_suffix_list.dat", + root_build_dir), + ] + } +} + +shared_library("LibPublicSuffix") { + output_name = "publicsuffix" + include_dirs = [ + "//Userland/Libraries", + "$target_gen_dir/..", + ] + sources = [ "URL.cpp" ] + deps = [ + "//AK", + "//Userland/Libraries/LibCore", + ] + if (enable_public_suffix_list_download) { + deps += [ ":generate_public_suffix_list_sources" ] + sources += get_target_outputs(":generate_public_suffix_list_sources") + defines = [ "ENABLE_PUBLIC_SUFFIX_DOWNLOAD=1" ] + } else { + defines = [ "ENABLE_PUBLIC_SUFFIX_DOWNLOAD=0" ] + } +} diff --git a/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/Parser/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/Parser/BUILD.gn index ef3256e4baa..17511001411 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/Parser/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibWeb/CSS/Parser/BUILD.gn @@ -7,10 +7,13 @@ source_set("Parser") { "Declaration.cpp", "DeclarationOrAtRule.cpp", "Function.cpp", + "GradientParsing.cpp", "Helpers.cpp", + "MediaParsing.cpp", "Parser.cpp", "ParsingContext.cpp", "Rule.cpp", + "SelectorParsing.cpp", "Token.cpp", "Tokenizer.cpp", ]