The function recursive_fill_list() is designed to descend lists of
packages, so it only makes sense to use with Requires and
Requires.private. Ensure it to make later code additions simpler.
From what I can tell, these single package variants have never been used
going back to pkg-config-0.4.0. pkg-config always uses the multipackage
versions that loop over the list of supplied packages.
g_win32_get_package_installation_subdirectory() has been deprecated
since GLib 2.18 and in recent (2.31) GLib versions disabled entirely by
default. This patch replaces usage of that function by
g_win32_get_package_installation_directory_of_module() and
g_build_filename(). Use the new functions and rework the code a bit so
it leaks less memory.
g_win32_get_package_installation_directory_of_module() is supported
since GLib 2.16. The minimal GLib version is bumped accordingly.
Freedesktop #45742
Glib's g_shell_parse_argv offers basically a 1:1 replacement for
poptParseArgvString except that you have to free all the elements of
the array explicitly.
Instead of hard-coding /usr/include, we now use the environment variable
PKG_CONFIG_SYSTEM_INCLUDE_PATH, defaulting to the argument of
./configure --with-system-include-path, which in turn defaults to
/usr/include.
Similarly, PKG_CONFIG_SYSTEM_LIBRARY_PATH defaults to /usr/lib or
/usr/lib:/usr/lib64 as appropriate.
(As currently implemented, this causes a behaviour change on Win32 -
the option -I/usr/include will now be filtered out.)
The intended usage is for Debian to configure pkg-config with
--with-system-include-path=/usr/include/$(DEB_HOST_GNU_TYPE):/usr/include
and the corresponding library path, for multiarch support
(<http://bugs.debian.org/482884>).
Based on work by Colin Walters <walters@verbum.org>
We used to call gnome-config, gtk-config, glib-config and so on, which
was useful in the beginning of pkg-config. This hasn't served any
practical purpose in recent years, so drop the support.
* poptparse.c, popthelp.c, poptconfig.c, popt.c, pkg.c, findme.c,
configure.in: Check for malloc.h and use that if it exists.
Apparently this makes Win32 happier. Thanks to Carlo Bramini for
the patch.
* pkg.[ch], main.c, check/check-missing: Don't recurse Requires at
all unless we need to. Add check. Again, thanks to Loïc Minier
for most of the idea and the implementation.
* pkg.[ch], parse.[ch], main.c, check/Makefile.am,
check/check-missing, check/missing-requires-private.pc:
Skip Requires.private unless we need to look at them for cflags.
Add test case. Thanks to Loïc Minier for most of the idea and the
implementation. Debian #475031
* check/check-conflicts, check/conflicts-test.pc: New test,
testing that conflicts work as they should.
* pkg.c (verify_package): Make the conflicts check not only check
package versions, but also package names. This makes conflicts
functional, something they were not before.
* pkg.h, pkg.c (string_list_to_string), pkg-config.1, main.c
(main): Add sysroot support and document same. Triggered by
setting PKG_CONFIG_SYSROOT_DIR in the environment.
2005-10-16 Tollef Fog Heen <tfheen@err.no>
* pkg.c (get_package_quiet): Add get_package_quiet which is just
the same as get_package except it sets warn to false.
* pkg.h: Add prototype for get_package_quiet.
* main.c (main): Add --short-errors flag to suppress most of the
output when a module is not found.
2005-10-01 Tollef Fog Heen <tfheen@err.no>
* pkg.c(scan_dir): Turn backslashes into slashes or
poptParseArgvString() will eat them when ${prefix} has been
expanded in parse_libs(). Thanks to j^ for the patch.
Author: tfheen
Date: 2005-07-15 08:22:55 GMT
2005-07-15 Tollef Fog Heen <tfheen@err.no>
* pkg.c (package_get_var): Make sure to g_strdup all the return
values and not return some values which should not be freed and
some which should. Yay valgrind. Freedesktop #3682
Author: tfheen
Date: 2005-05-21 09:14:47 GMT
2005-05-21 Tollef Fog Heen <tfheen@err.no>
* check/check-libs-private: New test to check for support for
private libraries.
* check/simple.pc (prefix): Add Libs.private header.
* check/Makefile.am (TESTS): Add check-libs-private test
* pkg.h: Adjust function prototypes.
* pkg.c: Add global ignore_private_libs variable.
(scan_dir): Use the correct free function. Stop leaking file
descriptors.
(package_get_l_libs, packages_get_l_libs, package_get_L_libs,
packages_get_L_libs): Stop the recursive silliness and go back to
old behaviour.
(packages_get_all_libs): Adjust parameters to packages_get_*_libs
(enable_private_libs, disable_private_libs): Trivial helper
functions.
* pkg-config.1: Update documentation wrt search path (Debian
#308942), update docs for Libs.private and add the problematic
handling of mixing = and non-= arguments to the bugs section.
* parse.h: Adjust parameters for parse_package_file to get private
libs or not.
* parse.c (trim_and_sub): Fix memory leak.
(_do_parse_libs): New function including what's common between
parse_libs and parse_private_libs.
(parse_libs_private): New function. Handle private libraries.
(parse_line): Add . to the list of valid characters in headers (so
Libs.private works correctly.
(parse_line): Fix memory leaks.
(parse_line): Handle Libs.private.
(parse_package_file): Fix memory leak.
* main.c (main): Fix memory leak.
* NEWS: Document changes to inter-library handling.
* main.c (main): Handle inter-library dependencies old-style, but
do private libraries too. Adjust parameters to
packages_get_*_libs.
* configure.in: Change comment wrt inter-library handling to talk
about private libraries instead.
Author: tfheen
Date: 2005-04-13 15:47:18 GMT
2005-04-13 Tollef Fog Heen <tfheen@err.no>
* pkg.c (packages_get_l_libs, packages_get_L_libs): Duplicate
singly linked list before putting it on list passed to
string_list_strip_duplicates_from_back to avoid infinite loop when
g_slist_copy tries to copy self-linked list. This happens if the
user specifies the same name on the command line twice.
Author: tfheen
Date: 2005-04-01 21:46:07 GMT
2005-04-01 Tollef Fog Heen <tfheen@err.no>
* configure.in: Try to detect whether this architecture supports
inter-library dependencies. If so, we default to assuming that
this support is used and link to the minimal set of libraries
rather than traversing the full depends set.
* main.c (main): Only recurse if we want a static library list or
if this architecture doesn't support inter-library dependencies.
This will probably expose bugs for libraries which declare
dependencies in their .pc files but don't actually link against
each other.
* pkg.c (packages_get_all_libs): Add recurse option
(packages_get_L_libs): Add recurse option
(package_get_L_libs): Add recurse option
(packages_get_l_libs): Add recurse option
(package_get_l_libs): Add recurse option
* pkg.h: Update prototypes to handle the recurse option.
Author: tfheen
Date: 2005-03-26 14:59:26 GMT
2005-03-18 Tollef Fog Heen <tfheen@err.no>
* main.c (main): Use add_search_dirs for both the compile-time
defined pc_path and the run-time defined PKG_CONFIG_PATH.
* pkg.h: Add prototype for add_search_dirs.
* pkg.c (add_search_dirs): Add new function which takes a
delimiter-separated list as input and add_search_dir's it.
(package_init): Remove knowledge about which dirs should be
initially added. Moved this to main.c(main)
* ChangeLog: Add emacs variables to set the date to this
ChangeLog's standard format
* Makefile.am (INCLUDES): Pass PKG_CONFIG_PCPATH on to main.c
* configure.in: Add --with-pc-path to define the default search
path for .pc files. (Freedesktop #119, #648)
Author: tfheen
Date: 2005-03-22 08:54:08 GMT
2005-03-18 Tollef Fog Heen <tfheen@debian.org>
* pkg.c (print_package_list): Ignore requires when just listing
the available packages.
(internal_get_package): Pass ignore_requires on.
* parse.h: update prototype for parse_package_file.
* parse.c (parse_line): Ignore Requires when told so.
(parse_package_file): Pass ingore_requires on to parse_line.
(Freedesktop #191, Debian #232719)
Author: jamesh
Date: 2003-05-01 01:14:30 GMT
2003-04-30 James Henstridge <james@daa.com.au>
* pkg.c (verify_package): fix up error messages.
* parse.c (parse_line): don't error out on unknown keywords, as
they may represent future extensions to the file format.
Author: jamesh
Date: 2003-02-22 14:04:21 GMT
2003-02-22 James Henstridge <james@daa.com.au>
* pkg.c (add_virtual_pkgconfig_package): function to add a virtual
"pkg-config" package to the packages hash table.
(package_init): add the "pkg-config" package while initing the
hash table.
Author: tml
Date: 2003-02-19 19:24:14 GMT
2003-02-19 Tor Lillqvist <tml@iki.fi>
* pkg.c (add_env_variable_to_list): Use G_SEARCHPATH_SEPARATOR_S
instead of hardcoded ":".
(verify_package): Don't use /usr/include on Win32.
Author: hp
Date: 2003-02-15 15:37:04 GMT
2003-02-15 Havoc Pennington <hp@pobox.com>
* pkg.c (verify_package): patch from Nalin to use /usr/lib64 as
the system libdir on systems where that's appropriate
Author: hp
Date: 2003-02-15 15:04:07 GMT
2003-02-15 Havoc Pennington <hp@pobox.com>
Fixes suggested by Werner Trobin
* main.c (verbose_error): honor --errors-to-stdout and flush
the same stream we write to
* parse.c (parse_url): support an "url" field so if someone
has a .pc file they can figure out where to go for newer
versions and such
Author: hp
Date: 2003-01-15 04:02:47 GMT
2003-01-15 Havoc Pennington <hp@pobox.com>
* pkg.c (package_init): honor a PKG_CONFIG_LIBDIR to move default
search dir, useful in cross-compilation for example, bug
#103545 fix from David Schleef
Author: hp
Date: 2002-10-11 20:40:38 GMT
2002-10-11 Havoc Pennington <hp@redhat.com>
* pkg.c (verify_package): fix to properly cast iter->data to char*
before doing pointer arithmetic, from David Robins
Author: andersca
Date: 2002-09-26 07:09:38 GMT
2002-09-26 Anders Carlsson <andersca@gnu.org>
* pkg.c (verify_package): Use strncmp when checking for
the -I prefix.
Author: jrb
Date: 2002-09-17 17:40:19 GMT
Tue Sep 17 14:11:51 2002 Jonathan Blandford <jrb@redhat.com>
* pkg.c: strip out C_INCLUDE_PATH and CPLUS_INCLUDE_PATH if they
exist, as this can break -Werror on some newer gcc versions.
Author: hp
Date: 2002-09-06 20:00:08 GMT
2002-09-06 Havoc Pennington <hp@redhat.com>
* parse.c, pkg.c: handle other_libs other_cflags same
as -l/-L/-I flags, so we pull in from dependent packages.
Closes#85244, #90706, #89851