In order to (partially) multi-arch-ify curl-config, remove all
authorBenjamin Moody <benjamin.moody@gmail.com>
Wed, 27 Mar 2024 18:10:56 +0000 (18:10 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 24 Jan 2025 04:39:00 +0000 (04:39 +0000)
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: 2024-11-06

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.)

Gbp-Pq: Name 11_omit-directories-from-config.patch

curl-config.in

index e89c256392efd782cbb2b0ea08d2b01194268419..7c6a8fec0806eb005c064067f37a42b7735d00aa 100644 (file)
@@ -29,8 +29,6 @@ prefix='@prefix@'
 # Used in 'libdir'
 # shellcheck disable=SC2034
 exec_prefix="@exec_prefix@"
-# shellcheck disable=SC2034
-includedir="@includedir@"
 cppflag_curl_staticlib='@LIBCURL_PC_CFLAGS@'
 
 usage()
@@ -147,19 +145,11 @@ while test "$#" -gt 0; do
     else
       CPPFLAG_CURL_STATICLIB=''
     fi
-    if test "X@includedir@" = 'X/usr/include'; then
-      echo "${CPPFLAG_CURL_STATICLIB}"
-    else
-      echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
-    fi
+    echo "${CPPFLAG_CURL_STATICLIB}"
     ;;
 
   --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
@@ -173,7 +163,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