summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pkgconfig/pkgconfig/disable-legacy.patch
blob: 30db36c182b0f1673e475ab38a61cf09df3531f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Upstream-Status: Inappropriate [configuration]

On an Fedora host with glib-config installed pkgconfig-native can get into a
horrible state with recursive calls between pkg-config and glib-config.
The patch adds a configure time option to disable legacy script support in
pkgconfig with the --disable-legacy-scripts option, to maintain compatibility
the default is to leave the scripts enabled.

JL - 22/06/10
Index: pkg-config-0.25/configure.in
===================================================================
--- pkg-config-0.25.orig/configure.in	2011-10-05 18:52:24.879726050 +0100
+++ pkg-config-0.25/configure.in	2011-10-05 18:55:39.639726152 +0100
@@ -151,6 +151,18 @@
 AC_SUBST([POPT_LIBS])
 AM_CONDITIONAL([USE_INSTALLED_POPT], [test "x$with_installed_popt" = xyes])
 
+# legacy *-configure scripts can cause headaches, add option to disable
+AC_ARG_ENABLE(legacy-scripts,
+        [AC_HELP_STRING([--enable-legacy-scripts=@<:@no/yes@:>@],
+                        [Whether pkg-config will try and use legacy scripts such as glib-config and gnome-config @<:@default=yes@:>@])],
+        [],
+        [enable_legacy=yes])
+AM_CONDITIONAL([NO_LEGACY_SCRIPTS], [test x$enable_legacy != xyes])
+if test x$enable_legacy != xyes; then
+  AC_DEFINE(NO_LEGACY_SCRIPTS, 1, [We are not using legacy scripts])
+fi
+
+
 AC_FUNC_ALLOCA
 
 AC_CHECK_FUNCS(setresuid setreuid,break)
Index: pkg-config-0.25/parse.c
===================================================================
--- pkg-config-0.25.orig/parse.c	2011-10-05 18:52:24.869726050 +0100
+++ pkg-config-0.25/parse.c	2011-10-05 18:54:49.909726133 +0100
@@ -1237,6 +1237,11 @@
    * messages.
    */
   return NULL;
+#elif defined(NO_LEGACY_SCRIPTS)
+  /* There are scenarios where we might not want to use these legacy
+   * scripts even if they are available.
+   */
+  return NULL;
 #else
 
   Package *pkg;