public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-freedesktop-icons] epel10: Initial import; Fixes: RHBZ2346879
@ 2026-09-25 10:12 Davide Cavalca
  0 siblings, 0 replies; only message in thread
From: Davide Cavalca @ 2026-09-25 10:12 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-freedesktop-icons
Branch : epel10
Commit : 915237f137ec3a1aecc44b3435fc97f765fa72cc
Author : Davide Cavalca <dcavalca@fedoraproject.org>
Date   : 2025-03-03T20:49:38-08:00
Stats  : +151/-0 in 6 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-freedesktop-icons/c/915237f137ec3a1aecc44b3435fc97f765fa72cc?branch=epel10

Log:
Initial import; Fixes: RHBZ2346879

---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2e9a60e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/freedesktop-icons-0.3.1.crate

diff --git a/25.patch b/25.patch
new file mode 100644
index 0000000..57c95cf
--- /dev/null
+++ b/25.patch
@@ -0,0 +1,31 @@
+From 983bf5693f449da080a9837bfbbcd62681546e89 Mon Sep 17 00:00:00 2001
+From: Davide Cavalca <dcavalca@fedoraproject.org>
+Date: Thu, 20 Feb 2025 09:58:55 -0800
+Subject: [PATCH] Fix doc tests
+
+---
+ src/lib.rs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib.rs b/src/lib.rs
+index 5f72649..a0d5bb7 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -68,7 +68,7 @@ mod theme;
+ /// # fn main() {
+ /// use freedesktop_icons::list_themes;
+ ///
+-/// let themes: Vec<&str> = list_themes();
++/// let themes: Vec<String> = list_themes();
+ ///
+ /// assert_eq!(themes, vec![
+ ///     "Adwaita", "Arc", "Breeze Light", "HighContrast", "Papirus", "Papirus-Dark",
+@@ -112,7 +112,7 @@ pub fn list_themes() -> Vec<String> {
+ ///
+ /// let theme = default_theme_gtk();
+ ///
+-/// assert_eq!(Some("Adwaita"), theme);
++/// assert_eq!(Some("Adwaita"), theme.as_deref());
+ /// ```
+ pub fn default_theme_gtk() -> Option<String> {
+     // Calling gsettings is the simplest way to retrieve the default icon theme without adding

diff --git a/freedesktop-icons-fix-metadata.diff b/freedesktop-icons-fix-metadata.diff
new file mode 100644
index 0000000..52d1a09
--- /dev/null
+++ b/freedesktop-icons-fix-metadata.diff
@@ -0,0 +1,12 @@
+--- freedesktop-icons-0.3.1/Cargo.toml	1970-01-01T00:00:01+00:00
++++ freedesktop-icons-0.3.1/Cargo.toml	2025-02-20T18:03:36.411213+00:00
+@@ -60,9 +60,6 @@
+ [dependencies.xdg]
+ version = "2.5.2"
+ 
+-[dev-dependencies.criterion]
+-version = "0.5"
+-
+ [dev-dependencies.gtk4]
+ version = "0.9"
+ 

diff --git a/rust-freedesktop-icons.spec b/rust-freedesktop-icons.spec
new file mode 100644
index 0000000..5480cb1
--- /dev/null
+++ b/rust-freedesktop-icons.spec
@@ -0,0 +1,90 @@
+# Generated by rust2rpm 27
+%bcond check 1
+%global debug_package %{nil}
+
+%global crate freedesktop-icons
+
+Name:           rust-freedesktop-icons
+Version:        0.3.1
+Release:        %autorelease
+Summary:        Freedesktop Icons lookup crate
+
+License:        MIT
+URL:            https://crates.io/crates/freedesktop-icons
+Source:         %{crates_source}
+# Manually created patch for downstream crate metadata changes
+# * Drop unneeded criterion dependency
+Patch:          freedesktop-icons-fix-metadata.diff
+# * Fix doc tests
+Patch2:         https://github.com/oknozor/freedesktop-icons/pull/25.patch
+
+BuildRequires:  cargo-rpm-macros >= 24
+
+%global _description %{expand:
+A Freedesktop Icons lookup crate.}
+
+%description %{_description}
+
+%package        devel
+Summary:        %{summary}
+BuildArch:      noarch
+
+%description    devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files          devel
+%license %{crate_instdir}/LICENSE
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
+
+%package     -n %{name}+default-devel
+Summary:        %{summary}
+BuildArch:      noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files       -n %{name}+default-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package     -n %{name}+local_tests-devel
+Summary:        %{summary}
+BuildArch:      noarch
+
+%description -n %{name}+local_tests-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "local_tests" feature of the "%{crate}" crate.
+
+%files       -n %{name}+local_tests-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+# * Skip broken tests
+%{cargo_test -- -- --exact %{shrink:
+    --skip theme::parse::test::should_get_theme_parents
+    --skip theme::test::should_get_png_first
+    --skip theme::test::should_get_svg_first
+}}
+%endif
+
+%changelog
+%autochangelog

diff --git a/rust2rpm.toml b/rust2rpm.toml
new file mode 100644
index 0000000..5938009
--- /dev/null
+++ b/rust2rpm.toml
@@ -0,0 +1,16 @@
+[package]
+cargo-toml-patch-comments = [
+  "Drop unneeded criterion dependency",
+]
+extra-patches = [
+  { "number" = 2, "file" = "https://github.com/oknozor/freedesktop-icons/pull/25.patch", comments = ["Fix doc tests"] },
+]
+
+[tests]
+skip = [
+  "theme::parse::test::should_get_theme_parents",
+  "theme::test::should_get_png_first",
+  "theme::test::should_get_svg_first",
+]
+skip-exact = true
+comments = ["Skip broken tests"]

diff --git a/sources b/sources
new file mode 100644
index 0000000..39de1fc
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (freedesktop-icons-0.3.1.crate) = 2ccc026a717b0b6aab7f9dc8209e88f7e709996237270b18c4d8e72571ed72a6b57f881cc6080914c96ba787056c1ab98f1e1b952c027b82b7c14837d368b33a

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-25 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 10:12 [rpms/rust-freedesktop-icons] epel10: Initial import; Fixes: RHBZ2346879 Davide Cavalca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox