From 3d098dd6222e5d6a6dfb17d5ff38ecb377727dc6 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 27 Oct 2008 15:15:52 +0000 Subject: Fix matchbox build Fix matchbox build This patch fixes various failures in the Matchbox build: * libmatchbox and matchbox-panel were using a now legacy index() function, which is not part of every uClibc build nowadays (depending on the configuration). As this function doesn't exist anymore in all builds, use strchr() instead, which is the recommended replacement for index(). Two patches, one for libmatchbox, one for matchbox-panel, are added to fix this problem. Closes bug http://bugs.uclibc.org/view.php?id=5484 * Do not override the CFLAGS and LDFLAGS values, they are already set by TARGET_CONFIGURE_OPTS. It caused build failures. * Mangle the library paths in the .la file of libmatchbox, after installation in the staging dir. It would probably be nice to switch Matchbox over to the new Makefile.autotools.in. Signed-off-by: Thomas Petazzoni --- .../matchbox/libmatchbox-1.9-index-is-legacy.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/matchbox/libmatchbox-1.9-index-is-legacy.patch (limited to 'package/matchbox/libmatchbox-1.9-index-is-legacy.patch') diff --git a/package/matchbox/libmatchbox-1.9-index-is-legacy.patch b/package/matchbox/libmatchbox-1.9-index-is-legacy.patch new file mode 100644 index 000000000..b486fb18d --- /dev/null +++ b/package/matchbox/libmatchbox-1.9-index-is-legacy.patch @@ -0,0 +1,35 @@ +index() is a legacy function, not implemented in some uClibc +configurations. + +Signed-off-by: Thomas Petazzoni +--- + libmb/mbexp.c | 2 +- + libmb/mbmenu.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: libmatchbox-1.9/libmb/mbexp.c +=================================================================== +--- libmatchbox-1.9.orig/libmb/mbexp.c ++++ libmatchbox-1.9/libmb/mbexp.c +@@ -492,7 +492,7 @@ + + /* get the family */ + +- if (index(spec, ',') != NULL || index(spec, '-') != NULL) ++ if (strchr(spec, ',') != NULL || strchr(spec, '-') != NULL) + has_comma_delim = True; + + while (!got_family) { +Index: libmatchbox-1.9/libmb/mbmenu.c +=================================================================== +--- libmatchbox-1.9.orig/libmb/mbmenu.c ++++ libmatchbox-1.9/libmb/mbmenu.c +@@ -433,7 +433,7 @@ + { + s = p; + found = NULL; +- while(index("/\0", *p) == NULL) p++; ++ while(strchr("/\0", *p) == NULL) p++; + if (*p != '\0') { *p = '\0'; p++; }; + + item = current->items; -- cgit v1.2.3