1 |
commit: 9d338b39cd9f19977bb47b52bb5e797f2f1563b2 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 11 14:40:09 2021 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 11 14:40:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d338b39 |
7 |
|
8 |
sys-fs/udev: add static link info to libudev.pc |
9 |
|
10 |
Closes: https://bugs.gentoo.org/801325 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-fs/udev/files/249-libudev-static.patch | 26 ++++++++++++++++++++++ |
14 |
.../udev/{udev-249.ebuild => udev-249-r1.ebuild} | 1 + |
15 |
2 files changed, 27 insertions(+) |
16 |
|
17 |
diff --git a/sys-fs/udev/files/249-libudev-static.patch b/sys-fs/udev/files/249-libudev-static.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..73375b716e9 |
20 |
--- /dev/null |
21 |
+++ b/sys-fs/udev/files/249-libudev-static.patch |
22 |
@@ -0,0 +1,26 @@ |
23 |
+From f2c57d4f3805775e0ffdc80ce578eaa737017d31 Mon Sep 17 00:00:00 2001 |
24 |
+From: Mike Gilbert <floppym@g.o> |
25 |
+Date: Fri, 9 Jul 2021 13:05:23 -0400 |
26 |
+Subject: [PATCH] libudev: add "Libs.private: -lrt -pthread" to libudev.pc |
27 |
+ |
28 |
+This resolves a failure when linking cryptsetup.static against libudev.a. |
29 |
+ |
30 |
+``` |
31 |
+libtool: link: x86_64-pc-linux-gnu-gcc -Wall -O2 -pipe -march=amdfam10 -static -O2 -o cryptsetup.static lib/utils_crypt.o lib/utils_loop.o lib/utils_io.o lib/utils_blkid.o src/utils_tools.o src/utils_password.o src/utils_luks2.o src/utils_blockdev.o src/cryptsetup.o -pthread -pthread -Wl,--as-needed ./.libs/libcryptsetup.a -largon2 -lrt -ljson-c -lpopt -luuid -lblkid -lssl -lcrypto -lz -ldl -ldevmapper -lm -lpthread -ludev -pthread |
32 |
+/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib64/libudev.a(src_libsystemd_sd-daemon_sd-daemon.c.o): in function `sd_is_mq': |
33 |
+(.text.sd_is_mq+0x3a): undefined reference to `mq_getattr' |
34 |
+``` |
35 |
+--- |
36 |
+ src/libudev/libudev.pc.in | 1 + |
37 |
+ 1 file changed, 1 insertion(+) |
38 |
+ |
39 |
+diff --git a/src/libudev/libudev.pc.in b/src/libudev/libudev.pc.in |
40 |
+index 89028aaa6bf2..1d6487fa4084 100644 |
41 |
+--- a/src/libudev/libudev.pc.in |
42 |
++++ b/src/libudev/libudev.pc.in |
43 |
+@@ -16,4 +16,5 @@ Name: libudev |
44 |
+ Description: Library to access udev device information |
45 |
+ Version: {{PROJECT_VERSION}} |
46 |
+ Libs: -L${libdir} -ludev |
47 |
++Libs.private: -lrt -pthread |
48 |
+ Cflags: -I${includedir} |
49 |
|
50 |
diff --git a/sys-fs/udev/udev-249.ebuild b/sys-fs/udev/udev-249-r1.ebuild |
51 |
similarity index 99% |
52 |
rename from sys-fs/udev/udev-249.ebuild |
53 |
rename to sys-fs/udev/udev-249-r1.ebuild |
54 |
index d23c86c0aeb..0154e132439 100644 |
55 |
--- a/sys-fs/udev/udev-249.ebuild |
56 |
+++ b/sys-fs/udev/udev-249-r1.ebuild |
57 |
@@ -94,6 +94,7 @@ pkg_setup() { |
58 |
|
59 |
src_prepare() { |
60 |
local PATCHES=( |
61 |
+ "${FILESDIR}/249-libudev-static.patch" |
62 |
) |
63 |
|
64 |
default |