# HG changeset patch # User John W. Eaton # Date 1370884640 14400 # Node ID 706c4daf33723be06d8c5370a385547ef744f91e # Parent 17d6d363b54d2c518293555c3bca5e1abd1c597f PKG_CONFIG_PATH fixes Makefile: Don't export PKG_CONFIG_PATH build-pkg-config-1-fixes.patch: New file. build-pkg-config.mk: Pass --with-pc_path to configure, not --with-pc-path freetds.mk: Don't use PKG_CONFIG_PATH=... in configure command. diff -r 17d6d363b54d -r 706c4daf3372 Makefile --- a/Makefile Mon Jun 10 11:54:23 2013 -0400 +++ b/Makefile Mon Jun 10 13:17:20 2013 -0400 @@ -207,11 +207,6 @@ unexport EXTRA_LDFLAGS LD LDFLAGS LIBRARY_PATH LIBS NM unexport OBJC_INCLUDE_PATH PKG_CONFIG QMAKESPEC RANLIB STRIP -# mingw on windows ignores the compiled in pc-path so we need to tell pkg-config where it is -ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) - export PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' -endif - SHORT_PKG_VERSION = \ $(word 1,$(subst ., ,$($(1)_VERSION))).$(word 2,$(subst ., ,$($(1)_VERSION))) diff -r 17d6d363b54d -r 706c4daf3372 src/build-pkg-config-1-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/build-pkg-config-1-fixes.patch Mon Jun 10 13:17:20 2013 -0400 @@ -0,0 +1,55 @@ +diff -uNr a/main.c b/main.c +--- a/main.c 2013-01-22 08:11:53.000000000 -0500 ++++ b/main.c 2013-06-10 13:16:55.637783224 -0400 +@@ -287,29 +287,7 @@ + static void + init_pc_path (void) + { +-#ifdef G_OS_WIN32 +- char *instdir, *lpath, *shpath; +- +- instdir = g_win32_get_package_installation_directory_of_module (NULL); +- if (instdir == NULL) +- { +- /* This only happens when GetModuleFilename() fails. If it does, that +- * failure should be investigated and fixed. +- */ +- debug_spew ("g_win32_get_package_installation_directory_of_module failed\n"); +- return; +- } +- +- lpath = g_build_filename (instdir, "lib", "pkgconfig", NULL); +- shpath = g_build_filename (instdir, "share", "pkgconfig", NULL); +- pkg_config_pc_path = g_strconcat (lpath, G_SEARCHPATH_SEPARATOR_S, shpath, +- NULL); +- g_free (instdir); +- g_free (lpath); +- g_free (shpath); +-#else + pkg_config_pc_path = PKG_CONFIG_PC_PATH; +-#endif + } + + static gboolean +diff -uNr a/Makefile.am b/Makefile.am +--- a/Makefile.am 2013-01-23 14:07:39.000000000 -0500 ++++ b/Makefile.am 2013-06-10 12:31:32.984044807 -0400 +@@ -9,18 +9,10 @@ + SUBDIRS = $(GLIB_SUBDIR) . check + DIST_SUBDIRS = $(SUBDIRS) + +-# Escape paths properly on windows +-if NATIVE_WIN32 + AM_CPPFLAGS = \ + -DPKG_CONFIG_PC_PATH="\"$(subst /,\/,$(pc_path))\"" \ + -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(subst /,\/,$(system_include_path))\"" \ + -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(subst /,\/,$(system_library_path))\"" +-else +-AM_CPPFLAGS = \ +- -DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" \ +- -DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"$(system_include_path)\"" \ +- -DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"$(system_library_path)\"" +-endif + + AM_CFLAGS = \ + $(WARN_CFLAGS) \ diff -r 17d6d363b54d -r 706c4daf3372 src/build-pkg-config.mk --- a/src/build-pkg-config.mk Mon Jun 10 11:54:23 2013 -0400 +++ b/src/build-pkg-config.mk Mon Jun 10 13:17:20 2013 -0400 @@ -21,10 +21,11 @@ define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && '$(1)/configure' \ + cd '$(1)' && autoreconf + cd '$(1).build' && '$(1)/configure' \ --with-internal-glib \ $($(PKG)_CONFIG_OPTS) \ - --with-pc-path='$(HOST_LIBDIR)/pkgconfig' \ + --with-pc_path='$(HOST_LIBDIR)/pkgconfig' \ --prefix='$(BUILD_TOOLS_PREFIX)' $(MAKE) -C '$(1).build' -j '$(JOBS)' rm -f "$(BUILD_TOOLS_PREFIX)/bin/`config.guess`-pkg-config" diff -r 17d6d363b54d -r 706c4daf3372 src/freetds.mk --- a/src/freetds.mk Mon Jun 10 11:54:23 2013 -0400 +++ b/src/freetds.mk Mon Jun 10 13:17:20 2013 -0400 @@ -21,10 +21,6 @@ head -1 endef -ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) - $(PKG)_CONFIG_OPTS := PKG_CONFIG_PATH='$(PKG_CONFIG_PATH)' -endif - define $(PKG)_BUILD cd '$(1)' && ./configure \ $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \