summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-03 19:59:53 +0100
committerdavidovski <david@davidovski.xyz>2022-05-03 19:59:53 +0100
commit751b7f3d84515715d07d92a5aed78062bd39adff (patch)
tree9bfdc04a539250f35452cbd0986ca361dd91509f
parent50740393013cb5fde05318d917ac4b68c58fdfa9 (diff)
added extra files
-rw-r--r--extra/babl/meson-0.60.patch12
-rw-r--r--extra/firefox/allow-custom-rust-vendor.patch564
-rw-r--r--extra/firefox/avoid-redefinition.patch15
-rw-r--r--extra/firefox/disable-moz-stackwalk.patch18
-rw-r--r--extra/firefox/disable-neon-in-aom.patch39
-rw-r--r--extra/firefox/firefox-safe.desktop11
-rw-r--r--extra/firefox/fix-fortify-system-wrappers.patch13
-rw-r--r--extra/firefox/fix-rust-target.patch31
-rw-r--r--extra/firefox/fix-webrtc-glibcisms.patch20
-rw-r--r--extra/firefox/mallinfo.patch20
-rw-r--r--extra/firefox/sandbox-fork.patch15
-rw-r--r--extra/firefox/sandbox-largefile.patch17
-rw-r--r--extra/firefox/sandbox-sched_setscheduler.patch16
-rw-r--r--extra/firefox/stab.h71
-rw-r--r--extra/gegl/ff-load.patch15
-rw-r--r--extra/iwd/iwd.confd24
-rw-r--r--extra/iwd/iwd.initd25
-rw-r--r--extra/iwd/main.conf7
-rw-r--r--extra/librsvg/rsvg-h-dont-use-comments-in-comments.patch31
-rw-r--r--extra/librsvg/target.patch26
-rw-r--r--extra/openjpeg/b4700bc09d55ac17ff6bef9b0a867f6de527be17.patch77
-rw-r--r--extra/openjpeg/fix-cmakelists.patch11
-rw-r--r--extra/poppler/dont-enforce-build-type.patch26
-rw-r--r--extra/xf86-video-nouveau/xorg-server-21.1.patch50
-rw-r--r--extra/xlinks/links.desktop8
-rw-r--r--repo/apps/links.xibuild27
-rw-r--r--repo/apps/xlinks.xibuild30
-rw-r--r--repo/devel/cbindgen.xibuild18
-rw-r--r--repo/media/babl.xibuild26
-rw-r--r--repo/media/exiv2.xibuild23
-rw-r--r--repo/media/gexiv2.xibuild25
-rw-r--r--repo/media/libmypaint.xibuild23
-rw-r--r--repo/media/libraw.xibuild27
-rw-r--r--repo/media/openjpeg.xibuild28
-rw-r--r--repo/media/poppler.xibuild29
-rw-r--r--repo/system/json-c.xibuild23
-rw-r--r--repo/system/json-glib.xibuild23
-rw-r--r--repo/util/iftop.xibuild23
-rw-r--r--repo/util/iwd.xibuild35
-rw-r--r--repo/util/tmux.xibuild31
-rw-r--r--repo/x11/slock.xibuild18
-rw-r--r--repo/x11/xclip.xibuild27
-rw-r--r--repo/x11/xsel.xibuild28
-rw-r--r--skip/firefox.xibuild138
-rw-r--r--skip/gegl.xibuild22
-rw-r--r--skip/gimp.xibuild27
-rw-r--r--skip/librsvg.xibuild44
-rw-r--r--skip/wasi-compiler-rt.xibuild45
-rw-r--r--skip/wasi-libc.xibuild21
-rw-r--r--skip/wasi-libcxx.xibuild98
-rw-r--r--skip/wasi-sdk.xibuild13
51 files changed, 2034 insertions, 0 deletions
diff --git a/extra/babl/meson-0.60.patch b/extra/babl/meson-0.60.patch
new file mode 100644
index 0000000..5ac3862
--- /dev/null
+++ b/extra/babl/meson-0.60.patch
@@ -0,0 +1,12 @@
+--- a/meson.build
++++ b/meson.build
+@@ -55,8 +55,7 @@
+ stability_version_number = (major_version != 0 ? minor_version : micro_version)
+ stable = (stability_version_number % 2 == 0)
+
+-conf.set10('BABL_UNSTABLE', not stable, Description:
+- 'Define to 1 if this is an unstable version of BABL.')
++conf.set10('BABL_UNSTABLE', not stable)
+
+ conf.set ('BABL_MAJOR_VERSION', '@0@'.format(major_version))
+ conf.set ('BABL_MINOR_VERSION', '@0@'.format(minor_version))
diff --git a/extra/firefox/allow-custom-rust-vendor.patch b/extra/firefox/allow-custom-rust-vendor.patch
new file mode 100644
index 0000000..218650f
--- /dev/null
+++ b/extra/firefox/allow-custom-rust-vendor.patch
@@ -0,0 +1,564 @@
+From a5a3db2d32ff1d359aef5ec586b91164570c1685 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 09:56:15 -0800
+Subject: [PATCH 1/7] Support custom vendor strings.
+
+Add support for custom vendors, as in "x86_64-gentoo-linux-musl".
+
+Fixes #33.
+---
+ src/targets.rs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ src/triple.rs | 4 --
+ 2 files changed, 106 insertions(+), 6 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 6ae570e..90b2736 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1,6 +1,8 @@
+ // This file defines all the identifier enums and target-aware logic.
+
+ use crate::triple::{Endianness, PointerWidth, Triple};
++use alloc::boxed::Box;
++use alloc::string::String;
+ use core::fmt;
+ use core::str::FromStr;
+
+@@ -292,7 +294,7 @@ impl Aarch64Architecture {
+
+ /// The "vendor" field, which in practice is little more than an arbitrary
+ /// modifier.
+-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
++#[derive(Clone, Debug, PartialEq, Eq, Hash)]
+ #[allow(missing_docs)]
+ pub enum Vendor {
+ Unknown,
+@@ -306,6 +308,15 @@ pub enum Vendor {
+ Sun,
+ Uwp,
+ Wrs,
++
++ /// A custom vendor. "Custom" in this context means that the vendor is
++ /// not specifically recognized by upstream Autotools, LLVM, Rust, or other
++ /// relevant authorities on triple naming. It's useful for people building
++ /// and using locally patched toolchains.
++ ///
++ /// Outside of such patched environments, users of `target-lexicon` should
++ /// treat `Custom` the same as `Unknown` and ignore the string.
++ Custom(Box<String>),
+ }
+
+ /// The "operating system" field, which sometimes implies an environment, and
+@@ -717,6 +728,7 @@ impl fmt::Display for Vendor {
+ Vendor::Sun => "sun",
+ Vendor::Uwp => "uwp",
+ Vendor::Wrs => "wrs",
++ Vendor::Custom(ref name) => name,
+ };
+ f.write_str(s)
+ }
+@@ -738,7 +750,46 @@ impl FromStr for Vendor {
+ "sun" => Vendor::Sun,
+ "uwp" => Vendor::Uwp,
+ "wrs" => Vendor::Wrs,
+- _ => return Err(()),
++ custom => {
++ use alloc::borrow::ToOwned;
++
++ // A custom vendor. Since triple syntax is so loosely defined,
++ // be as conservative as we can to avoid potential ambiguities.
++ // We err on the side of being too strict here, as we can
++ // always relax it if needed.
++
++ // Don't allow empty string names.
++ if custom.is_empty() {
++ return Err(());
++ }
++
++ // Don't allow any other recognized name as a custom vendor,
++ // since vendors can be omitted in some contexts.
++ if Architecture::from_str(custom).is_ok()
++ || OperatingSystem::from_str(custom).is_ok()
++ || Environment::from_str(custom).is_ok()
++ || BinaryFormat::from_str(custom).is_ok()
++ {
++ return Err(());
++ }
++
++ // Require the first character to be an ascii lowercase.
++ if !custom.chars().nth(0).unwrap().is_ascii_lowercase() {
++ return Err(());
++ }
++
++ // Restrict the set of characters permitted in a custom vendor.
++ if custom
++ .find(|c: char| {
++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
++ })
++ .is_some()
++ {
++ return Err(());
++ }
++
++ Vendor::Custom(Box::new(custom.to_owned()))
++ }
+ })
+ }
+ }
+@@ -1120,4 +1171,57 @@ mod tests {
+ assert_eq!(t.environment, Environment::Eabihf);
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ }
++
++ #[test]
++ fn custom_vendors() {
++ assert!(Triple::from_str("x86_64--linux").is_err());
++ assert!(Triple::from_str("x86_64-42-linux").is_err());
++ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
++ assert!(Triple::from_str("x86_64-^-linux").is_err());
++ assert!(Triple::from_str("x86_64- -linux").is_err());
++ assert!(Triple::from_str("x86_64-CustomVendor-linux").is_err());
++ assert!(Triple::from_str("x86_64-linux-linux").is_err());
++ assert!(Triple::from_str("x86_64-x86_64-linux").is_err());
++ assert!(Triple::from_str("x86_64-elf-linux").is_err());
++ assert!(Triple::from_str("x86_64-gnu-linux").is_err());
++ assert!(Triple::from_str("x86_64-linux-customvendor").is_err());
++ assert!(Triple::from_str("customvendor").is_err());
++ assert!(Triple::from_str("customvendor-x86_64").is_err());
++ assert!(Triple::from_str("x86_64-").is_err());
++ assert!(Triple::from_str("x86_64--").is_err());
++
++ let t = Triple::from_str("x86_64-customvendor-linux")
++ .expect("can't parse target with custom vendor");
++ assert_eq!(t.architecture, Architecture::X86_64);
++ assert_eq!(
++ t.vendor,
++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ );
++ assert_eq!(t.operating_system, OperatingSystem::Linux);
++ assert_eq!(t.environment, Environment::Unknown);
++ assert_eq!(t.binary_format, BinaryFormat::Elf);
++ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
++
++ let t = Triple::from_str("x86_64-customvendor")
++ .expect("can't parse target with custom vendor");
++ assert_eq!(t.architecture, Architecture::X86_64);
++ assert_eq!(
++ t.vendor,
++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ );
++ assert_eq!(t.operating_system, OperatingSystem::Unknown);
++ assert_eq!(t.environment, Environment::Unknown);
++ assert_eq!(t.binary_format, BinaryFormat::Unknown);
++
++ assert_eq!(
++ Triple::from_str("unknown-foo"),
++ Ok(Triple {
++ architecture: Architecture::Unknown,
++ vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
++ operating_system: OperatingSystem::Unknown,
++ environment: Environment::Unknown,
++ binary_format: BinaryFormat::Unknown,
++ })
++ );
++ }
+ }
+diff --git a/src/triple.rs b/src/triple.rs
+index 36dcd9a..1abda26 100644
+--- a/third_party/rust/target-lexicon.0.9.0/src/triple.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/triple.rs
+@@ -322,10 +322,6 @@ mod tests {
+ Triple::from_str("foo"),
+ Err(ParseError::UnrecognizedArchitecture("foo".to_owned()))
+ );
+- assert_eq!(
+- Triple::from_str("unknown-foo"),
+- Err(ParseError::UnrecognizedVendor("foo".to_owned()))
+- );
+ assert_eq!(
+ Triple::from_str("unknown-unknown-foo"),
+ Err(ParseError::UnrecognizedOperatingSystem("foo".to_owned()))
+
+From 6f90d7274dce4e7f9bb120f6b36cf26881bde9a7 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 10:33:56 -0800
+Subject: [PATCH 2/7] Add more tests.
+
+---
+ src/targets.rs | 30 ++++++++++++++++++++++++++++--
+ 1 file changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 90b2736..7d1f069 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1174,6 +1174,7 @@ mod tests {
+
+ #[test]
+ fn custom_vendors() {
++ // Test various invalid cases.
+ assert!(Triple::from_str("x86_64--linux").is_err());
+ assert!(Triple::from_str("x86_64-42-linux").is_err());
+ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err());
+@@ -1190,6 +1191,31 @@ mod tests {
+ assert!(Triple::from_str("x86_64-").is_err());
+ assert!(Triple::from_str("x86_64--").is_err());
+
++ // Test various Unicode things.
++ assert!(
++ Triple::from_str("x86_64-𝓬𝓾𝓼𝓽𝓸𝓶𝓿𝓮𝓷𝓭𝓸𝓻-linux").is_err(),
++ "unicode font hazard"
++ );
++ assert!(
++ Triple::from_str("x86_64-ćúśtőḿvéńdőŕ-linux").is_err(),
++ "diacritical mark stripping hazard"
++ );
++ assert!(
++ Triple::from_str("x86_64-customvendοr-linux").is_err(),
++ "homoglyph hazard"
++ );
++ assert!(Triple::from_str("x86_64-customvendor-linux").is_ok());
++ assert!(
++ Triple::from_str("x86_64-ffi-linux").is_err(),
++ "normalization hazard"
++ );
++ assert!(Triple::from_str("x86_64-ffi-linux").is_ok());
++ assert!(
++ Triple::from_str("x86_64-custom‍vendor-linux").is_err(),
++ "zero-width character hazard"
++ );
++
++ // Test some valid cases.
+ let t = Triple::from_str("x86_64-customvendor-linux")
+ .expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+@@ -1202,8 +1228,8 @@ mod tests {
+ assert_eq!(t.binary_format, BinaryFormat::Elf);
+ assert_eq!(t.to_string(), "x86_64-customvendor-linux");
+
+- let t = Triple::from_str("x86_64-customvendor")
+- .expect("can't parse target with custom vendor");
++ let t =
++ Triple::from_str("x86_64-customvendor").expect("can't parse target with custom vendor");
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+
+From c0e318b3c1be2d1965579f07dd563fb9cc0c4eb1 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Tue, 5 Nov 2019 12:56:31 -0800
+Subject: [PATCH 3/7] Use `.chars().any(...)` instead of
+ `.find(...).is_some()`.
+
+---
+ src/targets.rs | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 7d1f069..1078dd3 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon/src-0.9.0/targets.rs
+@@ -779,12 +779,9 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- if custom
+- .find(|c: char| {
+- !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- })
+- .is_some()
+- {
++ if custom.chars().any(|c: char| {
++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
++ }) {
+ return Err(());
+ }
+
+
+From f319950528654c772193d9eb3bf40bc8df35fcae Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Thu, 7 Nov 2019 15:15:48 -0800
+Subject: [PATCH 4/7] Fix build.rs to generate the correct code to build
+ Vendors.
+
+---
+ build.rs | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index a0ba3b7..446f9e7 100644
+--- a/third_party/rust/target-lexicon-0.9.0/build.rs
++++ b/third_party/rust/target-lexicon-0.9.0/build.rs
+@@ -32,6 +32,7 @@ mod parse_error {
+ }
+ }
+
++use self::targets::Vendor;
+ use self::triple::Triple;
+
+ fn main() {
+@@ -60,7 +61,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ " architecture: Architecture::{:?},",
+ triple.architecture
+ )?;
+- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
++ writeln!(out, " vendor: {},", vendor_display(&triple.vendor))?;
+ writeln!(
+ out,
+ " operating_system: OperatingSystem::{:?},",
+@@ -90,7 +91,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ writeln!(out, "impl Vendor {{")?;
+ writeln!(out, " /// Return the vendor for the current host.")?;
+ writeln!(out, " pub const fn host() -> Self {{")?;
+- writeln!(out, " Vendor::{:?}", triple.vendor)?;
++ writeln!(out, " {}", vendor_display(&triple.vendor))?;
+ writeln!(out, " }}")?;
+ writeln!(out, "}}")?;
+ writeln!(out)?;
+@@ -160,3 +161,12 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+
+ Ok(())
+ }
++
++fn vendor_display(vendor: &Vendor) -> String {
++ match vendor {
++ Vendor::Custom(custom) => {
++ format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
++ }
++ known => format!("Vendor::{:?}", known),
++ }
++}
+
+From e558f6934535be3b8ccc9a99a33e861cb7431dfe Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Fri, 8 Nov 2019 12:10:34 -0800
+Subject: [PATCH 5/7] Fix custom vendors in `const fn` contexts.
+
+---
+ build.rs | 15 +++++++++++----
+ src/lib.rs | 4 ++--
+ src/targets.rs | 51 ++++++++++++++++++++++++++++++++++++++++++--------
+ 3 files changed, 56 insertions(+), 14 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index 446f9e7..e88206e 100644
+--- a/third_party/rust/target-lexicon-0.9.0/build.rs
++++ b/third_party/rust/target-lexicon-0.9.0/build.rs
+@@ -53,6 +53,8 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ writeln!(out, "use crate::Aarch64Architecture::*;")?;
+ writeln!(out, "#[allow(unused_imports)]")?;
+ writeln!(out, "use crate::ArmArchitecture::*;")?;
++ writeln!(out, "#[allow(unused_imports)]")?;
++ writeln!(out, "use crate::CustomVendor;")?;
+ writeln!(out)?;
+ writeln!(out, "/// The `Triple` of the current host.")?;
+ writeln!(out, "pub const HOST: Triple = Triple {{")?;
+@@ -139,7 +141,11 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+ " architecture: Architecture::{:?},",
+ triple.architecture
+ )?;
+- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?;
++ writeln!(
++ out,
++ " vendor: {},",
++ vendor_display(&triple.vendor)
++ )?;
+ writeln!(
+ out,
+ " operating_system: OperatingSystem::{:?},",
+@@ -164,9 +170,10 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> {
+
+ fn vendor_display(vendor: &Vendor) -> String {
+ match vendor {
+- Vendor::Custom(custom) => {
+- format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom)
+- }
++ Vendor::Custom(custom) => format!(
++ "Vendor::Custom(CustomVendor::Static({:?}))",
++ custom.as_str()
++ ),
+ known => format!("Vendor::{:?}", known),
+ }
+ }
+diff --git a/src/lib.rs b/src/lib.rs
+index 8d6da8d..70f6488 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/lib.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/lib.rs
+@@ -28,7 +28,7 @@ mod triple;
+ pub use self::host::HOST;
+ pub use self::parse_error::ParseError;
+ pub use self::targets::{
+- Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, Environment, OperatingSystem,
+- Vendor,
++ Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment,
++ OperatingSystem, Vendor,
+ };
+ pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple};
+diff --git a/src/targets.rs b/src/targets.rs
+index 1078dd3..7152020 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -4,6 +4,7 @@ use crate::triple::{Endianness, PointerWidth, Triple};
+ use alloc::boxed::Box;
+ use alloc::string::String;
+ use core::fmt;
++use core::hash::{Hash, Hasher};
+ use core::str::FromStr;
+
+ /// The "architecture" field, which in some cases also specifies a specific
+@@ -292,6 +293,39 @@ impl Aarch64Architecture {
+ }
+ }
+
++/// A string for a `Vendor::Custom` that can either be used in `const`
++/// contexts or hold dynamic strings.
++#[derive(Clone, Debug, Eq)]
++pub enum CustomVendor {
++ /// An owned `String`. This supports the general case.
++ Owned(Box<String>),
++ /// A static `str`, so that `CustomVendor` can be constructed in `const`
++ /// contexts.
++ Static(&'static str),
++}
++
++impl CustomVendor {
++ /// Extracts a string slice.
++ pub fn as_str(&self) -> &str {
++ match self {
++ CustomVendor::Owned(s) => s,
++ CustomVendor::Static(s) => s,
++ }
++ }
++}
++
++impl PartialEq for CustomVendor {
++ fn eq(&self, other: &Self) -> bool {
++ self.as_str() == other.as_str()
++ }
++}
++
++impl Hash for CustomVendor {
++ fn hash<H: Hasher>(&self, state: &mut H) {
++ self.as_str().hash(state)
++ }
++}
++
+ /// The "vendor" field, which in practice is little more than an arbitrary
+ /// modifier.
+ #[derive(Clone, Debug, PartialEq, Eq, Hash)]
+@@ -316,7 +350,7 @@ pub enum Vendor {
+ ///
+ /// Outside of such patched environments, users of `target-lexicon` should
+ /// treat `Custom` the same as `Unknown` and ignore the string.
+- Custom(Box<String>),
++ Custom(CustomVendor),
+ }
+
+ /// The "operating system" field, which sometimes implies an environment, and
+@@ -728,7 +762,7 @@ impl fmt::Display for Vendor {
+ Vendor::Sun => "sun",
+ Vendor::Uwp => "uwp",
+ Vendor::Wrs => "wrs",
+- Vendor::Custom(ref name) => name,
++ Vendor::Custom(ref name) => name.as_str(),
+ };
+ f.write_str(s)
+ }
+@@ -779,13 +813,14 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- if custom.chars().any(|c: char| {
++ fn is_prohibited_char(c: char) -> bool {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- }) {
++ }
++ if custom.chars().any(is_prohibited_char) {
+ return Err(());
+ }
+
+- Vendor::Custom(Box::new(custom.to_owned()))
++ Vendor::Custom(CustomVendor::Owned(Box::new(custom.to_owned())))
+ }
+ })
+ }
+@@ -1218,7 +1253,7 @@ mod tests {
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ Vendor::Custom(CustomVendor::Static("customvendor"))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Linux);
+ assert_eq!(t.environment, Environment::Unknown);
+@@ -1230,7 +1265,7 @@ mod tests {
+ assert_eq!(t.architecture, Architecture::X86_64);
+ assert_eq!(
+ t.vendor,
+- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap()))
++ Vendor::Custom(CustomVendor::Static("customvendor"))
+ );
+ assert_eq!(t.operating_system, OperatingSystem::Unknown);
+ assert_eq!(t.environment, Environment::Unknown);
+@@ -1240,7 +1275,7 @@ mod tests {
+ Triple::from_str("unknown-foo"),
+ Ok(Triple {
+ architecture: Architecture::Unknown,
+- vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())),
++ vendor: Vendor::Custom(CustomVendor::Static("foo")),
+ operating_system: OperatingSystem::Unknown,
+ environment: Environment::Unknown,
+ binary_format: BinaryFormat::Unknown,
+
+From bc4b444133b8a5e56602f7c77c10ef3f1e7a7c78 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Mon, 18 Nov 2019 13:45:58 -0800
+Subject: [PATCH 6/7] Add a testcase with a BOM too, just in case.
+
+---
+ src/targets.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 7152020..9a4d990 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -1246,6 +1246,10 @@ mod tests {
+ Triple::from_str("x86_64-custom‍vendor-linux").is_err(),
+ "zero-width character hazard"
+ );
++ assert!(
++ Triple::from_str("x86_64-customvendor-linux").is_err(),
++ "BOM hazard"
++ );
+
+ // Test some valid cases.
+ let t = Triple::from_str("x86_64-customvendor-linux")
+
+From 721fbbe1c9cfd3adc9aaf011c62d6a36078f4133 Mon Sep 17 00:00:00 2001
+From: Dan Gohman <sunfish@mozilla.com>
+Date: Mon, 18 Nov 2019 20:56:40 -0800
+Subject: [PATCH 7/7] Use an anonymous function instead of just a local
+ function.
+
+---
+ src/targets.rs | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/targets.rs b/src/targets.rs
+index 9a4d990..eb5a088 100644
+--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs
++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs
+@@ -813,10 +813,9 @@ impl FromStr for Vendor {
+ }
+
+ // Restrict the set of characters permitted in a custom vendor.
+- fn is_prohibited_char(c: char) -> bool {
++ if custom.chars().any(|c: char| {
+ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.')
+- }
+- if custom.chars().any(is_prohibited_char) {
++ }) {
+ return Err(());
+ }
+
diff --git a/extra/firefox/avoid-redefinition.patch b/extra/firefox/avoid-redefinition.patch
new file mode 100644
index 0000000..af11c50
--- /dev/null
+++ b/extra/firefox/avoid-redefinition.patch
@@ -0,0 +1,15 @@
+Author: Rasmus Thomsen <oss@cogitri.dev>
+Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones
+(linux/if.h), leading to redefinitions. We need to include net/if.h before
+linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt
+Upstream: No
+--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200
++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200
+@@ -31,6 +31,7 @@
+ */
+
+ #if defined(LINUX)
++#include <net/if.h>
+ #include "addrs-netlink.h"
+ #include <csi_platform.h>
+ #include <assert.h>
diff --git a/extra/firefox/disable-moz-stackwalk.patch b/extra/firefox/disable-moz-stackwalk.patch
new file mode 100644
index 0000000..b6bc756
--- /dev/null
+++ b/extra/firefox/disable-moz-stackwalk.patch
@@ -0,0 +1,18 @@
+diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp
+index 7d62921..adcfa44 100644
+--- a/mozglue/misc/StackWalk.cpp
++++ b/mozglue/misc/StackWalk.cpp
+@@ -33,13 +33,7 @@ using namespace mozilla;
+ # define MOZ_STACKWALK_SUPPORTS_MACOSX 0
+ #endif
+
+-#if (defined(linux) && \
+- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
+- defined(HAVE__UNWIND_BACKTRACE)))
+-# define MOZ_STACKWALK_SUPPORTS_LINUX 1
+-#else
+ # define MOZ_STACKWALK_SUPPORTS_LINUX 0
+-#endif
+
+ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ # define HAVE___LIBC_STACK_END 1
diff --git a/extra/firefox/disable-neon-in-aom.patch b/extra/firefox/disable-neon-in-aom.patch
new file mode 100644
index 0000000..6df05a1
--- /dev/null
+++ b/extra/firefox/disable-neon-in-aom.patch
@@ -0,0 +1,39 @@
+Firefox (75) and AOM itself fail to build with NEON enabled. As such
+we should disable it for now.
+
+In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c:12:
+/home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/av1/common/arm/mem_neon.h: In function 'load_u8_8x8':
+/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/include/arm_neon.h:10303:1: error: inlining failed in call to always_inline 'vld1_u8': target specific option mismatch
+10303 | vld1_u8 (const uint8_t * __a)
+ | ^~~~~~~
+--- a/media/libaom/moz.build 2020-04-09 08:20:14.608439591 +0200
++++ b/media/libaom/moz.build 2020-04-09 08:20:21.801745246 +0200
+@@ -42,26 +42,6 @@
+ ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ]
+ LOCAL_INCLUDES += [ '/media/libaom/config/linux/ia32/' ]
+ EXPORTS.aom += [ 'config/linux/ia32/config/aom_config.h' ]
+-elif CONFIG['CPU_ARCH'] == 'arm':
+- EXPORTS.aom += files['ARM_EXPORTS']
+- ASFLAGS += [
+- '-I%s/media/libaom/config/linux/arm/' % TOPSRCDIR,
+- '-I%s/libaom' % OBJDIR,
+- ]
+- LOCAL_INCLUDES += [ '/media/libaom/config/linux/arm/' ]
+- EXPORTS.aom += [ 'config/linux/arm/config/aom_config.h' ]
+-
+- SOURCES += files['ARM_SOURCES']
+-
+- for f in SOURCES:
+- if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
+-
+- if CONFIG['OS_TARGET'] == 'Android':
+- # For cpu-features.h
+- LOCAL_INCLUDES += [
+- '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'],
+- ]
+ else:
+ # Generic C-only configuration
+ EXPORTS.aom += files['GENERIC_EXPORTS']
+
+
diff --git a/extra/firefox/firefox-safe.desktop b/extra/firefox/firefox-safe.desktop
new file mode 100644
index 0000000..1538fc6
--- /dev/null
+++ b/extra/firefox/firefox-safe.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=firefox -safe-mode %u
+Icon=firefox
+Type=Application
+Terminal=false
+MultipleArgs=false
+Name=Firefox - Safe Mode
+GenericName=Web Browser - Safe Mode
+StartupNotify=false
+Categories=Network;WebBrowser;
diff --git a/extra/firefox/fix-fortify-system-wrappers.patch b/extra/firefox/fix-fortify-system-wrappers.patch
new file mode 100644
index 0000000..17cf7e3
--- /dev/null
+++ b/extra/firefox/fix-fortify-system-wrappers.patch
@@ -0,0 +1,13 @@
+The wrapper features.h gets pulled in by system headers causing thigns to
+break. We work around it by simply not wrap features.h
+
+--- ./config/system-headers.mozbuild.orig
++++ ./config/system-headers.mozbuild
+@@ -229,7 +229,6 @@
+ 'execinfo.h',
+ 'extras.h',
+ 'fcntl.h',
+- 'features.h',
+ 'fenv.h',
+ 'ffi.h',
+ 'fibdef.h',
diff --git a/extra/firefox/fix-rust-target.patch b/extra/firefox/fix-rust-target.patch
new file mode 100644
index 0000000..9342063
--- /dev/null
+++ b/extra/firefox/fix-rust-target.patch
@@ -0,0 +1,31 @@
+Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
+weird custom build system...
+
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -225,7 +225,9 @@
+ data.setdefault(key, []).append(namespace(rust_target=t, target=info))
+ return data
+
+-
++@imports('os')
++@imports(_from='mozbuild.util', _import='ensure_unicode')
++@imports(_from='mozbuild.util', _import='system_encoding')
+ def detect_rustc_target(
+ host_or_target, compiler_info, arm_target, rust_supported_targets
+ ):
+@@ -340,13 +342,13 @@
+
+ return None
+
+- rustc_target = find_candidate(candidates)
++ rustc_target = os.environ['RUST_TARGET']
+
+ if rustc_target is None:
+ die("Don't know how to translate {} for rustc".format(host_or_target.alias))
+
+- return rustc_target
++ return ensure_unicode(rustc_target, system_encoding)
+
+
+ @imports('os')
diff --git a/extra/firefox/fix-webrtc-glibcisms.patch b/extra/firefox/fix-webrtc-glibcisms.patch
new file mode 100644
index 0000000..4f9043b
--- /dev/null
+++ b/extra/firefox/fix-webrtc-glibcisms.patch
@@ -0,0 +1,20 @@
+--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
++++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -18,7 +18,7 @@
+ #define WEBRTC_GLIBC_PREREQ(a, b) 0
+ #endif
+
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
+ #include <sys/auxv.h>
+ #else
+ #include <errno.h>
+@@ -40,7 +40,7 @@
+ int architecture = 0;
+ uint64_t hwcap = 0;
+ const char* platform = NULL;
+-#if WEBRTC_GLIBC_PREREQ(2, 16)
++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16)
+ hwcap = getauxval(AT_HWCAP);
+ platform = (const char*)getauxval(AT_PLATFORM);
+ #else
diff --git a/extra/firefox/mallinfo.patch b/extra/firefox/mallinfo.patch
new file mode 100644
index 0000000..7916a20
--- /dev/null
+++ b/extra/firefox/mallinfo.patch
@@ -0,0 +1,20 @@
+diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
+index 865e1b5430..9a00dafecb 100644
+--- a/xpcom/base/nsMemoryReporterManager.cpp
++++ b/xpcom/base/nsMemoryReporterManager.cpp
+@@ -124,6 +124,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) {
+ return GetProcSelfSmapsPrivate(aN);
+ }
+
++#ifdef __GLIBC__
+ # ifdef HAVE_MALLINFO
+ # define HAVE_SYSTEM_HEAP_REPORTER 1
+ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
+@@ -143,6 +144,7 @@ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
+ return NS_OK;
+ }
+ # endif
++#endif
+
+ #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
+ defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
diff --git a/extra/firefox/sandbox-fork.patch b/extra/firefox/sandbox-fork.patch
new file mode 100644
index 0000000..c7222ab
--- /dev/null
+++ b/extra/firefox/sandbox-fork.patch
@@ -0,0 +1,15 @@
+make SYS_fork non-fatal, musl uses it for fork(2)
+
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1253,6 +1253,10 @@
+ // usually do something reasonable on error.
+ case __NR_clone:
+ return ClonePolicy(Error(EPERM));
++#ifdef __NR_fork
++ case __NR_fork:
++ return Error(ENOSYS);
++#endif
+
+ # ifdef __NR_fadvise64
+ case __NR_fadvise64:
diff --git a/extra/firefox/sandbox-largefile.patch b/extra/firefox/sandbox-largefile.patch
new file mode 100644
index 0000000..f1cf28b
--- /dev/null
+++ b/extra/firefox/sandbox-largefile.patch
@@ -0,0 +1,17 @@
+--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100
++++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100
+@@ -68,7 +68,13 @@
+
+ // The headers define O_LARGEFILE as 0 on x86_64, but we need the
+ // actual value because it shows up in file flags.
+-#define O_LARGEFILE_REAL 00100000
++#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
++#define O_LARGEFILE_REAL 0100000
++#elif defined(__powerpc__)
++#define O_LARGEFILE_REAL 0200000
++#else
++#define O_LARGEFILE_REAL O_LARGEFILE
++#endif
+
+ // Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
+ #define FMODE_NONOTIFY 0x4000000
diff --git a/extra/firefox/sandbox-sched_setscheduler.patch b/extra/firefox/sandbox-sched_setscheduler.patch
new file mode 100644
index 0000000..3163c9e
--- /dev/null
+++ b/extra/firefox/sandbox-sched_setscheduler.patch
@@ -0,0 +1,16 @@
+upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -1694,10 +1694,10 @@
+ return Allow();
+ case __NR_sched_get_priority_min:
+ case __NR_sched_get_priority_max:
++ case __NR_sched_setscheduler:
+ return Allow();
+ case __NR_sched_getparam:
+- case __NR_sched_getscheduler:
+- case __NR_sched_setscheduler: {
++ case __NR_sched_getscheduler: {
+ Arg<pid_t> pid(0);
+ return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
+ }
diff --git a/extra/firefox/stab.h b/extra/firefox/stab.h
new file mode 100644
index 0000000..6f70af3
--- /dev/null
+++ b/extra/firefox/stab.h
@@ -0,0 +1,71 @@
+/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
+/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1991 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stab.h 5.2 (Berkeley) 4/4/91
+ */
+
+#ifndef _STAB_H_
+#define _STAB_H_
+
+/*
+ * The following are symbols used by various debuggers and by the Pascal
+ * compiler. Each of them must have one (or more) of the bits defined by
+ * the N_STAB mask set.
+ */
+
+#define N_GSYM 0x20 /* global symbol */
+#define N_FNAME 0x22 /* F77 function name */
+#define N_FUN 0x24 /* procedure name */
+#define N_STSYM 0x26 /* data segment variable */
+#define N_LCSYM 0x28 /* bss segment variable */
+#define N_MAIN 0x2a /* main function name */
+#define N_PC 0x30 /* global Pascal symbol */
+#define N_RSYM 0x40 /* register variable */
+#define N_SLINE 0x44 /* text segment line number */
+#define N_DSLINE 0x46 /* data segment line number */
+#define N_BSLINE 0x48 /* bss segment line number */
+#define N_SSYM 0x60 /* structure/union element */
+#define N_SO 0x64 /* main source file name */
+#define N_LSYM 0x80 /* stack variable */
+#define N_BINCL 0x82 /* include file beginning */
+#define N_SOL 0x84 /* included source file name */
+#define N_PSYM 0xa0 /* parameter variable */
+#define N_EINCL 0xa2 /* include file end */
+#define N_ENTRY 0xa4 /* alternate entry point */
+#define N_LBRAC 0xc0 /* left bracket */
+#define N_EXCL 0xc2 /* deleted include file */
+#define N_RBRAC 0xe0 /* right bracket */
+#define N_BCOMM 0xe2 /* begin common */
+#define N_ECOMM 0xe4 /* end common */
+#define N_ECOML 0xe8 /* end common (local name) */
+#define N_LENG 0xfe /* length of preceding entry */
+
+#endif /* !_STAB_H_ */
diff --git a/extra/gegl/ff-load.patch b/extra/gegl/ff-load.patch
new file mode 100644
index 0000000..b3c7a5a
--- /dev/null
+++ b/extra/gegl/ff-load.patch
@@ -0,0 +1,15 @@
+This little patch makes it build though:
+--- a/operations/external/ff-load.c 2018-12-18 09:22:34.467409854 +0100
++++ b/operations/external/ff-load.c 2018-12-18 09:22:50.921379092 +0100
+@@ -309,8 +309,8 @@
+ g_warning ("codec not found");
+ }
+
+- if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
+- p->enc->flags |= CODEC_FLAG_TRUNCATED;
++ if (p->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
++ p->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
+
+ if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
+ {
+
diff --git a/extra/iwd/iwd.confd b/extra/iwd/iwd.confd
new file mode 100644
index 0000000..9fed1e0
--- /dev/null
+++ b/extra/iwd/iwd.confd
@@ -0,0 +1,24 @@
+# Configuration for /etc/init.d/iwd
+
+# A comma-separated list of patterns specifying the network interfaces that
+# iwd is allowed to manage. Defaults to any wireless interfaces.
+#allowed_interfaces=
+
+# A comma-separated list of patterns specifying the network interfaces that
+# iwd should ignore.
+#ignored_interfaces=
+
+# Extra options for iwd(8).
+#command_args=
+
+# Log messages are redirected to syslog. Set to empty string to disable.
+#error_logger="logger -t iwd -p daemon.info"
+
+# Number of milliseconds to wait after starting and check that daemon is
+# still running. Set to empty string to disable.
+# NOTE: If you use iwd together with ConnMan and ConnMan crashes when started
+# right after iwd, increase this period to e.g. 200 ms.
+#start_wait=50
+
+# Uncomment to use process supervisor.
+#supervisor="supervise-daemon"
diff --git a/extra/iwd/iwd.initd b/extra/iwd/iwd.initd
new file mode 100644
index 0000000..df5cfb5
--- /dev/null
+++ b/extra/iwd/iwd.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+
+description="iNet wireless daemon"
+
+: ${error_logger="logger -t iwd -p daemon.info"}
+: ${start_wait=50} # milliseconds
+
+command="/usr/libexec/iwd"
+command_background="yes"
+command_args="
+ ${allowed_interfaces:+"--interfaces \"$allowed_interfaces\""}
+ ${ignored_interfaces:+"--nointerfaces \"$ignored_interfaces\""}
+ ${command_args:-}
+ "
+start_stop_daemon_args="
+ ${start_wait:+--wait $start_wait}
+ ${start_stop_daemon_args:-}
+ "
+pidfile="/run/$RC_SVCNAME.pid"
+
+depend() {
+ need dbus
+ before net
+ keyword -shutdown
+}
diff --git a/extra/iwd/main.conf b/extra/iwd/main.conf
new file mode 100644
index 0000000..69670ec
--- /dev/null
+++ b/extra/iwd/main.conf
@@ -0,0 +1,7 @@
+[General]
+EnableNetworkConfiguration=true
+
+[Network]
+EnableIPv6=true
+NameResolvingService=resolvconf
+
diff --git a/extra/librsvg/rsvg-h-dont-use-comments-in-comments.patch b/extra/librsvg/rsvg-h-dont-use-comments-in-comments.patch
new file mode 100644
index 0000000..d7bb1ec
--- /dev/null
+++ b/extra/librsvg/rsvg-h-dont-use-comments-in-comments.patch
@@ -0,0 +1,31 @@
+From d158d111f4b4d539a1f586bf42825c4759386fd4 Mon Sep 17 00:00:00 2001
+From: Federico Mena Quintero <federico@gnome.org>
+Date: Wed, 6 Apr 2022 13:30:40 -0500
+Subject: [PATCH] (#856): Don't use /* as part of the text in C documentation
+ comments
+
+Compilers don't like it!
+
+Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/856
+
+Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/688>
+---
+ include/librsvg/rsvg.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/librsvg/rsvg.h b/include/librsvg/rsvg.h
+index 5a5c97c81..964002354 100644
+--- a/include/librsvg/rsvg.h
++++ b/include/librsvg/rsvg.h
+@@ -122,7 +122,7 @@ GType rsvg_error_get_type (void);
+ * if the base file is `/foo/bar/baz.svg`, then librsvg will
+ * only try to load referenced files (from SVG's
+ * `<image>` element, for example, or from content
+- * included through XML entities) if those files are in `/foo/bar/*` or in `/foo/bar/*\/.../*`.
++ * included through XML entities) if those files are in `/foo/bar/<anything>` or in `/foo/bar/<anything>\/.../<anything>`.
+ * This is so that malicious SVG files cannot include files that are in a directory above.
+ *
+ * The full set of rules for deciding which URLs may be loaded is as follows;
+--
+GitLab
+
diff --git a/extra/librsvg/target.patch b/extra/librsvg/target.patch
new file mode 100644
index 0000000..569bc89
--- /dev/null
+++ b/extra/librsvg/target.patch
@@ -0,0 +1,26 @@
+Patch-Source: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/23495#note_202355
+
+--- a/vendor/system-deps/.cargo-checksum.json.orig
++++ b/vendor/system-deps/.cargo-checksum.json
+@@ -1 +1 @@
+-{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"c38fd96ca3233ebee3bb7e37ca8f8a7a2685cdd7fcccf0210eaa879aa91dc684","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"}
+\ No newline at end of file
++{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"8813a7d146e91e7d3946c27f0ca1b2c2bb8800208190beecd3773cda283d3ea4","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"}
+\ No newline at end of file
+
+--- a/vendor/system-deps/src/lib.rs.orig
++++ b/vendor/system-deps/src/lib.rs
+@@ -668,13 +668,6 @@
+ let mut libraries = Dependencies::default();
+
+ for dep in metadata.deps.iter() {
+- if let Some(cfg) = &dep.cfg {
+- // Check if `cfg()` expression matches the target settings
+- if !self.check_cfg(cfg)? {
+- continue;
+- }
+- }
+-
+ let mut enabled_feature_overrides = Vec::new();
+
+ for o in dep.version_overrides.iter() {
diff --git a/extra/openjpeg/b4700bc09d55ac17ff6bef9b0a867f6de527be17.patch b/extra/openjpeg/b4700bc09d55ac17ff6bef9b0a867f6de527be17.patch
new file mode 100644
index 0000000..169e4ad
--- /dev/null
+++ b/extra/openjpeg/b4700bc09d55ac17ff6bef9b0a867f6de527be17.patch
@@ -0,0 +1,77 @@
+From b4700bc09d55ac17ff6bef9b0a867f6de527be17 Mon Sep 17 00:00:00 2001
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Tue, 27 Apr 2021 09:37:40 -0600
+Subject: [PATCH] use calloc instead of malloc to allocate arrays
+
+---
+ src/bin/jp2/opj_compress.c | 4 ++--
+ src/bin/jp2/opj_decompress.c | 5 ++---
+ src/bin/jp2/opj_dump.c | 6 +++---
+ 3 files changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c
+index 4cc513452..d8f894cb1 100644
+--- a/src/bin/jp2/opj_compress.c
++++ b/src/bin/jp2/opj_compress.c
+@@ -1910,9 +1910,9 @@ int main(int argc, char **argv)
+ num_images = get_num_images(img_fol.imgdirpath);
+ dirptr = (dircnt_t*)malloc(sizeof(dircnt_t));
+ if (dirptr) {
+- dirptr->filename_buf = (char*)malloc(num_images * OPJ_PATH_LEN * sizeof(
++ dirptr->filename_buf = (char*)calloc(num_images, OPJ_PATH_LEN * sizeof(
+ char)); /* Stores at max 10 image file names*/
+- dirptr->filename = (char**) malloc(num_images * sizeof(char*));
++ dirptr->filename = (char**) calloc(num_images, sizeof(char*));
+ if (!dirptr->filename_buf) {
+ ret = 0;
+ goto fin;
+diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
+index 487e3fa18..e54e54fce 100644
+--- a/src/bin/jp2/opj_decompress.c
++++ b/src/bin/jp2/opj_decompress.c
+@@ -1357,14 +1357,13 @@ int main(int argc, char **argv)
+ return EXIT_FAILURE;
+ }
+ /* Stores at max 10 image file names */
+- dirptr->filename_buf = (char*)malloc(sizeof(char) *
+- (size_t)num_images * OPJ_PATH_LEN);
++ dirptr->filename_buf = calloc((size_t) num_images, sizeof(char) * OPJ_PATH_LEN);
+ if (!dirptr->filename_buf) {
+ failed = 1;
+ goto fin;
+ }
+
+- dirptr->filename = (char**) malloc((size_t)num_images * sizeof(char*));
++ dirptr->filename = (char**) calloc((size_t) num_images, sizeof(char*));
+
+ if (!dirptr->filename) {
+ failed = 1;
+diff --git a/src/bin/jp2/opj_dump.c b/src/bin/jp2/opj_dump.c
+index 754a39dd0..4e19c6177 100644
+--- a/src/bin/jp2/opj_dump.c
++++ b/src/bin/jp2/opj_dump.c
+@@ -457,7 +457,7 @@ int main(int argc, char *argv[])
+ opj_codestream_info_v2_t* cstr_info = NULL;
+ opj_codestream_index_t* cstr_index = NULL;
+
+- OPJ_INT32 num_images, imageno;
++ int num_images, imageno;
+ img_fol_t img_fol;
+ dircnt_t *dirptr = NULL;
+
+@@ -486,13 +486,13 @@ int main(int argc, char *argv[])
+ if (!dirptr) {
+ return EXIT_FAILURE;
+ }
+- dirptr->filename_buf = (char*)malloc((size_t)num_images * OPJ_PATH_LEN * sizeof(
++ dirptr->filename_buf = (char*) calloc((size_t) num_images, OPJ_PATH_LEN * sizeof(
+ char)); /* Stores at max 10 image file names*/
+ if (!dirptr->filename_buf) {
+ free(dirptr);
+ return EXIT_FAILURE;
+ }
+- dirptr->filename = (char**) malloc((size_t)num_images * sizeof(char*));
++ dirptr->filename = (char**) calloc((size_t) num_images, sizeof(char*));
+
+ if (!dirptr->filename) {
+ goto fails;
diff --git a/extra/openjpeg/fix-cmakelists.patch b/extra/openjpeg/fix-cmakelists.patch
new file mode 100644
index 0000000..ee5fb01
--- /dev/null
+++ b/extra/openjpeg/fix-cmakelists.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -148,7 +148,7 @@
+ # We could install *.cmake files in share/ however those files contains
+ # hardcoded path to libraries on a multi-arch system (fedora/debian) those
+ # path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
+- set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
++ set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/cmake/${OPENJPEG_INSTALL_SUBDIR}")
+ endif()
+
+ if (APPLE)
diff --git a/extra/poppler/dont-enforce-build-type.patch b/extra/poppler/dont-enforce-build-type.patch
new file mode 100644
index 0000000..5296880
--- /dev/null
+++ b/extra/poppler/dont-enforce-build-type.patch
@@ -0,0 +1,26 @@
+diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
+index 2aed028..fdbe318 100644
+--- a/cmake/modules/PopplerMacros.cmake
++++ b/cmake/modules/PopplerMacros.cmake
+@@ -75,21 +75,6 @@ if(WIN32)
+ "${CMAKE_INSTALL_PREFIX}/bin" )
+ endif(WIN32)
+
+-if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+- set(CMAKE_BUILD_TYPE RelWithDebInfo)
+-endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+-
+-string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE_UPPER)
+-set(_known_build_types RELWITHDEBINFO;RELEASE;DEBUG;DEBUGFULL;PROFILE)
+-# We override CMAKE_CXX_FLAGS_${_CMAKE_BUILD_TYPE_UPPER} below. If the user
+-# selects a CMAKE_BUILD_TYPE that is not handled by the logic below, we will
+-# end up dropping the previous flags (e.g. those set in a cross-compilation
+-# CMake toolchain file). To avoid surprising compilation errors, we emit an
+-# error in that case, so that the user can handle the passed CMAKE_BUILD_TYPE
+-# in the compiler flags logic below.
+-if (NOT "${_CMAKE_BUILD_TYPE_UPPER}" IN_LIST _known_build_types)
+- message(FATAL_ERROR "Unsupported CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-endif()
+ set(_save_cflags "${CMAKE_C_FLAGS}")
+ set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
+
diff --git a/extra/xf86-video-nouveau/xorg-server-21.1.patch b/extra/xf86-video-nouveau/xorg-server-21.1.patch
new file mode 100644
index 0000000..03d0b80
--- /dev/null
+++ b/extra/xf86-video-nouveau/xorg-server-21.1.patch
@@ -0,0 +1,50 @@
+diff --git a/src/compat-api.h b/src/compat-api.h
+index fde2f4b1cfde75875c07bfe13524dc6ba2661382..8a1fcf9be1c5d1ceb48a50f2ed533d93ec7ff4c7 100644
+--- a/src/compat-api.h
++++ b/src/compat-api.h
+@@ -102,4 +102,8 @@
+
+ #endif
+
++#if ABI_VIDEODRV_VERSION < SET_ABI_VERSION(25, 2)
++#define secondary_dst slave_dst
++#endif
++
+ #endif
+diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
+index 55df6f8f11c9e14b1891e5c841faef10c17f0a35..db3b112a2db70f8e902e54aa3af99e51e7d0c6f7 100644
+--- a/src/nouveau_exa.c
++++ b/src/nouveau_exa.c
+@@ -157,7 +157,7 @@ nouveau_exa_destroy_pixmap(ScreenPtr pScreen, void *priv)
+
+ #ifdef NOUVEAU_PIXMAP_SHARING
+ static Bool
+-nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr slave, void **handle_p)
++nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr secondary, void **handle_p)
+ {
+ struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
+ struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
+diff --git a/src/nv_driver.c b/src/nv_driver.c
+index e72a6b65a81119f12f3608295a4547762a866ad7..f9ab4af19361d99d74f580d1ff3f28d49843e8b0 100644
+--- a/src/nv_driver.c
++++ b/src/nv_driver.c
+@@ -559,16 +559,16 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
+ {
+ RegionRec pixregion;
+
+- PixmapRegionInit(&pixregion, dirty->slave_dst);
++ PixmapRegionInit(&pixregion, dirty->secondary_dst);
+
+- DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion);
++ DamageRegionAppend(&dirty->secondary_dst->drawable, &pixregion);
+ #ifdef HAS_DIRTYTRACKING_ROTATION
+ PixmapSyncDirtyHelper(dirty);
+ #else
+ PixmapSyncDirtyHelper(dirty, &pixregion);
+ #endif
+
+- DamageRegionProcessPending(&dirty->slave_dst->drawable);
++ DamageRegionProcessPending(&dirty->secondary_dst->drawable);
+ RegionUninit(&pixregion);
+ }
+
diff --git a/extra/xlinks/links.desktop b/extra/xlinks/links.desktop
new file mode 100644
index 0000000..275d20f
--- /dev/null
+++ b/extra/xlinks/links.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Links
+Comment=Minimal web browser in graphical mode
+Exec=xlinks -g
+Icon=links-48x48.xpm
+Type=Application
+Terminal=false
+Categories=Network;WebBrowser;
diff --git a/repo/apps/links.xibuild b/repo/apps/links.xibuild
new file mode 100644
index 0000000..bb2540d
--- /dev/null
+++ b/repo/apps/links.xibuild
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+NAME="links"
+DESC="Web browser running in text mode only"
+
+MAKEDEPS="make "
+DEPS="bzip2 openssl libevent musl zlib zstd "
+
+PKG_VER=2.25
+SOURCE="http://links.twibright.com/download/links-$PKG_VER.tar.bz2"
+
+build () {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man
+ --disable-javascript \
+ --disable-graphics \
+ --without-x \
+ --disable-nls
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/apps/xlinks.xibuild b/repo/apps/xlinks.xibuild
new file mode 100644
index 0000000..992c6a3
--- /dev/null
+++ b/repo/apps/xlinks.xibuild
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+NAME="xlinks"
+DESC="Web browser running in both graphics and text mode"
+
+MAKEDEPS="make "
+DEPS="bzip2 openssl libevent musl zlib zstd libx11 tiff libpng librsvg"
+
+PKG_VER=2.25
+SOURCE="http://links.twibright.com/download/links-$PKG_VER.tar.bz2"
+ADDITIONAL="links.desktop"
+
+build () {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-graphics \
+ --with-x \
+ --with-fb
+ --disable-nls
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+ mv $PKG_DEST/usr/bin/links $PKG_DEST/usr/bin/xlinks
+ install -D -m0644 "links.desktop" "$PKG_DEST/usr/share/applications/links.desktop"
+}
diff --git a/repo/devel/cbindgen.xibuild b/repo/devel/cbindgen.xibuild
new file mode 100644
index 0000000..8bebc3a
--- /dev/null
+++ b/repo/devel/cbindgen.xibuild
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+NAME="cbindgen"
+DESC="Tool to generate C bindings from Rust code"
+
+MAKEDEPS=""
+DEPS="gcc "
+
+PKG_VER=0.20.0
+SOURCE="https://crates.io/api/v1/crates/cbindgen/$PKG_VER/download"
+
+build () {
+ cargo build --release --locked --verbose
+}
+
+package () {
+ install -Dm0755 target/release/cbindgen "$PKG_DEST/usr/bin/cbindgen"
+}
diff --git a/repo/media/babl.xibuild b/repo/media/babl.xibuild
new file mode 100644
index 0000000..f786806
--- /dev/null
+++ b/repo/media/babl.xibuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+NAME="babl"
+DESC="Dynamic, any to any, pixel format conversion library"
+
+MAKEDEPS="meson ninja "
+DEPS="lcms2 "
+
+PKG_VER=0.1.92
+SOURCE="https://ftp.gimp.org/pub/babl/${PKG_VER%.*}/babl-$PKG_VER.tar.xz"
+ADDITIONAL="meson-0.60.patch "
+
+prepare () {
+ apply_patches
+}
+
+build () {
+ cd build &&
+ meson --prefix=/usr \
+ .. &&
+ ninja
+}
+
+package () {
+ DESTDIR=$PKG_DEST ninja install
+}
diff --git a/repo/media/exiv2.xibuild b/repo/media/exiv2.xibuild
new file mode 100644
index 0000000..9a640bc
--- /dev/null
+++ b/repo/media/exiv2.xibuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+NAME="exiv2"
+DESC="Exif and Iptc metadata manipulation library and tools."
+
+MAKEDEPS="cmake "
+DEPS="expat musl zlib "
+
+PKG_VER=0.27.5
+SOURCE="https://github.com/Exiv2/exiv2/releases/download/v$PKG_VER/exiv2-$PKG_VER-Source.tar.gz"
+
+build () {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DBUILD_STATIC_LIBS=OFF
+ cmake --build build
+}
+
+package () {
+ DESTDIR="$PKG_DEST" cmake --install build
+}
diff --git a/repo/media/gexiv2.xibuild b/repo/media/gexiv2.xibuild
new file mode 100644
index 0000000..1aacbd4
--- /dev/null
+++ b/repo/media/gexiv2.xibuild
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+NAME="gexiv2"
+DESC="GObject-based wrapper around the Exiv2 library"
+
+MAKEDEPS="meson ninja "
+DEPS="exiv2 glib "
+
+PKG_VER=0.14.0
+SOURCE="https://download.gnome.org/sources/gexiv2/${PKG_VER%.*}/gexiv2-$PKG_VER.tar.xz"
+
+build () {
+ mkdir build &&
+ cd build &&
+ meson --prefix=/usr \
+ -Dgtk_doc=true \
+ -Dintrospection=true \
+ -Dvapi=true \
+ .. &&
+ ninja
+}
+
+package () {
+ DESTDIR=$PKG_DEST ninja install
+}
diff --git a/repo/media/libmypaint.xibuild b/repo/media/libmypaint.xibuild
new file mode 100644
index 0000000..87df793
--- /dev/null
+++ b/repo/media/libmypaint.xibuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+NAME="libmypaint"
+DESC="library for making brushstrokes"
+
+MAKEDEPS="make "
+DEPS="glib json-c intltool "
+
+PKG_VER=1.6.1
+SOURCE="https://github.com/mypaint/libmypaint/releases/download/v$PKG_VER/libmypaint-$PKG_VER.tar.xz"
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/media/libraw.xibuild b/repo/media/libraw.xibuild
new file mode 100644
index 0000000..5a06397
--- /dev/null
+++ b/repo/media/libraw.xibuild
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+NAME="libraw"
+DESC="Library for reading RAW files obtained from digital photo cameras"
+
+MAKEDEPS="make "
+DEPS="musl "
+
+PKG_VER=0.20.2
+SOURCE="https://www.libraw.org/data/LibRaw-$PKG_VER.tar.gz"
+
+prepare () {
+ autoreconf -fi
+}
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/media/openjpeg.xibuild b/repo/media/openjpeg.xibuild
new file mode 100644
index 0000000..9a20ff7
--- /dev/null
+++ b/repo/media/openjpeg.xibuild
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+NAME="openjpeg"
+DESC="Open-source implementation of JPEG2000 image codec"
+
+MAKEDEPS="cmake "
+DEPS="musl "
+
+PKG_VER=2.4.0
+SOURCE="https://github.com/uclouvain/openjpeg/archive/v$PKG_VER/openjpeg-v$PKG_VER.tar.gz"
+ADDITIONAL="b4700bc09d55ac17ff6bef9b0a867f6de527be17.patch fix-cmakelists.patch "
+
+prepare () {
+ apply_patches
+}
+
+build () {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DBUILD_STATIC_LIBS=OFF
+ cmake --build build
+}
+
+package () {
+ DESTDIR="$PKG_DEST" cmake --install build
+}
diff --git a/repo/media/poppler.xibuild b/repo/media/poppler.xibuild
new file mode 100644
index 0000000..181fc75
--- /dev/null
+++ b/repo/media/poppler.xibuild
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+NAME="poppler"
+DESC="PDF rendering library based on xpdf 3.0"
+
+MAKEDEPS="cmake "
+DEPS="fontconfig freetype2 lcms2 libjpeg-turbo libpng musl openjpeg tiff "
+
+PKG_VER=22.03.0
+SOURCE="https://poppler.freedesktop.org/poppler-$PKG_VER.tar.xz"
+ADDITIONAL="dont-enforce-build-type.patch "
+
+build () {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
+ -DBUILD_QT5_TESTS=OFF \
+ -DENABLE_QT5=OFF \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DENABLE_BOOST=OFF \
+
+ cmake --build build
+}
+
+package () {
+ DESTDIR="$PKG_DEST" cmake --install build
+}
diff --git a/repo/system/json-c.xibuild b/repo/system/json-c.xibuild
new file mode 100644
index 0000000..339e62b
--- /dev/null
+++ b/repo/system/json-c.xibuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+NAME="json-c"
+DESC="A JSON implementation in C"
+
+MAKEDEPS="cmake "
+DEPS="musl "
+
+PKG_VER=0.15
+SOURCE="https://s3.amazonaws.com/json-c_releases/releases/json-c-$PKG_VER.tar.gz"
+
+build () {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DBUILD_STATIC_LIBS=OFF
+ cmake --build build
+}
+
+package () {
+ DESTDIR="$PKG_DEST" cmake --install build
+}
diff --git a/repo/system/json-glib.xibuild b/repo/system/json-glib.xibuild
new file mode 100644
index 0000000..ce9f0b5
--- /dev/null
+++ b/repo/system/json-glib.xibuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+NAME="json-glib"
+DESC="JSON library built on GLib"
+
+MAKEDEPS="meson ninja "
+DEPS="glib musl "
+
+PKG_VER=1.6.6
+SOURCE="https://download.gnome.org/sources/json-glib/${PKG_VER%.*}/json-glib-$PKG_VER.tar.xz"
+
+build () {
+ mkdir build &&
+ cd build &&
+ meson --prefix=/usr \
+ -Dgtk_doc=disabled \
+ .. &&
+ ninja
+}
+
+package () {
+ DESTDIR=$PKG_DEST ninja install
+}
diff --git a/repo/util/iftop.xibuild b/repo/util/iftop.xibuild
new file mode 100644
index 0000000..aade527
--- /dev/null
+++ b/repo/util/iftop.xibuild
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+NAME="iftop"
+DESC="A tool to display bandwidth usage on an interface"
+
+MAKEDEPS="make "
+DEPS="libpcap musl "
+
+PKG_VER=0.17
+SOURCE="https://www.ex-parrot.com/~pdw/iftop/download/iftop-$PKG_VER.tar.gz"
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/util/iwd.xibuild b/repo/util/iwd.xibuild
new file mode 100644
index 0000000..05e10ee
--- /dev/null
+++ b/repo/util/iwd.xibuild
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+NAME="iwd"
+DESC="Internet Wireless Daemon"
+
+MAKEDEPS="make "
+DEPS="dbus musl readline "
+
+PKG_VER=1.27
+SOURCE="https://mirrors.edge.kernel.org/pub/linux/network/wireless/iwd-$PKG_VER.tar.gz"
+ADDITIONAL="iwd.initd iwd.confd main.conf"
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static \
+ --disable-systemd-service \
+ --enable-wired \
+ --enable-tools
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+ install -m750 -d "$PKG_DEST"/var/lib/iwd
+
+ install -m644 -D main.conf "$PKG_DEST"/etc/iwd/main.conf
+
+ install -m755 -D iwd.initd "$PKG_DEST"/etc/init.d/iwd
+ install -m644 -D iwd.confd "$PKG_DEST"/etc/conf.d/iwd
+
+}
diff --git a/repo/util/tmux.xibuild b/repo/util/tmux.xibuild
new file mode 100644
index 0000000..bbb42e1
--- /dev/null
+++ b/repo/util/tmux.xibuild
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+NAME="tmux"
+DESC="Tool to control multiple terminals from a single terminal"
+
+MAKEDEPS="make "
+DEPS="libevent musl ncurses "
+
+PKG_VER=3.2a
+SOURCE="https://github.com/tmux/tmux/releases/download/$PKG_VER/tmux-$PKG_VER.tar.gz"
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+
+ install -D -m644 example_tmux.conf \
+ "$PKG_DEST"/usr/share/doc/tmux/examples/tmux.conf
+
+ for file in CHANGES README; do
+ install -m644 "$file" "$PKG_DEST"/usr/share/doc/tmux/
+ done
+
+}
diff --git a/repo/x11/slock.xibuild b/repo/x11/slock.xibuild
new file mode 100644
index 0000000..596cdcf
--- /dev/null
+++ b/repo/x11/slock.xibuild
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+NAME="slock"
+DESC="simple X display locker utility"
+
+MAKEDEPS="make "
+DEPS="libx11 "
+
+PKG_VER=master
+SOURCE="https://git.suckless.org/slock"
+
+build () {
+ make PREFIX=/usr
+}
+
+package () {
+ make PREFIX=/usr DESTDIR=$PKG_DEST install
+}
diff --git a/repo/x11/xclip.xibuild b/repo/x11/xclip.xibuild
new file mode 100644
index 0000000..28de291
--- /dev/null
+++ b/repo/x11/xclip.xibuild
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+NAME="xclip"
+DESC="Command line interface to the X11 clipboard"
+
+MAKEDEPS="make "
+DEPS="libx11 musl libxmu "
+
+PKG_VER=0.13
+SOURCE="https://github.com/astrand/xclip/archive/$PKG_VER.tar.gz"
+
+prepare () {
+ autoreconf -vif
+}
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/repo/x11/xsel.xibuild b/repo/x11/xsel.xibuild
new file mode 100644
index 0000000..ee59b5b
--- /dev/null
+++ b/repo/x11/xsel.xibuild
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+NAME="xsel"
+DESC="Command-line program for manipulating the X selection"
+
+MAKEDEPS="make "
+DEPS="libx11 "
+
+PKG_VER=1.2.0_git20190821
+git_rev=ef01f3c72a195dbce682184c842b81b17d7d7ad1
+SOURCE="https://github.com/kfish/xsel/archive/$git_rev/xsel-$git_rev.tar.gz"
+
+prepare () {
+ autoreconf -fi
+}
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/skip/firefox.xibuild b/skip/firefox.xibuild
new file mode 100644
index 0000000..e20f193
--- /dev/null
+++ b/skip/firefox.xibuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+NAME="firefox"
+DESC="Firefox web browser"
+
+MAKEDEPS="make rustc cbindgen wasi-sdk"
+DEPS="alsa-lib atk cairo dbus ffmpeg fontconfig freetype2 gdk-pixbuf glib gtk3 icu libevent libffi libpng libvpx libwebp libx11 libxcb libxcomposite libxdamage libxext libxfixes libxrandr musl nspr nss pango pixman zlib "
+
+PKG_VER=99.0.1
+releasedate=2022-04-12
+
+SOURCE="https://ftp.mozilla.org/pub/firefox/releases/$PKG_VER/source/firefox-$PKG_VER.source.tar.xz"
+ADDITIONAL="stab.h sandbox-sched_setscheduler.patch sandbox-largefile.patch sandbox-fork.patch mallinfo.patch fix-webrtc-glibcisms.patch fix-rust-target.patch fix-fortify-system-wrappers.patch firefox-safe.desktop disable-neon-in-aom.patch disable-moz-stackwalk.patch avoid-redefinition.patch allow-custom-rust-vendor.patch "
+
+prepare () {
+ apply_patches
+
+ cp stab.h toolkit/crashreporter/google-breakpad/src/
+
+ sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/audio_thread_priority/.cargo-checksum.json
+ sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/target-lexicon-0.9.0/.cargo-checksum.json
+}
+
+build () {
+ mkdir -p objdir
+ cd objdir
+ export SHELL=/bin/sh
+ export BUILD_OFFICIAL=1
+ export MOZILLA_OFFICIAL=1
+ export USE_SHORT_LIBNAME=1
+ export MACH_USE_SYSTEM_PYTHON=1
+ export MOZBUILD_STATE_PATH=$BUILD_ROOT/mozbuild
+ # disable desktop notifications
+ export MOZ_NOSPAM=1
+ # Find our triplet JSON
+ export RUST_TARGET="x86_64-unknown-linux-musl"
+ # Build with Clang, takes less RAM
+ export CC="clang"
+ export CXX="clang++"
+
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/firefox"
+ ../mach configure \
+ --prefix=/usr \
+ --disable-elf-hack \
+ --enable-rust-simd \
+ --enable-sandbox \
+ \
+ --disable-cargo-incremental \
+ --disable-crashreporter \
+ --disable-install-strip \
+ --disable-jemalloc \
+ --disable-minify \
+ --disable-profiling \
+ --disable-strip \
+ --disable-tests \
+ --disable-updater \
+ \
+ --enable-alsa \
+ --enable-dbus \
+ --enable-default-toolkit=cairo-gtk3-wayland \
+ --enable-dom-streams \
+ --enable-ffmpeg \
+ --enable-hardening \
+ --enable-linker=lld \
+ --enable-necko-wifi \
+ --enable-official-branding \
+ --enable-optimize="$CFLAGS -O2" \
+ --enable-pulseaudio \
+ --enable-release \
+ --enable-system-ffi \
+ --enable-system-pixman \
+ \
+ --with-distribution-id=xilinux \
+ --with-libclang-path=/usr/lib \
+ --with-system-ffi \
+ --with-system-icu \
+ --with-system-jpeg \
+ --with-system-libevent \
+ --with-system-libvpx \
+ --with-system-nspr \
+ --with-system-nss \
+ --with-system-pixman \
+ --with-system-png \
+ --with-system-webp \
+ --with-system-zlib \
+ --with-unsigned-addon-scopes=app,system \
+ --with-wasi-sysroot=/usr/share/wasi-sysroot
+ ../mach build
+}
+
+package () {
+
+ DESTDIR="$PKG_DEST" MOZ_MAKE_FLAGS="$MAKEOPTS" ../mach install
+
+ install -m755 -d "$PKG_DEST"/usr/share/applications
+ install -m755 -d "$PKG_DEST"/usr/share/pixmaps
+
+ local _png
+ for _png in ../browser/branding/official/default*.png; do
+ local i=${_png%.png}
+ i=${i##*/default}
+ install -D -m644 "$_png" "$PKG_DEST"/usr/share/icons/hicolor/"$i"x"$i"/apps/firefox.png
+ done
+
+ install -m644 ../browser/branding/official/default48.png \
+ "$PKG_DEST"/usr/share/pixmaps/firefox.png
+ install -m644 ../firefox.desktop "$PKG_DEST"/usr/share/applications/org.mozilla.firefox.desktop
+ install -m644 ../firefox-safe.desktop "$PKG_DEST"/usr/share/applications/org.mozilla.firefox-safe.desktop
+
+ # Add StartupWMClass=firefox on the .desktop files so Desktop Environments
+ # correctly associate the window with their icon, the correct fix is to have
+ # firefox sets its own AppID but this will work for the meantime
+ # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1607399
+ echo "StartupWMClass=firefox" >> $PKG_DEST/usr/share/applications/org.mozilla.firefox.desktop
+ echo "StartupWMClass=firefox" >> $PKG_DEST/usr/share/applications/org.mozilla.firefox-safe.desktop
+
+ # install our vendor prefs
+ install -d $PKG_DEST/usr/lib/firefox/browser/defaults/preferences
+
+ cat >> $PKG_DEST/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js <<- EOF
+ // Use LANG environment variable to choose locale
+ pref("intl.locale.requested", "");
+
+ // Disable default browser checking.
+ pref("browser.shell.checkDefaultBrowser", false);
+
+ // Don't disable our bundled extensions in the application directory
+ pref("extensions.autoDisableScopes", 11);
+ pref("extensions.shownSelectionUI", true);
+ EOF
+
+ # Generate appdata file
+ mkdir "$PKG_DEST"/usr/share/metainfo/
+ export VERSION="$PKG_VER"
+ export DATE="$releasedate"
+ envsubst < "$builddir"/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in > "$PKG_DEST"/usr/share/metainfo/org.mozilla.firefox.appdata.xml
+
+}
diff --git a/skip/gegl.xibuild b/skip/gegl.xibuild
new file mode 100644
index 0000000..612d2cd
--- /dev/null
+++ b/skip/gegl.xibuild
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+NAME="gegl"
+DESC="Graph based image processing framework"
+
+MAKEDEPS="meson ninja graphviz"
+DEPS="babl cairo ffmpeg4 gdk-pixbuf glib json-glib lcms2 intltool libjpeg-turbo libpng libraw librsvg libwebp musl pango tiff libexecinfo"
+
+PKG_VER=0.4.36
+SOURCE="https://download.gimp.org/pub/gegl/${PKG_VER%.*}/gegl-${PKG_VER}.tar.xz"
+
+build () {
+ mkdir build &&
+ cd build &&
+ meson --prefix=/usr \
+ .. &&
+ ninja
+}
+
+package () {
+ DESTDIR=$PKG_DEST ninja install
+}
diff --git a/skip/gimp.xibuild b/skip/gimp.xibuild
new file mode 100644
index 0000000..536fc2e
--- /dev/null
+++ b/skip/gimp.xibuild
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+NAME="gimp"
+DESC="GNU Image Manipulation Program"
+
+MAKEDEPS="make "
+DEPS="babl cairo fontconfig freetype2 gdk-pixbuf gexiv2 glib gtk2 harfbuzz json-glib lcms2 bzip2 libexecinfo intltool libjpeg-turbo libmypaint libpng librsvg libwebp libx11 libxext libxfixes libxmu libxpm musl pango poppler gegl tiff xz zlib python"
+
+PKG_VER=2.10.30
+SOURCE="https://download.gimp.org/pub/gimp/v${PKG_VER%.*}/gimp-$PKG_VER.tar.bz2"
+
+build () {
+ ./configure \
+ --disable-dependency-tracking \
+ --sysconfdir=/etc \
+ --enable-mp \
+ --enable-gimp-console \
+ --disable-python \
+ --without-aa \
+ --disable-check-update
+
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
diff --git a/skip/librsvg.xibuild b/skip/librsvg.xibuild
new file mode 100644
index 0000000..3840b69
--- /dev/null
+++ b/skip/librsvg.xibuild
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+NAME="librsvg"
+DESC="SAX-based renderer for SVG files into a GdkPixbuf"
+
+MAKEDEPS="make cargo rustc "
+DEPS="cairo gdk-pixbuf glib libxml2 musl pango "
+
+PKG_VER=2.54.1
+SOURCE="https://download.gnome.org/sources/librsvg/${PKG_VER%.*}/librsvg-$PKG_VER.tar.xz"
+ADDITIONAL="target.patch"
+
+prepare () {
+ apply_patches
+}
+
+
+build () {
+ # Use LTO
+ #export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
+#
+ ## Use debug
+ #export CARGO_PROFILE_RELEASE_DEBUG=2
+ export CC="clang"
+ export CXX="clang++"
+ export LD="clang"
+
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/lib/librsvg \
+ --disable-static \
+ --enable-vala
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
+
+ make
+
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+}
+
+postinstall () {
+ gdk-pixbuf-query-loaders --update-cache
+}
diff --git a/skip/wasi-compiler-rt.xibuild b/skip/wasi-compiler-rt.xibuild
new file mode 100644
index 0000000..c3959dd
--- /dev/null
+++ b/skip/wasi-compiler-rt.xibuild
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+NAME="wasi-compiler-rt"
+DESC="WASI LLVM compiler runtime"
+
+MAKEDEPS="cmake "
+DEPS="musl "
+
+PKG_VER=13.0.1
+wasi_sdk_ver=14
+
+SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz"
+ADDITIONAL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz"
+
+prepare () {
+ tar xf compiler-rt-$PKG_VER.src.tar.xz
+ mkdir -p wasi-compiler-rt
+ mv compiler-rt-$PKG_VER.src wasi-compiler-rt/compiler-rt
+ mv wasi-sdk.cmake wasi-compiler-rt
+ mv cmake wasi-compiler-rt
+
+}
+
+build () {
+ cd wasi-compiler-rt
+ mkdir build
+ cmake -B build \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_MODULE_PATH=$BUILD_ROOT/wasi-compiler-rt/cmake \
+ -DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/wasi-compiler-rt/wasi-sdk.cmake \
+ -DCMAKE_C_COMPILER_WORKS=ON \
+ -DCOMPILER_RT_BAREMETAL_BUILD=ON \
+ -DCOMPILER_RT_INCLUDE_TESTS=OFF \
+ -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
+ -DCOMPILER_RT_OS_DIR=wasi \
+ -DWASI_SDK_PREFIX=/usr \
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$PKG_VER/ \
+ compiler-rt/lib/builtins
+ cmake --build build
+}
+
+package () {
+ DESTDIR="$PKG_DEST" cmake --install build
+}
diff --git a/skip/wasi-libc.xibuild b/skip/wasi-libc.xibuild
new file mode 100644
index 0000000..a314eb9
--- /dev/null
+++ b/skip/wasi-libc.xibuild
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+NAME="wasi-libc"
+DESC="WASI libc implementation for WebAssembly"
+
+MAKEDEPS="cmake "
+DEPS="musl "
+
+PKG_VER=13.0.1
+PKG_VER=0_git20220310
+
+BRANCH=079adff840032c3455eb1cb34dc9ceaa0b2bfc0c
+SOURCE="ssh://github.com/WebAssembly/wasi-libc"
+
+build () {
+ make WASM_CC=/usr/bin/clang
+}
+
+package () {
+ make INSTALL_DIR=$PKG_DEST/usr/share/wasi-sysroot install
+}
diff --git a/skip/wasi-libcxx.xibuild b/skip/wasi-libcxx.xibuild
new file mode 100644
index 0000000..1425877
--- /dev/null
+++ b/skip/wasi-libcxx.xibuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+NAME="wasi-libcxx"
+DESC="WASI LLVM C++ standard library"
+
+MAKEDEPS="cmake "
+DEPS="musl "
+
+PKG_VER=13.0.1
+wasi_sdk_ver=14
+
+SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz"
+ADDITIONAL="
+https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxx-$PKG_VER.src.tar.xz
+https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxxabi-$PKG_VER.src.tar.xz
+https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/llvm-$PKG_VER.src.tar.xz
+"
+
+builddir="$BUILD_ROOT/wasi-libcxx"
+
+prepare () {
+ mkdir -p $builddir/
+
+ for s in libcxx libcxxabi llvm; do
+ tar xf $s-$PKG_VER.src.tar.xz
+ mv $s-$PKG_VER.src $builddir/$s
+ done
+
+ mv wasi-sdk.cmake "$builddir"
+ mv cmake "$builddir"
+}
+
+build () {
+ export CC="clang"
+ export CXX="clang++"
+ export CFLAGS="$CFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot"
+ export CXXFLAGS="$CXXFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot"
+
+ cd $builddir
+ cmake -B build-libcxx -G Ninja \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_MODULE_PATH="$builddir"/cmake \
+ -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \
+ -DCMAKE_C_COMPILER_WORKS=ON \
+ -DCMAKE_CXX_COMPILER_WORKS=ON \
+ -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \
+ -DLIBCXX_INCLUDE_TESTS=ON \
+ -DLIBCXX_ENABLE_EXCEPTIONS=OFF \
+ -DLIBCXX_ENABLE_SHARED=OFF \
+ -DLIBCXX_ENABLE_THREADS=OFF \
+ -DLIBCXX_HAS_PTHREAD_API=OFF \
+ -DLIBCXX_HAS_EXTERNAL_THREAD_API=OFF \
+ -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \
+ -DLIBCXX_HAS_WIN32_THREAD_API=OFF \
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
+ -DLIBCXX_ENABLE_FILESYSTEM=OFF \
+ -DLIBCXX_CXX_ABI=libcxxabi \
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=libcxxabi/include \
+ -DLIBCXX_HAS_MUSL_LIBC=ON \
+ -DLIBCXX_ABI_VERSION=2 \
+ -DWASI_SDK_PREFIX=/usr \
+ -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi \
+ libcxx
+
+ cmake -B build-libcxxabi -G Ninja \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_MODULE_PATH="$builddir"/cmake \
+ -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \
+ -DCMAKE_C_COMPILER_WORKS=ON \
+ -DCMAKE_CXX_COMPILER_WORKS=ON \
+ -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \
+ -DLIBCXXABI_INCLUDE_TESTS=ON \
+ -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \
+ -DLIBCXXABI_ENABLE_SHARED=OFF \
+ -DLIBCXXABI_ENABLE_THREADS=OFF \
+ -DLIBCXXABI_HAS_PTHREAD_API=OFF \
+ -DLIBCXXABI_HAS_EXTERNAL_THREAD_API=OFF \
+ -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \
+ -DLIBCXXABI_HAS_WIN32_THREAD_API=OFF \
+ -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \
+ -DLIBCXXABI_ENABLE_PIC=OFF \
+ -DUNIX=ON \
+ -DCXX_SUPPORTS_CXX11=ON \
+ -DLIBCXXABI_LIBCXX_PATH=libcxx \
+ -DLIBCXXABI_LIBCXX_INCLUDES="$builddir"/build-libcxx/include/c++/v1 \
+ -DWASI_SDK_PREFIX=/usr \
+ -DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi \
+ libcxxabi
+
+ cmake --build build-libcxx
+ cmake --build build-libcxxabi
+
+}
+
+package () {
+ DESTDIR="$PKG_DEST" cmake --install build-libcxx
+ DESTDIR="$PKG_DEST" cmake --install build-libcxxabi
+}
diff --git a/skip/wasi-sdk.xibuild b/skip/wasi-sdk.xibuild
new file mode 100644
index 0000000..0cd76f9
--- /dev/null
+++ b/skip/wasi-sdk.xibuild
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+NAME="wasi-sdk"
+DESC="WASI-enabled WebAssembly C/C++ toolchain"
+
+MAKEDEPS="cmake "
+DEPS="wasi-compiler-rt wasi-libc wasi-libcxx"
+
+PKG_VER=14.0
+
+package () {
+ mkdir $PKG_DEST
+}