Skip to contentSkip to conversation

pkg-config: use the correct replacements for libdir/includedir

PATCH Superseded Eli Schwartz 2 participants 5 messages Apr 19, 2020 – Apr 27, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-config: use the correct replacements for libdir/includedir

They are defined pkg-config variables for a reason, let's reuse them as is the intended usage of pkg-config. This ensures various pkg-config features continue to work as expected.

---
 libtirpc.pc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libtirpc.pc.in +1 -1
index 38034c5..863950f 100644
@@ -9,4 +9,4 @@ Requires:
 Version: @PACKAGE_VERSION@
 Libs: -L@libdir@ -ltirpc
 Libs.private: -lpthread
-Cflags: -I@includedir@/tirpc
+Cflags: -I${includedir}/tirpc
Signature · 1 line
2.26.0
#1 lore raw

Hello,

Quoted 3 lines · Eli Schwartz

They are defined pkg-config variables for a reason, let's reuse them as is the intended usage of pkg-config. This ensures various pkg-config features continue to work as expected.

Just curious... What pkg-config feature does this fix?

steved.

Quoted 17 lines
---
 libtirpc.pc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libtirpc.pc.in +1 -1
index 38034c5..863950f 100644
@@ -9,4 +9,4 @@ Requires:
 Version: @PACKAGE_VERSION@
 Libs: -L@libdir@ -ltirpc
 Libs.private: -lpthread
-Cflags: -I@includedir@/tirpc
+Cflags: -I${includedir}/tirpc
#2 lore raw
Quoted 7 lines · Steve Dickson

Hello,

Quoted 3 lines · Eli Schwartz

They are defined pkg-config variables for a reason, let's reuse them as is the intended usage of pkg-config. This ensures various pkg-config features continue to work as expected.

Just curious... What pkg-config feature does this fix?

--define-variable might be used to remap paths.

But I see I forgot to git add -p all changes. :(

Signature · 2 lines
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
#3 lore raw

PATCH v2 1/1 pkg-config: use the correct replacements for libdir/includedir

In reply to Eli Schwartz

They are defined pkg-config variables for a reason, let's reuse them as is the intended usage of pkg-config. This ensures various pkg-config features continue to work as expected.

---

v2: forgot the Libs change

 libtirpc.pc.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
libtirpc.pc.in +2 -2
index 38034c5..d2c7878 100644
@@ -7,6 +7,6 @@ Name: libtirpc
 Description: Transport Independent RPC Library
 Requires:
 Version: @PACKAGE_VERSION@
-Libs: -L@libdir@ -ltirpc
+Libs: -L${libdir} -ltirpc
 Libs.private: -lpthread
-Cflags: -I@includedir@/tirpc
+Cflags: -I${includedir}/tirpc
Signature · 1 line
2.26.1
#4 lore raw
Quoted 5 lines · Eli Schwartz

They are defined pkg-config variables for a reason, let's reuse them as is the intended usage of pkg-config. This ensures various pkg-config features continue to work as expected.

Committed... (tag: libtirpc-1-2-7-rc1)

steved.

Quoted 21 lines

---

v2: forgot the Libs change

 libtirpc.pc.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
libtirpc.pc.in +2 -2
index 38034c5..d2c7878 100644
@@ -7,6 +7,6 @@ Name: libtirpc
 Description: Transport Independent RPC Library
 Requires:
 Version: @PACKAGE_VERSION@
-Libs: -L@libdir@ -ltirpc
+Libs: -L${libdir} -ltirpc
 Libs.private: -lpthread
-Cflags: -I@includedir@/tirpc
+Cflags: -I${includedir}/tirpc