From 292977e60962b71bf5217ed924c13c27077d14e8 Mon Sep 17 00:00:00 2001 From: Alexey Sheplyakov Date: Aug 16 2021 07:01:57 +0000 Subject: libnewt.pc: added data for static linking With this patch I can statically link a binary with libnewt without listing the required libraries manually: gcc -o test_static test.c `pkg-config --libs --cflags --static libnewt` Without this patch static linking fails due to multiple undefined references: /usr/bin/ld: /tmp/test.AcRBJp.ltrans0.ltrans.o: in function `buttonDrawIt': :(.text+0x2f0): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x307): undefined reference to `SLtt_Use_Ansi_Colors' /usr/bin/ld: :(.text+0x31b): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x338): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x341): undefined reference to `SLsmg_write_string' /usr/bin/ld: :(.text+0x34b): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x3ae): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x3cd): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x3d5): undefined reference to `SLsmg_write_string' /usr/bin/ld: :(.text+0x3df): undefined reference to `SLsmg_write_char' /usr/bin/ld: :(.text+0x3f9): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x422): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x45d): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x476): undefined reference to `SLsmg_set_color' /usr/bin/ld: :(.text+0x486): undefined reference to `SLsmg_set_color' /usr/bin/ld: /tmp/test.AcRBJp.ltrans0.ltrans.o::(.text+0x4d6): more undefined references to `SLsmg_set_color' follow [287 lines skipped] collect2: error: ld returned 1 exit status Closes: #17 --- diff --git a/libnewt.pc.in b/libnewt.pc.in index 89dc934..7a99e16 100644 --- a/libnewt.pc.in +++ b/libnewt.pc.in @@ -8,3 +8,4 @@ Description: A development library for text mode user interfaces Version: @VERSION@ Libs: -L${libdir} -lnewt Cflags: -I${includedir} +Requires.private: slang