Bug 3093 - [PENDING] re-add PKG_CONFIG_LIBDIR
[PENDING] re-add PKG_CONFIG_LIBDIR
Status: RESOLVED FIXED
Product: pkg-config
Classification: Unclassified
Component: src
unspecified
All NetBSD
: high normal
Assigned To: Tollef Fog Heen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-21 11:11 UTC by Jeremy C. Reed
Modified: 2005-06-26 20:59 UTC (History)
0 users

See Also:


Attachments
Patch is same as in bug report. (686 bytes, patch)
2005-04-21 11:12 UTC, Jeremy C. Reed
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy C. Reed 2005-04-21 11:11:08 UTC
The man page documents PKG_CONFIG_LIBDIR: "Replaces the default pkg-config search
directory."

If you set PKG_CONFIG_PATH it will also default directory too (as documented).

But in some cases, the default pkg-config directory should not be looked at.

I am a maintainer for the Pkgsrc package build system. We only want our packages
to build using the pkg-config files that we specifically choose. We don't want
our packages to build based on what is detected using the default pkg-config
path.

Please consider the following patch so when PKG_CONFIG_LIBDIR is set, use it;
otherwise PKG_CONFIG_PATH and default directories are used.

$NetBSD: patch-aa,v 1.5 2005/04/21 08:22:32 xtraeme Exp $

--- main.c.orig2005-04-21 10:11:45.000000000 +0200
+++ main.c2005-04-21 10:12:43.000000000 +0200
@@ -278,13 +278,17 @@
       debug_spew ("PKG_CONFIG_DEBUG_SPEW variable enabling debug spew\n");
     }
 
-  search_path = getenv ("PKG_CONFIG_PATH");
+  search_path = getenv("PKG_CONFIG_LIBDIR");
+
+  if (search_path)
+add_search_dirs(search_path, G_SEARCHPATH_SEPARATOR_S);
+  else {
+search_path = getenv("PKG_CONFIG_PATH");
   if (search_path) 
-    {
       add_search_dirs(search_path, G_SEARCHPATH_SEPARATOR_S);
-    }
 
   add_search_dirs(PKG_CONFIG_PC_PATH, G_SEARCHPATH_SEPARATOR_S);
+  }
 
 #ifdef G_OS_WIN32
   {
Comment 1 Jeremy C. Reed 2005-04-21 11:12:07 UTC
Created attachment 2497 [details] [review]
Patch is same as in bug report.
Comment 2 Tollef Fog Heen 2005-04-21 17:19:58 UTC
Patch is in CVS now, thanks.
Comment 3 Tollef Fog Heen 2005-06-27 13:59:45 UTC
pkg-config 0.18 has now been released with a fix for this bug.