pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gnome-desktop Fix build with xrandr < 1.2 (like th...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e891888e0bc
branches:  trunk
changeset: 552040:8e891888e0bc
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Wed Dec 24 02:38:18 2008 +0000

description:
Fix build with xrandr < 1.2 (like the one that comes with XFree86)

diffstat:

 x11/gnome-desktop/Makefile         |   11 +-
 x11/gnome-desktop/distinfo         |    4 +-
 x11/gnome-desktop/patches/patch-aa |   22 +++
 x11/gnome-desktop/patches/patch-ab |  264 +++++++++++++++++++++++++++++++++++++
 4 files changed, 299 insertions(+), 2 deletions(-)

diffs (truncated from 338 to 300 lines):

diff -r e6e68aa0d897 -r 8e891888e0bc x11/gnome-desktop/Makefile
--- a/x11/gnome-desktop/Makefile        Wed Dec 24 00:53:14 2008 +0000
+++ b/x11/gnome-desktop/Makefile        Wed Dec 24 02:38:18 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.84 2008/12/02 14:37:19 wiz Exp $
+# $NetBSD: Makefile,v 1.85 2008/12/24 02:38:18 jmcneill Exp $
 #
 
 DISTNAME=              gnome-desktop-2.24.2
@@ -16,13 +16,22 @@
 USE_DIRS+=             gnome2-1.5
 USE_PKGLOCALEDIR=      yes
 USE_TOOLS+=            gmake intltool msgfmt perl:run pkg-config
+USE_TOOLS+=            automake autoconf aclocal autoreconf m4
 USE_LIBTOOL=           yes
 
+AUTOCONF_REQD=         2.62
+
 CONFIGURE_ARGS+=       --with-gnome-distributor="The NetBSD Foundation"
 
+BUILD_DEPENDS+=                gettext-m4>=0.14.6:../../devel/gettext-m4
+
 BUILDLINK_API_DEPENDS.glib2+=  glib2>=2.8.0
 BUILDLINK_API_DEPENDS.gtk2+=   gtk2+>=2.8.0
 
+pre-configure:
+       cd ${WRKSRC} && autoconf -f
+       cd ${WRKSRC} && autoheader -f
+
 post-install:
 .for f in netbsd-logo-icon.png netbsd-logo-icon-transparent.png
        ${INSTALL_DATA} ${FILESDIR}/${f} ${DESTDIR}${PREFIX}/share/pixmaps/${f}
diff -r e6e68aa0d897 -r 8e891888e0bc x11/gnome-desktop/distinfo
--- a/x11/gnome-desktop/distinfo        Wed Dec 24 00:53:14 2008 +0000
+++ b/x11/gnome-desktop/distinfo        Wed Dec 24 02:38:18 2008 +0000
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.39 2008/12/02 14:37:19 wiz Exp $
+$NetBSD: distinfo,v 1.40 2008/12/24 02:38:18 jmcneill Exp $
 
 SHA1 (gnome-desktop-2.24.2.tar.bz2) = c52d4d26bef1353306cbe851ed9a7c659e22a71e
 RMD160 (gnome-desktop-2.24.2.tar.bz2) = 9ecbf60bbbb6eb1b03d55356d61da12d6a19abed
 Size (gnome-desktop-2.24.2.tar.bz2) = 1509817 bytes
+SHA1 (patch-aa) = fda773406b65daa8e2e2ed29a43cd743040510fd
+SHA1 (patch-ab) = bf01d0f36c78913842687468001ea2c2edfb67aa
diff -r e6e68aa0d897 -r 8e891888e0bc x11/gnome-desktop/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gnome-desktop/patches/patch-aa        Wed Dec 24 02:38:18 2008 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.3 2008/12/24 02:38:18 jmcneill Exp $
+
+--- configure.in.orig  2008-11-25 08:09:10.000000000 -0500
++++ configure.in       2008-12-23 21:12:14.000000000 -0500
+@@ -117,6 +117,17 @@
+ AC_SUBST(XLIB_CFLAGS)
+ AC_SUBST(XLIB_LIBS)
+ 
++AC_CHECK_DECLS([XRRQueryExtension], , ,
++  [[
++    #include <X11/Xlib.h>
++    #include <X11/extensions/Xrandr.h>
++  ]])
++AC_CHECK_DECLS([XRRGetScreenSizeRange], , ,
++  [[
++    #include <X11/Xlib.h>
++    #include <X11/extensions/Xrandr.h>
++  ]])
++
+ dnl pkg-config dependency checks
+ 
+ PKG_CHECK_MODULES(GNOME_DESKTOP, libxml-2.0 >= $LIBXML_REQUIRED gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED libgnomeui-2.0 
>= $LIBGNOMEUI_REQUIRED gconf-2.0 >= $GCONF_REQUIRED $STARTUP_NOTIFICATION_PACKAGE)
diff -r e6e68aa0d897 -r 8e891888e0bc x11/gnome-desktop/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gnome-desktop/patches/patch-ab        Wed Dec 24 02:38:18 2008 +0000
@@ -0,0 +1,264 @@
+$NetBSD: patch-ab,v 1.3 2008/12/24 02:38:18 jmcneill Exp $
+
+--- libgnome-desktop/gnome-rr.c.orig   2008-12-23 21:17:22.000000000 -0500
++++ libgnome-desktop/gnome-rr.c        2008-12-23 21:30:26.000000000 -0500
+@@ -34,6 +34,11 @@
+ 
+ #define DISPLAY(o) ((o)->info->screen->xdisplay)
+ 
++#include "config.h"
++#if HAVE_DECL_XRRGETSCREENSIZERANGE > 0
++#define HAVE_XRANDR12
++#endif
++
+ typedef struct ScreenInfo ScreenInfo;
+ 
+ struct ScreenInfo
+@@ -43,7 +48,9 @@ struct ScreenInfo
+     int                       min_height;
+     int                       max_height;
+ 
++#ifdef HAVE_XRANDR12
+     XRRScreenResources *resources;
++#endif
+     
+     GnomeRROutput **  outputs;
+     GnomeRRCrtc **    crtcs;
+@@ -70,7 +77,9 @@ struct GnomeRRScreen
+ struct GnomeRROutput
+ {
+     ScreenInfo *      info;
++#ifdef HAVE_XRANDR12
+     RROutput          id;
++#endif
+     
+     char *            name;
+     GnomeRRCrtc *     current_crtc;
+@@ -86,13 +95,17 @@ struct GnomeRROutput
+ 
+ struct GnomeRROutputWrap
+ {
++#ifdef HAVE_XRANDR12
+     RROutput          id;
++#endif
+ };
+ 
+ struct GnomeRRCrtc
+ {
+     ScreenInfo *      info;
++#ifdef HAVE_XRANDR12
+     RRCrtc            id;
++#endif
+     
+     GnomeRRMode *     current_mode;
+     GnomeRROutput **  current_outputs;
+@@ -107,13 +120,16 @@ struct GnomeRRCrtc
+ struct GnomeRRMode
+ {
+     ScreenInfo *      info;
++#ifdef HAVE_XRANDR12
+     RRMode            id;
++#endif
+     char *            name;
+     int                       width;
+     int                       height;
+     int                       freq;           /* in mHz */
+ };
+ 
++#ifdef HAVE_XRANDR12
+ /* GnomeRRCrtc */
+ static GnomeRRCrtc *  crtc_new          (ScreenInfo         *info,
+                                        RRCrtc              id);
+@@ -135,7 +151,6 @@ static void           mode_initialize   
+                                        XRRModeInfo        *info);
+ static void           mode_free         (GnomeRRMode        *mode);
+ 
+-
+ /* Screen */
+ static GnomeRROutput *
+ gnome_rr_output_by_id (ScreenInfo *info, RROutput id)
+@@ -410,6 +425,7 @@ screen_on_event (GdkXEvent *xevent,
+     /* Pass the event on to GTK+ */
+     return GDK_FILTER_CONTINUE;
+ }
++#endif
+ 
+ /* Returns NULL if screen could not be created.  For instance, if
+  * the driver does not support Xrandr 1.2.
+@@ -419,6 +435,7 @@ gnome_rr_screen_new (GdkScreen *gdk_scre
+                    GnomeRRScreenChanged callback,
+                    gpointer data)
+ {
++#ifdef HAVE_XRANDR12
+     Display *dpy = GDK_SCREEN_XDISPLAY (gdk_screen);
+     int event_base;
+     int ignore;
+@@ -460,12 +477,14 @@ gnome_rr_screen_new (GdkScreen *gdk_scre
+       return screen;
+     }
+     
++#endif /* !HAVE_XRANDR12 */
+     return NULL;
+ }
+ 
+ void
+ gnome_rr_screen_destroy (GnomeRRScreen *screen)
+ {
++#ifdef HAVE_XRANDR12
+       g_return_if_fail (screen != NULL);
+ 
+       gdk_window_remove_filter (screen->gdk_root, screen_on_event, screen);
+@@ -474,6 +493,7 @@ gnome_rr_screen_destroy (GnomeRRScreen *
+       screen->info = NULL;
+ 
+       g_free (screen);
++#endif
+ }
+ 
+ void
+@@ -483,10 +503,12 @@ gnome_rr_screen_set_size (GnomeRRScreen 
+                         int       mm_width,
+                         int       mm_height)
+ {
++#ifdef HAVE_XRANDR12
+     g_return_if_fail (screen != NULL);
+     
+     XRRSetScreenSize (screen->xdisplay, screen->xroot,
+                     width, height, mm_width, mm_height);
++#endif
+ }
+ 
+ void
+@@ -514,7 +536,11 @@ gnome_rr_screen_get_ranges (GnomeRRScree
+ gboolean
+ gnome_rr_screen_refresh (GnomeRRScreen *screen)
+ {
++#ifdef HAVE_XRANDR12
+     return screen_update (screen, FALSE);
++#else
++    return FALSE;
++#endif
+ }
+ 
+ GnomeRRMode **
+@@ -553,11 +579,13 @@ gnome_rr_screen_get_crtc_by_id (GnomeRRS
+     g_return_val_if_fail (screen != NULL, NULL);
+     g_return_val_if_fail (screen->info != NULL, NULL);
+     
++#ifdef HAVE_XRANDR12
+     for (i = 0; screen->info->crtcs[i] != NULL; ++i)
+     {
+       if (screen->info->crtcs[i]->id == id)
+           return screen->info->crtcs[i];
+     }
++#endif
+     
+     return NULL;
+ }
+@@ -571,15 +599,18 @@ gnome_rr_screen_get_output_by_id (GnomeR
+     g_return_val_if_fail (screen != NULL, NULL);
+     g_return_val_if_fail (screen->info != NULL, NULL);
+     
++#ifdef HAVE_XRANDR12
+     for (i = 0; screen->info->outputs[i] != NULL; ++i)
+     {
+       if (screen->info->outputs[i]->id == id)
+           return screen->info->outputs[i];
+     }
++#endif
+     
+     return NULL;
+ }
+ 
++#ifdef HAVE_XRANDR12
+ /* GnomeRROutput */
+ static GnomeRROutput *
+ output_new (ScreenInfo *info, RROutput id)
+@@ -721,13 +752,18 @@ output_free (GnomeRROutput *output)
+ {
+     g_free (output);
+ }
++#endif /* !HAVE_XRANDR12 */
+ 
+ guint32
+ gnome_rr_output_get_id (GnomeRROutput *output)
+ {
+     g_assert(output != NULL);
+     
++#ifdef HAVE_XRANDR12
+     return output->id;
++#else
++    return 0;
++#endif
+ }
+ 
+ const guint8 *
+@@ -945,6 +981,7 @@ gnome_rr_crtc_set_config (GnomeRRCrtc   
+       g_return_val_if_fail (y + mode->height <= info->max_height, FALSE);
+     }
+     
++#ifdef HAVE_XRANDR12
+     output_ids = g_array_new (FALSE, FALSE, sizeof (RROutput));
+     
+     if (outputs)
+@@ -962,6 +999,9 @@ gnome_rr_crtc_set_config (GnomeRRCrtc   
+                              output_ids->len) == RRSetConfigSuccess;
+     
+     g_array_free (output_ids, TRUE);
++#else /* !HAVE_XRANDR12 */
++    result = FALSE;
++#endif
+     
+     return result;
+ }
+@@ -979,7 +1019,11 @@ gnome_rr_crtc_get_id (GnomeRRCrtc *crtc)
+ {
+     g_return_val_if_fail (crtc != NULL, 0);
+     
++#ifdef HAVE_XRANDR12
+     return crtc->id;
++#else
++    return 0;
++#endif
+ }
+ 
+ gboolean
+@@ -1038,6 +1082,7 @@ gnome_rr_crtc_supports_rotation (GnomeRR



Home | Main Index | Thread Index | Old Index