diff options
Diffstat (limited to 'packages/libmatchbox')
-rw-r--r-- | packages/libmatchbox/files/svn-autofu-xsettings.patch | 132 | ||||
-rw-r--r-- | packages/libmatchbox/files/svn-code-misc-xsettings.patch | 101 | ||||
-rw-r--r-- | packages/libmatchbox/libmatchbox_1.7.bb | 2 |
3 files changed, 235 insertions, 0 deletions
diff --git a/packages/libmatchbox/files/svn-autofu-xsettings.patch b/packages/libmatchbox/files/svn-autofu-xsettings.patch new file mode 100644 index 0000000000..a5df4301ff --- /dev/null +++ b/packages/libmatchbox/files/svn-autofu-xsettings.patch @@ -0,0 +1,132 @@ +diff -urpN libmatchbox-1.7~orig/configure.ac libmatchbox-1.7/configure.ac +--- libmatchbox-1.7~orig/configure.ac 2005-04-08 08:53:20.000000000 -0500 ++++ libmatchbox-1.7/configure.ac 2006-02-23 00:08:20.000000000 -0600 +@@ -87,9 +87,13 @@ if test $have_libx11pc = yes; then + fi + # XXX : xau is missing from x11.pc - workaround is too add here + PKG_CHECK_MODULES(XLIBS, x11 xext $xft_pkg) ++ XLIBS_REQUIRED="x11 xext" + else + + AC_PATH_XTRA ++if test x"$no_x" = x"yes"; then ++ AC_MSG_ERROR([*** Required X11 Headers and libraries not found.***]) ++fi + + XFT_LIBS= + XFT_CFLAGS= +@@ -125,8 +129,12 @@ fi + XLIBS_CFLAGS="$XLIBS_CLAGS $XFT_CFLAGS" + XLIBS_LIBS="$X_LIBS $XFT_LIBS -lX11 -lXext" + ++MB_EXTRA_LIBS="$MB_EXTRA_LIBS $XLIBS_LIBS" ++ + fi + ++# do this here for freetype include ++MB_EXTRA_CFLAGS="$MB_EXTRA_CFLAGS $XLIBS_CFLAGS" + + dnl ------ Check for Pango --------------------------------------------------- + +@@ -135,6 +143,7 @@ if test x$enable_pango != xno; then + if test x$have_pango=xyes; then + AC_DEFINE(USE_PANGO, [1], [Use Pango]) + SUPPORTS_PANGO=1 ++ PANGO_REQUIRED="pango pangoxft" + else + AC_MSG_WARN([*** Cannot find pango, disabling support]) + enable_pango=no +@@ -152,6 +161,7 @@ if test x$enable_png != xno; then + PNG_CFLAGS=`$PKG_CONFIG --cflags libpng12` + AC_DEFINE(USE_PNG, [1], [Use Png]) + SUPPORTS_PNG=1 ++ PNG_REQUIRED="libpng12" + else + AC_MSG_RESULT(no) + # AC_CHECK_HEADERS(png.h, [ have_png_h="yes" ], [ have_png_h="no" ] ) +@@ -161,6 +171,7 @@ if test x$enable_png != xno; then + AC_DEFINE(USE_PNG, [1], [Use Png]) + SUPPORTS_PNG=1 + PNG_LIBS="-lpng -lz" ++ MB_EXTRA_LIBS="$MB_EXTRA_LIBS $XLIBS_LIBS $PNG_LIBS" + else + AC_MSG_WARN([*** Cannot find PNG, disabling support]) + enable_png=no +@@ -179,6 +190,7 @@ if test x$enable_jpeg != xno; then + AC_DEFINE(USE_JPG, [1], [Use JPEG]) + SUPPORTS_JPEG=1 + JPEG_LIBS="-ljpeg" ++ MB_EXTRA_LIBS="$MB_EXTRA_LIBS -ljpeg" + else + AC_MSG_WARN([*** Cannot find libjpeg, disabling support]) + enable_jpeg=no +@@ -231,6 +243,9 @@ if test x$enable_xsettings != xno; then + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ++ MB_EXTRA_LIBS="$MB_EXTRA_LIBS $XSET_LIBS" ++ MB_EXTRA_CFLAGS="$MB_EXTRA_CFLAGS $XSET_CFLAGS" ++ + AC_DEFINE(USE_XSETTINGS, [1], [Use XSettings Client]) + + AC_MSG_RESULT([yes]) +@@ -319,6 +334,12 @@ AC_SUBST(GCC_WARNINGS) + AC_SUBST(XSET_LIBS) + AC_SUBST(XSET_CFLAGS) + ++AC_SUBST(MB_EXTRA_LIBS) ++AC_SUBST(MB_EXTRA_CFLAGS) ++AC_SUBST(XLIBS_REQUIRED) ++AC_SUBST(PANGO_REQUIRED) ++AC_SUBST(PNG_REQUIRED) ++ + dnl ------ Below used for mbconfig.h ---------------------------------------- + + AC_SUBST(SUPPORTS_PNG) +diff -urpN libmatchbox-1.7~orig/libmb/Makefile.am libmatchbox-1.7/libmb/Makefile.am +--- libmatchbox-1.7~orig/libmb/Makefile.am 2005-04-08 08:53:11.000000000 -0500 ++++ libmatchbox-1.7/libmb/Makefile.am 2006-02-23 00:01:54.000000000 -0600 +@@ -18,11 +18,11 @@ source_c = mbmenu.c \ + + DATADIR=$(datadir) + +-AM_CFLAGS = @GCC_WARNINGS@ @XLIBS_CFLAGS@ @PANGO_CFLAGS@ @PNG_CFLAGS@ -DDATADIR=\"$(datadir)\" ++AM_CFLAGS = @GCC_WARNINGS@ @XLIBS_CFLAGS@ @PANGO_CFLAGS@ @PNG_CFLAGS@ @XSET_LIBS@ -DDATADIR=\"$(datadir)\" + + lib_LTLIBRARIES = libmb.la + libmb_la_SOURCES = $(source_c) $(source_h) +-libmb_la_LIBADD = @XLIBS_LIBS@ @PANGO_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ ++libmb_la_LIBADD = @XLIBS_LIBS@ @PANGO_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @XSET_CFLAGS@ + + # http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 + # current : revision : age +diff -urpN libmatchbox-1.7~orig/libmb/mbtray.c libmatchbox-1.7/libmb/mbtray.c +--- libmatchbox-1.7~orig/libmb/mbtray.c 2006-02-23 00:01:07.000000000 -0600 ++++ libmatchbox-1.7/libmb/mbtray.c 2006-02-23 00:09:45.000000000 -0600 +@@ -26,7 +26,13 @@ + + */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#ifndef _GNU_SOURCE + #define _GNU_SOURCE ++#endif + + #include "mbtray.h" + +diff -urpN libmatchbox-1.7~orig/libmb.pc.in libmatchbox-1.7/libmb.pc.in +--- libmatchbox-1.7~orig/libmb.pc.in 2005-03-20 11:43:26.000000000 -0600 ++++ libmatchbox-1.7/libmb.pc.in 2006-02-23 00:11:18.000000000 -0600 +@@ -6,5 +6,7 @@ includedir=@includedir@ + Name: libmb + Description: Utility Library used by Matchbox utilities. + Version: @VERSION@ +-Libs: -L${libdir} -lmb @XLIBS_LIBS@ @PANGO_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @XSET_LIBS@ +-Cflags: -I${includedir} @XLIBS_CFLAGS@ @PANGO_CFLAGS@ @PNG_CFLAGS@ @XSET_CFLAGS@ ++ ++Requires: @XLIBS_REQUIRED@ @PANGO_REQUIRED@ @PNG_REQUIRED@ ++Libs: -L${libdir} -lmb @MB_EXTRA_LIBS@ ++Cflags: -I${includedir} @MB_EXTRA_CFLAGS@ diff --git a/packages/libmatchbox/files/svn-code-misc-xsettings.patch b/packages/libmatchbox/files/svn-code-misc-xsettings.patch new file mode 100644 index 0000000000..52b1507505 --- /dev/null +++ b/packages/libmatchbox/files/svn-code-misc-xsettings.patch @@ -0,0 +1,101 @@ +diff -uprN libmatchbox-1.7~orig/libmb/mbexp.c libmatchbox-1.7/libmb/mbexp.c +--- libmatchbox-1.7~orig/libmb/mbexp.c 2006-02-23 00:33:19.000000000 -0600 ++++ libmatchbox-1.7/libmb/mbexp.c 2006-02-23 00:40:06.000000000 -0600 +@@ -406,6 +406,10 @@ mb_font_new(Display *dpy, + #endif + + font = malloc(sizeof(MBFont)); ++ ++ if (font == NULL) ++ return NULL; ++ + memset(font, 0, sizeof(MBFont)); + + if (family != NULL) +@@ -425,9 +429,12 @@ mb_font_new(Display *dpy, + font->pgo_fontmap = pango_xft_get_font_map (font->dpy, DefaultScreen(dpy)); + font->fontdes = pango_font_description_new (); + +- /* -- Needed ? +- pango_context_set_language (w->pgo, pango_language_from_string ("ar_AE")); +- */ ++ /* If Pango is mis-setup the above will fail */ ++ if (font->pgo_context == NULL || font->pgo_fontmap == NULL || font->fontdes == NULL) ++ { ++ free(font); ++ return NULL; ++ } + + #elif defined (USE_XFT) + +@@ -581,8 +588,11 @@ MBFont* + mb_font_new_from_string(Display *dpy, char *spec) + { + MBFont *font = mb_font_new(dpy, NULL); +- mb_font_set_from_string(font, spec); +- return font; ++ ++ if (font) ++ return mb_font_set_from_string(font, spec); ++ ++ return NULL; + } + + MBFont* +@@ -1091,7 +1101,13 @@ mb_font_render_simple (MBFont * + if (!len) { free(str); return 0; } + + if ((opts & MB_FONT_RENDER_OPTS_CLIP_TRAIL) && len > 3) ++ { ++ /* Avoid having a space before the elipsis */ ++ while (len-1 >= 0 && str[len-1] == ' ') ++ len--; ++ + want_dots = True; ++ } + } + else + { +diff -uprN libmatchbox-1.7~orig/libmb/mbmenu.c libmatchbox-1.7/libmb/mbmenu.c +--- libmatchbox-1.7~orig/libmb/mbmenu.c 2006-02-23 00:33:19.000000000 -0600 ++++ libmatchbox-1.7/libmb/mbmenu.c 2006-02-23 00:42:23.000000000 -0600 +@@ -19,6 +19,10 @@ + + #define _GNU_SOURCE + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include "mbmenu.h" + + #define MBMAX(x,y) ((x>y)?(x):(y)) +@@ -664,7 +668,7 @@ mb_menu_check_scroll_button(MBMenu *mb,M + return WANT_SCROLL_DOWN; + } + +- /* ++#if 0 + for(tmpi = m->too_big_start_item; + tmpi != NULL; + tmpi = tmpi->next_item) +@@ -679,7 +683,7 @@ mb_menu_check_scroll_button(MBMenu *mb,M + MENUDBG("%s() retruning want scroll up\n", __func__); + return WANT_SCROLL_UP; + } +- */ ++#endif /* #if 0 */ + + if (m->too_big_end_item + && y_pos > (m->too_big_end_item->y+m->too_big_end_item->h)) +diff -uprN libmatchbox-1.7~orig/libmb/mbpixbuf.c libmatchbox-1.7/libmb/mbpixbuf.c +--- libmatchbox-1.7~orig/libmb/mbpixbuf.c 2006-02-23 00:33:19.000000000 -0600 ++++ libmatchbox-1.7/libmb/mbpixbuf.c 2006-02-23 00:43:02.000000000 -0600 +@@ -907,6 +907,7 @@ mb_pixbuf_new_extended(Display *dpy, + fprintf(stderr, "mbpixbuf: unable to use XShm. DISPLAY remote?\n"); + pb->have_shm = False; + } ++ else XShmDetach(pb->dpy, &shminfo); + + shmdt(shminfo.shmaddr); + shmctl(shminfo.shmid, IPC_RMID, 0); diff --git a/packages/libmatchbox/libmatchbox_1.7.bb b/packages/libmatchbox/libmatchbox_1.7.bb index c658e27a60..d71f99c5f2 100644 --- a/packages/libmatchbox/libmatchbox_1.7.bb +++ b/packages/libmatchbox/libmatchbox_1.7.bb @@ -2,6 +2,8 @@ include libmatchbox.inc SRC_URI = "http://projects.o-hand.com/matchbox/sources/${PN}/${PV}/${PN}-${PV}.tar.gz \ file://svn-explicit-types.patch;patch=1 \ + file://svn-autofu-xsettings.patch;patch=1 \ + file://svn-code-misc-xsettings.patch;patch=1 \ file://check.m4" do_configure_prepend () { |