From c706a09110b696c656447056243914b2c3d51538 Mon Sep 17 00:00:00 2001 From: Nico Jensch Date: Thu, 15 Aug 2024 13:29:54 +0200 Subject: [PATCH] fix: add cbindgen fixes --- .SRCINFO | 3 +- 0036-bmo-1912663-cbindgen-0.27.0-fixes.patch | 62 ++++++++++++++++++++ PKGBUILD | 3 + 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 0036-bmo-1912663-cbindgen-0.27.0-fixes.patch diff --git a/.SRCINFO b/.SRCINFO index e18a83b..a1a3dd6 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -6,7 +6,6 @@ pkgbase = firedragon url = https://garudalinux.org arch = x86_64 license = MPL2 - license = Floorp Shared Source License makedepends = cbindgen makedepends = clang17 makedepends = diffutils @@ -71,6 +70,7 @@ pkgbase = firedragon source = patch-python3.12-bug1860051.patch source = patch-python3.12-bug1866829.patch source = patch-python3.12-bug1874280.patch + source = 0036-bmo-1912663-cbindgen-0.27.0-fixes.patch source = rustup.sh::https://sh.rustup.rs source = https://gitlab.com/garuda-linux/firedragon/settings/-/raw/master/firedragon.psd source = https://gitlab.com/garuda-linux/firedragon/settings/-/raw/master/firedragon.desktop @@ -79,6 +79,7 @@ pkgbase = firedragon sha256sums = 168d16a027a81c311c58f9302858244dfa5517f0a95a8d3df1abbf9b93b9d455 sha256sums = df27ed1e0da5b192224978dc2a593a97e18e6e22062c611fc32b277500324e62 sha256sums = cf1c69fd3338fd8f5e482f55b669160b08dfb021f2348b620f0a85dd9dee8150 + sha256sums = 2a4585f6b7060b1a73affd51f6d7b8fefbc4e5d7b760294c23d638e7b3bfcef4 sha256sums = 32a680a84cf76014915b3f8aa44e3e40731f3af92cd45eb0fcc6264fd257c428 sha256sums = 61355930cc59813e7e610ffdab8a01e32be980fffe1dfd8f9654b8f8f9f7fdc0 sha256sums = 53d3e743f3750522318a786befa196237892c93f20571443fdf82a480e7f0560 diff --git a/0036-bmo-1912663-cbindgen-0.27.0-fixes.patch b/0036-bmo-1912663-cbindgen-0.27.0-fixes.patch new file mode 100644 index 0000000..3904ac7 --- /dev/null +++ b/0036-bmo-1912663-cbindgen-0.27.0-fixes.patch @@ -0,0 +1,62 @@ +diff --git a/servo/components/style_traits/values.rs b/servo/components/style_traits/values.rs +--- a/servo/components/style_traits/values.rs ++++ b/servo/components/style_traits/values.rs +@@ -387,15 +387,15 @@ + mut parse_one: F, + ) -> Result, ParseError<'i, E>> + where + F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result>, + { +- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. ++ input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. + let mut results = vec![parse_one(input)?]; + loop { +- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. +- if let Ok(item) = input.try(&mut parse_one) { ++ input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. ++ if let Ok(item) = input.try_parse(&mut parse_one) { + results.push(item); + } else { + return Ok(results); + } + } +@@ -412,18 +412,18 @@ + mut parse_one: F, + ) -> Result, ParseError<'i, E>> + where + F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result>, + { +- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. ++ input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. + let mut results = vec![parse_one(input)?]; + loop { +- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. ++ input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. + let comma_location = input.current_source_location(); +- let comma = input.try(|i| i.expect_comma()).is_ok(); +- input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. +- if let Ok(item) = input.try(&mut parse_one) { ++ let comma = input.try_parse(|i| i.expect_comma()).is_ok(); ++ input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. ++ if let Ok(item) = input.try_parse(&mut parse_one) { + results.push(item); + } else if comma { + return Err(comma_location.new_unexpected_token_error(Token::Comma)); + } else { + break; +diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml +--- a/servo/ports/geckolib/cbindgen.toml ++++ b/servo/ports/geckolib/cbindgen.toml +@@ -360,11 +360,10 @@ + "gfxFontVariation" = "gfxFontVariation" + "URLExtraData" = "URLExtraData" + "Keyframe" = "Keyframe" + "nsChangeHint" = "nsChangeHint" + "ServoElementSnapshotTable" = "ServoElementSnapshotTable" +-"Keyframe" = "Keyframe" + "ComputedKeyframeValues" = "ComputedKeyframeValues" + "OriginFlags" = "OriginFlags" + "ServoTraversalFlags" = "ServoTraversalFlags" + "ServoStyleSetSizes" = "ServoStyleSetSizes" + "BeforeFlag" = "StyleEasingBeforeFlag" + diff --git a/PKGBUILD b/PKGBUILD index d2e9dd9..7a35b10 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -82,6 +82,7 @@ source=(https://gitlab.com/garuda-linux/firedragon/builder/-/releases/v${_pkgver patch-python3.12-bug1860051.patch patch-python3.12-bug1866829.patch patch-python3.12-bug1874280.patch + 0036-bmo-1912663-cbindgen-0.27.0-fixes.patch rustup.sh::https://sh.rustup.rs https://gitlab.com/garuda-linux/firedragon/settings/-/raw/master/firedragon.psd https://gitlab.com/garuda-linux/firedragon/settings/-/raw/master/firedragon.desktop) @@ -90,6 +91,7 @@ sha256sums=('5f5e6a2cf2e6faa53f9e1a1707374941a10cfcaffb7e695c9f6cd376e6c406b1' '168d16a027a81c311c58f9302858244dfa5517f0a95a8d3df1abbf9b93b9d455' 'df27ed1e0da5b192224978dc2a593a97e18e6e22062c611fc32b277500324e62' 'cf1c69fd3338fd8f5e482f55b669160b08dfb021f2348b620f0a85dd9dee8150' + '2a4585f6b7060b1a73affd51f6d7b8fefbc4e5d7b760294c23d638e7b3bfcef4' '32a680a84cf76014915b3f8aa44e3e40731f3af92cd45eb0fcc6264fd257c428' '61355930cc59813e7e610ffdab8a01e32be980fffe1dfd8f9654b8f8f9f7fdc0' '53d3e743f3750522318a786befa196237892c93f20571443fdf82a480e7f0560') @@ -120,6 +122,7 @@ prepare() { patch -Nsp1 -i "${srcdir}/patch-python3.12-bug1860051.patch" patch -Nsp1 -i "${srcdir}/patch-python3.12-bug1866829.patch" patch -Nsp1 -i "${srcdir}/patch-python3.12-bug1874280.patch" + patch -Nsp1 -i "${srcdir}/0036-bmo-1912663-cbindgen-0.27.0-fixes.patch" export PATH="/usr/lib/llvm17/bin:$PATH" export LD_LIBRARY_PATH=/usr/lib/llvm17/lib