Move the primary "local include directories" (usually -I/usr/local/include
and -I/usr/X11R6/include) to the end of any lists generated by pkg-config. This helps to avoid conflicts from packages with different includes using the same names in matching include paths, like gdk-pixbuf (whose headers are in ${LOCALBASE}/include/gdk-pixbuf) and gtk+2 (whose headers live in ${LOCALBASE}/include/gtk-2.0/gdk-pixbuf). Bump package version accordingly. ok pvalchev@
This commit is contained in:
parent
1c6ca7343a
commit
c5da3d7383
@ -1,9 +1,10 @@
|
|||||||
# $OpenBSD: Makefile,v 1.10 2002/12/11 17:17:08 marcm Exp $
|
# $OpenBSD: Makefile,v 1.11 2003/01/02 19:23:05 marcm Exp $
|
||||||
|
|
||||||
COMMENT= "tool for managing library compile/link flags"
|
COMMENT= "tool for managing library compile/link flags"
|
||||||
|
|
||||||
VERSION= 0.14.0
|
VERSION= 0.14.0
|
||||||
DISTNAME= pkgconfig-${VERSION}
|
DISTNAME= pkgconfig-${VERSION}
|
||||||
|
PKGNAME= pkgconfig-${VERSION}p1
|
||||||
CATEGORIES= devel
|
CATEGORIES= devel
|
||||||
|
|
||||||
HOMEPAGE= http://www.freedesktop.org/software/pkgconfig/
|
HOMEPAGE= http://www.freedesktop.org/software/pkgconfig/
|
||||||
|
12
devel/pkgconfig/patches/patch-Makefile_in
Normal file
12
devel/pkgconfig/patches/patch-Makefile_in
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-Makefile_in,v 1.1 2003/01/02 19:23:05 marcm Exp $
|
||||||
|
--- Makefile.in.orig Wed Jan 1 19:03:18 2003
|
||||||
|
+++ Makefile.in Wed Jan 1 19:05:03 2003
|
||||||
|
@@ -117,7 +117,7 @@ bin_PROGRAMS = pkg-config$(EXEEXT)
|
||||||
|
PROGRAMS = $(bin_PROGRAMS)
|
||||||
|
|
||||||
|
|
||||||
|
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
|
||||||
|
+DEFS = @DEFS@ -I. -I$(srcdir) -I. -DLOCALBASE="\"${LOCALBASE}\"" -DX11BASE="\"${X11BASE}\""
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBS = @LIBS@
|
67
devel/pkgconfig/patches/patch-pkg_c
Normal file
67
devel/pkgconfig/patches/patch-pkg_c
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
$OpenBSD: patch-pkg_c,v 1.3 2003/01/02 19:23:05 marcm Exp $
|
||||||
|
--- pkg.c.orig Thu Oct 10 14:14:59 2002
|
||||||
|
+++ pkg.c Wed Jan 1 19:07:15 2003
|
||||||
|
@@ -334,6 +334,54 @@ get_package (const char *name)
|
||||||
|
return internal_get_package (name, TRUE, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ If certain directories are present, move them to the end of the list
|
||||||
|
+ to avoid conflicts.
|
||||||
|
+*/
|
||||||
|
+static GSList*
|
||||||
|
+string_list_fix_local_I_dirs (GSList *list)
|
||||||
|
+{
|
||||||
|
+ GSList *iter;
|
||||||
|
+ GSList *local_I_dirs = NULL;
|
||||||
|
+ GSList *local_I_dir_iter = NULL;
|
||||||
|
+ GSList *found_dirs = NULL;
|
||||||
|
+
|
||||||
|
+ iter = list;
|
||||||
|
+
|
||||||
|
+ local_I_dirs = g_slist_append (local_I_dirs, g_strdup_printf ("-I%s/include", LOCALBASE));
|
||||||
|
+ local_I_dirs = g_slist_append (local_I_dirs, g_strdup_printf ("-I%s/include", X11BASE));
|
||||||
|
+
|
||||||
|
+ while (iter != NULL)
|
||||||
|
+ {
|
||||||
|
+ local_I_dir_iter = local_I_dirs;
|
||||||
|
+ while (local_I_dir_iter != NULL)
|
||||||
|
+ {
|
||||||
|
+ if (strcmp (local_I_dir_iter->data, iter->data) == 0)
|
||||||
|
+ {
|
||||||
|
+ debug_spew ("List contains \"%s\" - moving it to the end\n", (gchar *)iter->data);
|
||||||
|
+ found_dirs = g_slist_append (found_dirs, iter->data);
|
||||||
|
+ iter->data = NULL;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ local_I_dir_iter = local_I_dir_iter->next;
|
||||||
|
+ }
|
||||||
|
+ iter = iter->next;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ g_slist_free (local_I_dirs);
|
||||||
|
+
|
||||||
|
+ while (found_dirs != NULL)
|
||||||
|
+ {
|
||||||
|
+ list = g_slist_remove (list, NULL);
|
||||||
|
+ list = g_slist_append (list, found_dirs->data);
|
||||||
|
+ found_dirs = found_dirs->next;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ g_slist_free (found_dirs);
|
||||||
|
+
|
||||||
|
+ return list;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static GSList*
|
||||||
|
string_list_strip_duplicates (GSList *list)
|
||||||
|
{
|
||||||
|
@@ -923,6 +971,8 @@ get_multi_merged (GSList *pkgs, GetListF
|
||||||
|
|
||||||
|
g_slist_free (dups_list);
|
||||||
|
|
||||||
|
+ list = string_list_fix_local_I_dirs (list);
|
||||||
|
+
|
||||||
|
retval = string_list_to_string (list);
|
||||||
|
|
||||||
|
g_slist_free (list);
|
Loading…
Reference in New Issue
Block a user