File: 11_omit-directories-from-config.patch

package info (click to toggle)
curl 8.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 32,828 kB
  • sloc: ansic: 205,388; perl: 20,194; python: 8,958; sh: 6,764; makefile: 1,617; pascal: 797; cpp: 173
file content (64 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From: Benjamin Moody <benjamin.moody@gmail.com>
Date: Wed, 27 Mar 2024 18:10:56 +0000
Subject: Omit directories embedding arch info from curl-config

In order to (partially) multi-arch-ify curl-config, remove all
mention of @includedir@ and @libdir@ from the script.  On Debian, the actual
header and library directories are architecture-dependent, but will always be
in the C compiler's default search path, so -I and -L options are not
necessary (and may be harmful in multi-arch environments.)

Origin: vendor
Bug-Debian: https://bugs.debian.org/731998
Bug-Debian: https://bugs.debian.org/1075802
Forwarded: not-needed
Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2025-02-05
---
 curl-config.in | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/curl-config.in b/curl-config.in
index 5518416..2eba92e 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -29,8 +29,6 @@ prefix='@prefix@'
 # Used in 'libdir'
 # shellcheck disable=SC2034
 exec_prefix="@exec_prefix@"
-# shellcheck disable=SC2034
-includedir="@includedir@"
 
 usage()
 {
@@ -141,19 +139,11 @@ while test "$#" -gt 0; do
     ;;
 
   --cflags)
-    if test "X@includedir@" = 'X/usr/include'; then
-      echo '@LIBCURL_PC_CFLAGS@'
-    else
-      echo "@LIBCURL_PC_CFLAGS@ -I@includedir@"
-    fi
+    echo '@LIBCURL_PC_CFLAGS@'
     ;;
 
   --libs)
-    if test "X@libdir@" != 'X/usr/lib' -a "X@libdir@" != 'X/usr/lib64'; then
-      curllibdir="-L@libdir@ "
-    else
-      curllibdir=''
-    fi
+    curllibdir=''
     if test 'X@ENABLE_SHARED@' = 'Xno'; then
       echo "${curllibdir}-lcurl @LIBCURL_PC_LIBS_PRIVATE@"
     else
@@ -167,7 +157,7 @@ while test "$#" -gt 0; do
 
   --static-libs)
     if test 'X@ENABLE_STATIC@' != 'Xno'; then
-      echo "@libdir@/libcurl.@libext@ @LIBCURL_PC_LDFLAGS_PRIVATE@ @LIBCURL_PC_LIBS_PRIVATE@"
+      echo -Wl,-Bstatic -lcurl -Wl,-Bdynamic @LIBCURL_PC_LIBS_PRIVATE@
     else
       echo 'curl was built with static libraries disabled' >&2
       exit 1