summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2008-12-24 02:38:18 +0000
committerjmcneill <jmcneill>2008-12-24 02:38:18 +0000
commitce1e22940246ebac7a98215f030ae3a26818b212 (patch)
treea90621b2998e8936fde7ad0bbbeaa5f0eed9f09c /x11
parent64388e213625b89f8011ad44ce43d97bc4ded115 (diff)
downloadpkgsrc-ce1e22940246ebac7a98215f030ae3a26818b212.tar.gz
Fix build with xrandr < 1.2 (like the one that comes with XFree86)
Diffstat (limited to 'x11')
-rw-r--r--x11/gnome-desktop/Makefile11
-rw-r--r--x11/gnome-desktop/distinfo4
-rw-r--r--x11/gnome-desktop/patches/patch-aa22
-rw-r--r--x11/gnome-desktop/patches/patch-ab264
4 files changed, 299 insertions, 2 deletions
diff --git a/x11/gnome-desktop/Makefile b/x11/gnome-desktop/Makefile
index 5d281813bf9..eb8470c0c3c 100644
--- a/x11/gnome-desktop/Makefile
+++ b/x11/gnome-desktop/Makefile
@@ -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 @@ GNU_CONFIGURE= yes
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 --git a/x11/gnome-desktop/distinfo b/x11/gnome-desktop/distinfo
index d763fe35563..b79d7ae7724 100644
--- a/x11/gnome-desktop/distinfo
+++ b/x11/gnome-desktop/distinfo
@@ -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 --git a/x11/gnome-desktop/patches/patch-aa b/x11/gnome-desktop/patches/patch-aa
new file mode 100644
index 00000000000..48ffb4ad511
--- /dev/null
+++ b/x11/gnome-desktop/patches/patch-aa
@@ -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 --git a/x11/gnome-desktop/patches/patch-ab b/x11/gnome-desktop/patches/patch-ab
new file mode 100644
index 00000000000..d708c0b0979
--- /dev/null
+++ b/x11/gnome-desktop/patches/patch-ab
@@ -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
+ return (crtc->rotations & rotation);
+ }
+
++#ifdef HAVE_XRANDR12
+ static GnomeRRCrtc *
+ crtc_new (ScreenInfo *info, RROutput id)
+ {
+@@ -1123,12 +1168,17 @@ mode_new (ScreenInfo *info, RRMode id)
+
+ return mode;
+ }
++#endif /* !HAVE_XRANDR12 */
+
+ guint32
+ gnome_rr_mode_get_id (GnomeRRMode *mode)
+ {
+ g_return_val_if_fail (mode != NULL, 0);
++#ifdef HAVE_XRANDR12
+ return mode->id;
++#else
++ return 0;
++#endif
+ }
+
+ guint
+@@ -1152,6 +1202,7 @@ gnome_rr_mode_get_height (GnomeRRMode *m
+ return mode->height;
+ }
+
++#ifdef HAVE_XRANDR12
+ static void
+ mode_initialize (GnomeRRMode *mode, XRRModeInfo *info)
+ {
+@@ -1170,3 +1221,4 @@ mode_free (GnomeRRMode *mode)
+ g_free (mode->name);
+ g_free (mode);
+ }
++#endif /* !HAVE_XRANDR12 */