Commit graph

324 commits

Author SHA1 Message Date
Dan Nicholson
8bdf2df690 Ignore Windows executables 2012-08-16 09:30:03 -07:00
Dan Nicholson
a870b63b31 Document failure to build internal glib as OS X universal binary
GLib out of the box does not support being built for multiple arches.
This means pkg-config using the internal glib can't be built as a
universal binary on OS X. Document this and available workarounds.

Freedesktop #52032
2012-08-14 16:39:47 -07:00
Dan Nicholson
7178b2e041 glib: Remove check for tracing support
If dtrace or systemtap is installed glib will enable tracing
automatically. Remove the check to always disable tracing.

Freedesktop #53493
2012-08-14 15:16:35 -07:00
Dan Nicholson
40dc57fb41 glib: Don't install m4 macros
Freedesktop #52031
2012-08-13 20:40:27 -07:00
Dan Nicholson
234da3983b Update NEWS and bump version for 0.27 2012-07-11 05:28:10 -07:00
Dan Nicholson
3ead3dfb78 Enable Requires and Requires.private for --exists
Prior to pkg-config 0.24, --exists honored Requires and
Requires.private. This was regressed in commits 02d5ae3f and 669bfe2e,
which split the handling of Requires and Requires.private out more
correctly for other options. This adds exists to the group of options
that enable the Requires functionality.

Freedesktop #43149
2012-07-11 05:24:23 -07:00
Dan Nicholson
a077e02430 Make check-missing test more explicit with --exists
Currently the check-missing passes the packages on the command line with
no options prior to running through --cflags/--libs, etc. Make this more
explicitly pass --exists since this is a much more common operation
performed from PKG_CHECK_MODULES.

The expected result of 0 when Requires or Requires.private is missing is
a regression from pre-0.24 pkg-config.
2012-07-11 05:24:23 -07:00
Dan Nicholson
6c27d5051b glib: Restore gettext with libintl support
Until the needed surgery is done to remove gettext support from the
internal glib (since pkg-config doesn't need it), make sure that libintl
is linked in when necessary.
2012-06-04 15:21:25 -07:00
Dan Nicholson
533de22bae Add a configure message about internal glib to tip people off 2012-06-04 11:01:03 -07:00
Dan Nicholson
c47c09177f glib: Update snapshot to 2.32.3
There doesn't appear to be any changes in the code pkg-config uses. Just
keeping in sync.
2012-06-04 09:08:33 -07:00
Dan Nicholson
d11df7ffe0 Ensure test search path is confined to check directory
If only PKG_CONFIG_PATH is set when running the tests, we'll still pick
up packages from the system default path. By overriding that with
PKG_CONFIG_LIBDIR and unsetting PKG_CONFIG_PATH, the path is forced to
the check directory.
2012-05-30 05:49:14 -07:00
Dan Nicholson
5345892b8e Always use g_free when allocating memory from glib 2012-05-29 17:17:55 -07:00
Dan Nicholson
fd77d7690b Remove unneeded checks for setresuid & setreuid
These were used in the popt code a long time ago. pkg-config has no need
to be checking your uid.
2012-05-29 17:17:16 -07:00
Dan Nicholson
dfd03ae23e Use g_alloca instead of fooling around with platforms ourselves
Glib has been providing a g_alloca wrapper that handles all the platform
specifics since at least glib-1.3. Use it.
2012-05-29 16:41:17 -07:00
Dan Nicholson
5c219ca67d Makefile cleanup
No functional change, but makes things a little cleaner.
2012-05-23 05:47:26 -07:00
Javier Jardón
7a8cc77163 Update autotools configuration
Replace deprecated macros and use the new libtool syntax. The required
versions of the tools have been bumped up to match the versions of the
bundled glib. This was effectively the requirement, anyway. The new
required autotools versions are:

autoconf-2.62 (released 2008-04-08)
automake-1.11 (released 2009-05-17)
libtool-2.2 (released 2008-03-01)

Also use silent rules to quiet the build a bit.

Freedesktop #34382
2012-05-23 05:45:20 -07:00
Dan Nicholson
d575f1e5ea Remove unneeded acconfig.h, suppressing warnings from autoheader
acconfig.h was being used to undefine some macros, but these aren't
actually used anywhere in the pkg-config code. I suspect this was a
holdover from when glib-1 was used internally. glib does define some
similar macros, but that code is all self-contained there and not
anything we need to worry about in pkg-config.
2012-05-22 05:46:16 -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
Dan Nicholson
b87359cc9b Kill unused result variable
Gets rid of a compiler warning.
2012-05-18 09:44:49 -07:00
LRN
a80fbc5200 Fix win32 README
A simple documentation fix (reflecting the fact that pkg-config is not
being built against glib-1.2 anymore).
2012-05-18 09:14:08 -07:00
LRN
d415d91713 Fix test --define-variable invocation to avoid MSYS path mangling
Otherwise tests won't pass when running in MSYS.
2012-05-18 09:14:08 -07:00
Dan Nicholson
ee1737eb41 Clean up some of the autoconf usage
A few of the options in configure.ac were poorly quoted or didn't have
messages matching the typical autoconf style. PKG_CONFIG_FIND_PC_PATH
also had no reason to exist since it was used once immediately after its
definition.
2012-05-15 02:44:14 -07:00
Dan Nicholson
cfaffdc570 glib: Remove check for FAM only needed in GIO
One less thing for people to worry about with bundled glib.
2012-05-14 16:09:39 -07:00
Dan Nicholson
ad561f6163 Document cross-compiling with the bundled glib
Freedesktop #11464
2012-05-14 16:09:29 -07:00
Dan Nicholson
e2e118ec32 Ease glib cross-compiling requirements
Since we're building only glib, we don't need any of the auxiliary
tools.
2012-05-14 15:57:12 -07:00
Dan Nicholson
5c2675eb81 Don't --enable-maintainer-mode from autogen.sh
Maintainer mode was removed some time ago, so setting it from autogen.sh
has no effect.
2012-05-14 14:51:25 -07:00
Dan Nicholson
fd4d40b94e Drop popt usage and remove unused popt sources
With the conversion to GOption and g_shell_parse_argv, pkg-config has no
remaining usage of popt. Stop linking to libpopt and removed the bundled
sources.

Fixes Freedesktop #5326, #31700, #44843
2012-05-14 14:19:10 -07:00
Dan Nicholson
e91ab1009a Convert to GOption for command line option parsing
Use glib's GOption instead of popt for command line option
handling. The APIs and output are very similar. A couple minor
differences are:

* The callback for handling --define-variable is associated only with
  that option where popt was just leaving the argument and then it was
  handled in a generic callback.

* Remaining arguments after option parsing are in argc/argv while they
  are collected through poptGetArg with popt.

* GOption does not provide the short --usage summary.

This also works around bugs in the command line option handling with
the ancient internal popt.
2012-05-14 14:19:10 -07:00
Dan Nicholson
02d99c6ab1 Use glib to parse argv strings instead of popt
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.
2012-05-14 14:19:10 -07:00
Dan Nicholson
e8e6ee258e Make sure glib really doesn't need the gdb script
Fixes distcheck.
2012-05-14 14:18:36 -07:00
Bryan Kadzban
e512071cae popt: Reset long argument handling before iterating to next argument
From the LFS mailing list looking into why check-cmd-options fails using
the bundled popt:

poptGetNextOption, after it invokes the callback for
--define-variable=a=b (the operation of which sets the longArg local
variable), does not reset longArg to NULL.  So on the next time through
its loop (after invoking the --define-variable callback, before invoking
the --atleast-pkgconfig-version callback), on line 389 of popt.c, sets
con->os->nextArg to longArg (the old "a=b" string).  What it should do
is set nextArg to nextCharArg (the next item on the command line).  This
happens if longArg is NULL.

http://linuxfromscratch.org/pipermail/lfs-dev/2011-September/065065.html

Freedesktop #9584
2012-05-10 09:28:55 -07:00
Dan Nicholson
5745e1ba08 glib: Keep a few more programs from being installed or generated 2012-05-10 09:08:18 -07:00
Dan Nicholson
c34906923f Make sure dist is only run --with-internal-glib
Since there's no DIST_CONFIGURE_FLAGS, the best we can do to not require
glib's configure to always be run is to error on dist when we haven't
configured --with-internal-glib. This is a hack, but I think it's
slightly nicer than overriding dist and re-running configure with
different options than were specified by the user.
2012-05-10 08:40:11 -07:00
Dan Nicholson
64647b10a9 Conditionally add glib to DIST_SUBDIRS to fix distclean
The glib configure script takes a long time to run, so we want to avoid
it in the default case where we're using the system's glib.
Unfortunately, that means we can't add it unconditionally to
DIST_SUBDIRS since distclean will not always find Makefiles when it
descends into glib.

Make glib only be part of DIST_SUBDIRS when we've configured it. This
will require a different hack to make sure dist always includes glib.
2012-05-10 08:23:08 -07:00
Dan Nicholson
fb458a87b9 Revert "Make sure glib subdir is configure before dist"
This reverts commit 1860fc8036.

distclean breaks if glib is in DIST_SUBDIRS but we haven't actually
generated the glib Makefiles by running glib's configure.
2012-05-10 08:16:14 -07:00
Dan Nicholson
b32156ab2b glib: Update snapshot to 2.32.2
A libelf pkg-config check creeped in, but it's only used in gio so we
can remove the libelf check completely.
2012-05-10 08:14:11 -07:00
Dan Nicholson
bde0ffb444 Document a couple more pkg-config options 2012-05-10 07:56:34 -07:00
Lawrence A. Murakami
e10eee3c00 Fix errors in man page source cause missing content
Freedesktop #29011
2012-05-10 06:02:17 -07:00
Dan Nicholson
a83a14c291 Unify handling of operator and command line option version checking
The code for --exact/atleast/max-version was taking a different path
than the handling of operators like =/>=/<=. Make the long option
versions override the operators and take place during the standard
package checking stage. This also means that --print-errors is
respected.

Fixes Freedesktop #8653
2012-05-10 05:51:35 -07:00
Dan Nicholson
5fc77a96b7 Add autoconf macros to help packagers install .pc files
Some distros and users have unusual installation needs that don't
conform to the standard $libdir/pkgconfig and $datadir/pkgconfig
pathways. Help packagers support these users with the macros
PKG_INSTALLDIR and PKG_NOARCH_INSTALLDIR. These are simple macros that
provide the configure parameters --with-pkgconfigdir and
--with-noarch-pkgconfigdir to allow users to override the standard
locations.

Freedesktop #48743
2012-05-10 05:34:49 -07:00
Dieter Verfaillie
79c768aadf Revert "Print out \r\n on windows, not just \n"
This reverts commit 25e8ca84ac. This was
working around a bug with mingw/msys shell which seems to be fixed now.

Freedesktop #17053
2012-05-05 10:49:58 -07:00
Dan Nicholson
6485a160fe Document building with the internal glib copy 2012-04-21 12:52:58 -07:00
Dan Nicholson
1860fc8036 Make sure glib subdir is configure before dist
We want to distribute the glib subdir, but we want to avoid configuring
it for the default build case where the system glib is used. Override
the standard dist target so that we can reconfigure with
--with-internal-glib if necessary. I think the target should be
compatible with the original dist.

This is pretty hacky and may need to be reverted if it breaks dist.
2012-04-21 12:48:24 -07:00
Dan Nicholson
c74da521af Use a bundled glib2 to avoid circular dependency
It's nice to say that glib is a base library and you should have it
installed to build pkg-config, but it makes bootstrapping pkg-config
really annoying since it introduces a circular dependency.

Let's be nice to our users and bundle a copy to avoid this situation.
The default is still to use the system's glib, but the internal copy
can be used by passing --with-internal-glib to configure. The latest
stable copy of glib is included and will be updated periodically with
their stable releases.

The top level autogen.sh is running recursively through glib. If this
becomes an issue, we can switch autoreconf to --no-recursive and then
descend to glib and run its autogen.sh script.

Since this is default off, its integration will probably not be tested
often. Therefore, it's forcefully turned on during distcheck to make
sure to test it out before distributing a tarball.
2012-04-21 12:46:32 -07:00
Dan Nicholson
75755ba614 glib: Avoid pkg-config usage in bundled library
The whole exercise of carrying an internal copy of glib to avoid the
circular dependency is moot if it's still using pkg-config.
2012-04-21 12:46:32 -07:00
Dan Nicholson
2664821630 glib: Don't build GRegex or distribute pcre
In order to avoid the bundled pcre in our bundled glib, just remove and
disable the GRegex API. We don't currently need this in pkg-config
anyway.
2012-04-21 12:46:32 -07:00
Dan Nicholson
9ea8a68ccd glib: Set automake to foreign so it doesn't bomb on missing files 2012-04-21 12:46:32 -07:00
Dan Nicholson
f8d5ff5d29 glib: Don't install anything from the bundled library
All we want is the libglib.la convenience library. The -version-info is
removed since it causes warnings.
2012-04-21 12:46:32 -07:00
Dan Nicholson
7c54f7ca1e glib: Remove as many unneeded files as possible
We just want to be able to build glib from the within the pkg-config
tree. Everything else is just extra weight and is better used from an
actual glib checkout. Unnecessary files include:

* documentation
* translations
* tests
* ChangeLogs
* non-autotools win32 build files
* various other build and/or internal files
2012-04-21 12:46:31 -07:00
Dan Nicholson
c23f6a6ef3 glib: Bundle snapshot of glib-2.0
Add a snapshot of the current stable version of glib, glib-2.32.0. Since
we only need the glib library, a lot of files are removed. See the
README and update-glib.sh files in glib-patches for details.
2012-04-21 12:46:31 -07:00