Bug 3093

Summary: [PENDING] re-add PKG_CONFIG_LIBDIR
Product: pkg-config Reporter: Jeremy C. Reed <reed>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: All   
OS: NetBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch is same as in bug report.

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.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.