Commit graph

12 commits

Author SHA1 Message Date
Dan Nicholson
64cbed9884 glib: Fix bundled build with GCC 6
Backport two patches from upstream glib to handle -Wformat-nonliteral
included by default with GCC 6. Ideally the snapshot should be updated,
but this fix the issue until that happens.

https://bugs.freedesktop.org/show_bug.cgi?id=95326
2017-03-20 06:01:57 -05:00
Dan Nicholson
753f0ba1e9 glib: Fix OSX build with internal glib
In the last internal glib update, the glib configure script changed the
OSX framework flags from the form of "-framework Foo" to
"-Wl,framework,Foo". Unfortunately, libtool only understands the prior
form and doesn't include the appropriate -framework flags in the
libglib-2.0.la file. This ultimately causes pkg-config to fail to link
properly:

Undefined symbols for architecture x86_64:
  "_CFRelease", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFStringGetCString", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFStringGetCStringPtr", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFStringGetLength", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFURLCopyFileSystemPath", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_CFURLCreateFromFSRef", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_FSFindFolder", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
  "_kCFAllocatorSystemDefault", referenced from:
      _find_folder in libglib-2.0.a(libglib_2_0_la-gutils.o)
ld: symbol(s) not found for architecture x86_64

Upstream has fixed this by including the new style -framework flags in
the glib-2.0.pc file. We can't use that here as we're bootstrapping
pkg-config itself. Rather than work around this with an OSX platform
check in pkg-config's configure, carry a downstream patch to revert
glib's configure to using the old format.

https://bugs.freedesktop.org/show_bug.cgi?id=92902
2016-03-01 11:28:35 -08:00
Dan Nicholson
cf9089f5ec glib: Fix static usage of glib on win32
When glib is built static, the threads and clock code are not
initialized since DllMain is never run. Instead, initialize them from
the glib constructor.

https://bugzilla.gnome.org/show_bug.cgi?id=678387
2012-08-17 11:37:04 -07:00
Dan Nicholson
f0e821fed2 glib: Remove usage of gettext/libintl/iconv
pkg-config doesn't use message translation, so there's no need to build
it into the bundled glib. Furthermore, when not using glibc, this drags
in extra dependencies on gettext, libintl and iconv. Remove their usage
in two steps:

1. Don't include libintl.h directly from code. glibintl.h
conditionalizes the include of libintl.h based on the ENABLE_NLS define
and creates fallback macros when it's unwanted.

2. Remove the usage of the gettext macros in glib's configure.ac. This
ensures that the unwanted dependencies aren't searched for. Two defines
are kept around to keep the code happy.
2012-08-17 09:03:55 -07:00
Dan Nicholson
f95579d268 glib: Ensure only static build is performed
Since we're going to use glib as a convenience library, we need to make
sure it builds as if --enable-static was passed. This only matters on
Windows where a couple extra macros are defined and the DLL machinery is
disabled.
2012-08-17 08:12:49 -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
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
9961b85d2a glib: Add a script to take a snapshot of glib-2.0
Grab a snapshot of a tag from a local glib checkout, remove a bunch of
files and apply some patches. The idea is to make the snapshot of glib
be repeatable.
2012-04-21 12:46:31 -07:00