From 5d0c9c08ee64fce40ef2db47266eb2e7a51371be Mon Sep 17 00:00:00 2001
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sun, 19 Sep 2021 17:14:44 +0200
Subject: [PATCH] community/basu: backport patch to link basuctl with libbasu
 dynamically

https://git.sr.ht/~emersion/basu/commit/34471140993750d4af0da3f8feef77801276db36
---
 community/basu/APKBUILD                       |  4 ++-
 ...ink-basuctl-with-libbasu-dynamically.patch | 30 +++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 community/basu/link-basuctl-with-libbasu-dynamically.patch

diff --git a/community/basu/APKBUILD b/community/basu/APKBUILD
index db2f1f7308e9..b5e35d6680ce 100644
--- a/community/basu/APKBUILD
+++ b/community/basu/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Michał Polański <michal@polanski.me>
 pkgname=basu
 pkgver=0.2.0
-pkgrel=0
+pkgrel=1
 pkgdesc="The sd-bus library, extracted from systemd"
 url="https://sr.ht/~emersion/basu/"
 license="LGPL-2.1-or-later"
@@ -12,6 +12,7 @@ subpackages="$pkgname-static $pkgname-dev"
 # NOTE: Switch to new upstream repo at sr.ht as soon as release tags are available there.
 source="https://github.com/emersion/basu/archive/v$pkgver/basu-$pkgver.tar.gz
 	allow-both-shared-and-static-lib.patch
+	link-basuctl-with-libbasu-dynamically.patch
 	"
 
 build() {
@@ -33,4 +34,5 @@ package() {
 sha512sums="
 dbc2f72b6e1a880fa41fe6067a38a301f456e4305dae6eb4d465089d7d9c2f629677ba23752b3e1a1fd476cb440db01ef3a218c1c976f38d0058eed584c80165  basu-0.2.0.tar.gz
 ce3edb36ec08012deeab1616a1df20f0bcbb7157a0b544b188ee1ccbe0f2cbcff8dd23b7f36bc1f75c993ff8409bd57d9bbe3bde1f4ba575b669bbe085f97cb3  allow-both-shared-and-static-lib.patch
+172c6e519fcee29edff010423487a93f4e7e144836bf0d1e92181b5518e6a1c4e477f5d971e7cf93314b69d33674a5ae69cd963f0dd876496c34dd1fb0047020  link-basuctl-with-libbasu-dynamically.patch
 "
diff --git a/community/basu/link-basuctl-with-libbasu-dynamically.patch b/community/basu/link-basuctl-with-libbasu-dynamically.patch
new file mode 100644
index 000000000000..113b6bde983a
--- /dev/null
+++ b/community/basu/link-basuctl-with-libbasu-dynamically.patch
@@ -0,0 +1,30 @@
+From 34471140993750d4af0da3f8feef77801276db36 Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Fri, 17 Sep 2021 22:36:55 +0200
+Subject: [PATCH] meson: Link basuctl with libbasu dynamically
+
+This reduces the installed size significantly. I don't know about any
+reason for bundling libbasu in basuctl when they both come from the
+same package.
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Patch-Source: https://git.sr.ht/~emersion/basu/commit/34471140993750d4af0da3f8feef77801276db36
+
+diff --git a/meson.build b/meson.build
+index 121c0b9..056c7c4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -330,7 +330,7 @@ exe = executable('basuctl',
+                  'src/busctl/busctl-introspect.h',
+                  include_directories : includes,
+                  link_with : [libbasic,
+-                              libsystemd_static],
++                              libsystemd],
+                  install : true)
+ 
+ meson.override_dependency('basu', declare_dependency(
+-- 
+2.32.0
+
-- 
GitLab