Package: pkgconfig-common

# Bump %v whenever changing the path-list or wrapper functionality.
# Cascade update to all reverse-builddepends and rev-up there. Those
# packages embed copies of these data/files rather than runtime
# loading or linking of the master files here so that they are
# deterministic at each of their %v-%r.
# Also keep in sync with Fink/VirtPackage.pm
Version: 3
Revision: 1

Type: nosource
PatchFile: %n.patch
PatchFile-MD5: 0f27a05ac6c0fa2c6e79224648c1ae2f
PatchScript: <<
	sed 's,@PREFIX@,%p,g' < %{PatchFile} | patch -p1
	perl -e '$paths = join ":", map { ("$_/lib/pkgconfig", "$_/share/pkgconfig") } qw ( %p /opt/X11 /usr/X11 /usr ); print $paths, "\n";' > pc-path
<<
CompileScript: #
InstallScript: <<
	mkdir -p %i/share/%n
	install -m 644 pc-path %i/share/%n
	install -m 755 pc-resort %i/share/%n
<<
Description: Default files for pkg-config implementations
DescUsage: <<
%p/share/%n/pc-path contains the default search-paths list for
locating .pc files. Current precedence of .pc searching is:
  1. fink arch-dependent
  2. fink arch-independent
  3. X11 (modern (10.8+) location) arch-dependent
  4. X11 (modern (10.8+) location) arch-independent
  5. X11 (older (10.5-10.7) location) arch-dependent
  6. X11 (older (10.5-10.7) location) arch-independent
  7. system arch-dependent
  8. system arch-independent

%p/share/%n/pc-resort is a script that is used to wrap an actual
pkg-config program. The actual program should be renamed to append
".real" to its filename, and this sript installed at the original
actual program-name instead. This wrapper re-sorts the lists of -I and
-L flags are re-sorted to place all fink paths before any system (/usr
or X11) paths; other paths come first, so env vars can be used to hide
fink altogether or to supercede fink paths with ones from non-default
locations, such as  /usr/local or other prefixes.
<<
License: GPL
Maintainer: Daniel Macks <dmacks@netspace.org>
Homepage: http://pkgconfig.freedesktop.org