Commit graph

24 commits

Author SHA1 Message Date
Dan Nicholson
e12f8f17a2 Kill a bunch of unused code
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.
2012-10-03 05:33:32 -07:00
LRN
7ac6f32625 Don't use deprecated glib function to construct path on win32
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
2012-05-21 21:08:49 -07:00
Tollef Fog Heen
99964eddb5 Stop shipping an embedded glib
Drop the embedded glib, the associated patches and adjust build
scripts appropriately.
2011-04-13 20:16:23 +02:00
Tollef Fog Heen
39663612a6 2009-06-12 Tor Lillqvist <tml@iki.fi>
* parse.c: On Win32, if the value of a a variable other than the
	"prefix" one starts with the non-overridden value of "prefix",
	then replace that prefix, too, with the run-time one.

	To avoid shadowing warnings, rename a 'p' variable to 'q'.

	* pkg-config.1: Corresponding update.

	* main.c
	* pkg.h: Move the Win32 redefinition of PKG_CONFIG_PC_PATH from
	main.c to pkg.h as it now is needed in pkg.c, too.
2009-06-30 03:47:01 +02:00
Tollef Fog Heen
daa68e4e1b 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg.h: Fix up path to glib.h
2009-03-30 21:16:28 +02:00
Tollef Fog Heen
669bfe2e0d 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* 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.
2009-03-30 20:49:17 +02:00
Tollef Fog Heen
02d5ae3fb6 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* 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
2009-03-30 20:40:53 +02:00
Tollef Fog Heen
ed75a7dd4b 2008-01-16 Tollef Fog Heen <tfheen@err.no>
* 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.
2008-01-16 23:10:25 +01:00
Tollef Fog Heen
ec5f06d60f Add --short-errors
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-16 17:31:41 +00:00
Tollef Fog Heen
d911bff6e2 Add missing prototype for enable_private_libs and disable_private_libs
2005-08-27  Tollef Fog Heen  <tfheen@err.no>

	* pkg.h: Add missing prototype for enable_private_libs and
	disable_private_libs.
2005-08-27 09:17:49 +00:00
Arch Librarian
29afc67918 2005-06-27 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-06-27 19:53:05 GMT
2005-06-27  Tollef Fog Heen  <tfheen@err.no>

    All those Requires.private changes are thanks to James
    Henstridge.  Thanks!

    * check/private-dep.pc, check/public-dep.pc,
      check/requires-test.pc: New files, data for the
    check-requires-private test.

    * check/check-requires-private: New test to check for
    Requires.private support.

    * check/Makefile.am (EXTRA_DIST, TESTS): Add Requires.private
    test.

    * pkg.h (struct _Package): Add requires_private

    * pkg.c (get_requires_private, fill_list_single_package)
    (fill_list, verify_package, verify_package, get_merged)
    (get_merged_from_back, get_multi_merged)
    (get_multi_merged_from_back, package_get_l_libs)
    (packages_get_l_libs, package_get_L_libs, packages_get_L_libs)
    (package_get_other_libs, packages_get_other_libs)
    (package_get_I_cflags, packages_get_I_cflags)
    (package_get_other_cflags, packages_get_other_cflags): Handle
    private requires and cascading changes.

    * parse.c (parse_requires_private, parse_conflicts)
    (parse_package_file): Handle Requires.private
2005-07-14 13:07:31 +00:00
Arch Librarian
20d118d57a 2005-05-21 Tollef Fog Heen <tfheen@err.no>
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.
2005-07-14 13:07:18 +00:00
Arch Librarian
986e4ebb03 2005-04-01 Tollef Fog Heen <tfheen@err.no>
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.
2005-07-14 13:06:42 +00:00
Arch Librarian
d2080ec6d8 2005-03-18 Tollef Fog Heen <tfheen@err.no>
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)
2005-07-14 13:06:23 +00:00
Arch Librarian
72b5088eae Obvious fix:
Author: jamesh
Date: 2003-02-22 07:04:02 GMT
Obvious fix:

2003-02-22  James Henstridge  <james@daa.com.au>

    * pkg.h: add missing prototype.

    * main.c (main): print the url if the package is too old, to match
    the output of verify_package().
2005-07-14 13:05:51 +00:00
Arch Librarian
7207c289d8 2003-02-15 Havoc Pennington <hp@pobox.com>
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
2005-07-14 13:05:41 +00:00
Arch Librarian
fcb804effe 2002-09-06 Havoc Pennington <hp@redhat.com>
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
2005-07-14 13:05:17 +00:00
Arch Librarian
e3b14fd5e8 add copyright notices to files
Author: hp
Date: 2002-09-06 19:32:18 GMT
add copyright notices to files
2005-07-14 13:05:14 +00:00
Arch Librarian
4722cb5782 2001-10-28 Havoc Pennington <hp@pobox.com>
Author: hp
Date: 2001-10-28 23:59:20 GMT
2001-10-28  Havoc Pennington  <hp@pobox.com>

	* pkg.c: track position of package in the path search order,
	and sort packages accordingly before assembling flags lists,
	reported by Jacob Berkman

	* parse.c (get_compat_package): set path position to maxint,
	always at end of path
2005-07-14 13:04:45 +00:00
Arch Librarian
b890f705eb 2001-10-27 Tor Lillqvist <tml@iki.fi>
Author: tml
Date: 2001-10-27 17:55:11 GMT
2001-10-27  Tor Lillqvist  <tml@iki.fi>

	New Win32 feature to make pkg-config useful for users of MSVC:
	with the flag --msvc-syntax, munge -L and -l flags appropriately
	for the MSVC command-line compiler. (-I flags are the same.)

	* README.win32: Update.

	* main.c (main): Add --msvc-syntax flag.

	* pkg-config.1: Document it.

	* pkg.h: Declare msvc_syntax.

	* parse.c (parse_libs): Obey msvc_syntax.
2005-07-14 13:04:41 +00:00
Arch Librarian
d86ec30f0a 2001-10-25 Tor Lillqvist <tml@iki.fi>
Author: tml
Date: 2001-10-24 21:22:33 GMT
2001-10-25  Tor Lillqvist  <tml@iki.fi>

	Improve Windows behaviour: Make it even easier to install
	developer packages in random locations, without having to modify
	the .pc files. Don't set "prefix" globally, instead override it
	for each .pc file parsed, if the path where the .pc file is seems
	to be the standard .../lib/pkgconfig.

	* main.c (main): Add search directories also from two Registry
	keys, in addition to the PKG_CONFIG_PATH environment
	variable. Don't define prefix globally.

	* parse.c (parse_line): Instead, if a .pc file is in
	/foo/bar/lib/pkgconfig, define prefix as /foo/bar for that package
	only.

	* pkg.c: Case-fold file names on Windows, in case they have been
	uppercasified by some tool.

	* pkg-config.1: Document Windows behaviour.
2005-07-14 13:04:37 +00:00
Arch Librarian
1aaee14cab 2001-09-30 Tor Lillqvist <tml@iki.fi>
Author: tml
Date: 2001-09-29 21:05:25 GMT
2001-09-30  Tor Lillqvist  <tml@iki.fi>

	Changes for "pure" Win32 (without Cygwin or similar)
	support. The most important differences compared to pkg-config
	on Unix are:

	We don't use hardcoded PKGLIBDIR paths but deduce the
	installation prefix at runtime.

	Use the normal GLib DLL, not a private copy. Yes, this does
	introduce a circular dependency, but that can be worked around.

	* README.win32: New file.

	* configure.in: Check for Win32. If so, define USE_INSTALLED_GLIB,
	and don't configure in the included glib-1.2.8. Set GLIB_CFLAGS
	and GLIB_LIBS assuming that GLib is installed in the same location
	pkgconfig will be. Check for dirent.h, unistd.h and sys/wait.h
	headers.

	* Makefile.am: If USE_INSTALLED_GLIB, use the GLIB_* values set
	above, and don't make in the glib-1.2.8 subdir.

	* autogen.sh: Use perl -p -i.bak, works better on Win32 (and Cygwin).

	* *.c: Conditionalize inclusions of unistd.h and sys/wait.h.

	* findme.c: Define X_OK on Win32 if necessary.

	* parse.c
	* popthelp.c: Minor Win32 portability ifdefs.

	* parse.c: No need to include <windows.h>.

	* pkg.c: Don't hardcode PKGLIBDIR, but use
	g_win32_get_package_installation_directory() to deduce it.
	(scan_dir): Make a temp copy of dirname with potential superfluous
	trailing slash removed. The Win32 opendir implementation doesn't
	always like those.

	* pkg.h: If USE_INSTALLED_GLIB, include <glib.h> instead of
	partial-glib.h.

	* popt.c (execCommand): Don't compile on Win32.

	* poptconfig.c (configLine): Don't bother with the "exec" stuff on
	Win32, too complex to port, at least for now.
	(poptReadDefaultConfig) Don't bother compiling on Win32, this
	function isn't even called.
2005-07-14 13:04:29 +00:00
Arch Librarian
e7323695df 2001-07-11 Havoc Pennington <hp@pobox.com>
Author: hp
Date: 2001-07-10 22:51:39 GMT
2001-07-11  Havoc Pennington  <hp@pobox.com>

	* parse.c (parse_cflags): fix failure to put space between cflags,
	reported by Chema
	(parse_line): allow spelling Cflags as CFlags, pointed out by Tim
	(get_compat_package): support legacy script gnome-vfs-config for
	package name "libgnomevfs"
2005-07-14 13:04:19 +00:00
Arch Librarian
2ac96cbcc7 import
Author: hp
Date: 2001-06-05 16:39:09 GMT
import
2005-07-14 13:04:01 +00:00