From 2c14e75f27bc01844a0f68cb891f85d790154dd0 Mon Sep 17 00:00:00 2001
From: znley <shanjiantao@loongson.cn>
Date: Thu, 30 May 2024 02:57:33 +0000
Subject: [PATCH] community/connman-resolvconf: update rust libc to support
 loongarch64

---
 community/connman-resolvconf/APKBUILD            |  7 +++++--
 .../connman-resolvconf/update-rust-libc.patch    | 16 ++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 community/connman-resolvconf/update-rust-libc.patch

diff --git a/community/connman-resolvconf/APKBUILD b/community/connman-resolvconf/APKBUILD
index bd581ea5b07a..a819109c3db7 100644
--- a/community/connman-resolvconf/APKBUILD
+++ b/community/connman-resolvconf/APKBUILD
@@ -5,7 +5,7 @@ pkgver=0.2.0
 pkgrel=2
 pkgdesc="ConnMan integration with resolvconf(8)"
 url="https://github.com/jirutka/connman-resolvconf"
-arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # blocked by rust/cargo
+arch="aarch64 armhf armv7 ppc64le x86 x86_64 loongarch64"  # blocked by rust/cargo
 license="MIT"
 depends="
 	cmd:resolvconf
@@ -14,7 +14,9 @@ depends="
 	"
 makedepends="cargo dbus-dev cargo-auditable"
 subpackages="$pkgname-openrc"
-source="https://github.com/jirutka/connman-resolvconf/archive/v$pkgver/connman-resolvconf-$pkgver.tar.gz"
+source="https://github.com/jirutka/connman-resolvconf/archive/v$pkgver/connman-resolvconf-$pkgver.tar.gz
+	update-rust-libc.patch
+	"
 options="!check"  # no tests provided
 
 
@@ -36,4 +38,5 @@ package() {
 
 sha512sums="
 66addbf52084ca2c46a13e57d10d9acd2a10e39e166bc910d8910cc44ddaf734aff2f8cbf393eb7e4e26c9733364ced1199384b69a69b79e3491e72f4f327ccc  connman-resolvconf-0.2.0.tar.gz
+20e316bce67c77b3f064a8d3f6a8494fa868902ae0fdbc7e2daafdc76aa088aba756ebd26ba124722f920188c2fcbfde7f14dc4eb5dc6d96d86ac303384ed432  update-rust-libc.patch
 "
diff --git a/community/connman-resolvconf/update-rust-libc.patch b/community/connman-resolvconf/update-rust-libc.patch
new file mode 100644
index 000000000000..14f86cbc1871
--- /dev/null
+++ b/community/connman-resolvconf/update-rust-libc.patch
@@ -0,0 +1,16 @@
+diff --git a/Cargo.lock b/Cargo.lock
+index 4e0dad4..df16e98 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -88,9 +88,9 @@ checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
+ 
+ [[package]]
+ name = "libc"
+-version = "0.2.126"
++version = "0.2.155"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
++checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
+ 
+ [[package]]
+ name = "libdbus-sys"
-- 
GitLab