[42988] trunk/dports/x11/xorg-libxcb

jeremyhu at macports.org jeremyhu at macports.org
Tue Dec 2 20:00:27 PST 2008


Revision: 42988
          http://trac.macports.org/changeset/42988
Author:   jeremyhu at macports.org
Date:     2008-12-02 20:00:26 -0800 (Tue, 02 Dec 2008)
Log Message:
-----------
xorg-libxcb: Include patch for the leopard launchd DISPLAY socket

Added Paths:
-----------
    trunk/dports/x11/xorg-libxcb/files/
    trunk/dports/x11/xorg-libxcb/files/launchd.patch

Added: trunk/dports/x11/xorg-libxcb/files/launchd.patch
===================================================================
--- trunk/dports/x11/xorg-libxcb/files/launchd.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-libxcb/files/launchd.patch	2008-12-03 04:00:26 UTC (rev 42988)
@@ -0,0 +1,71 @@
+diff -Naurp libxcb-1.1.orig/configure.ac libxcb-1.1/configure.ac
+--- configure.ac	2007-11-04 15:17:11.000000000 -0800
++++ configure.ac	2008-11-23 17:28:05.000000000 -0800
+@@ -90,6 +90,15 @@ AC_CONFIG_FILES([Makefile src/Makefile t
+ AC_CONFIG_FILES([xcb.pc xcb-xlib.pc xcb-composite.pc xcb-damage.pc xcb-dpms.pc xcb-glx.pc xcb-randr.pc xcb-record.pc xcb-render.pc xcb-res.pc xcb-screensaver.pc xcb-shape.pc xcb-shm.pc xcb-sync.pc xcb-xevie.pc xcb-xf86dri.pc xcb-xfixes.pc xcb-xinerama.pc xcb-xprint.pc xcb-xtest.pc xcb-xv.pc xcb-xvmc.pc])
+ AC_CONFIG_FILES([doc/xcb.doxygen])
+ 
++AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
++if test "x$LAUNCHD" = xauto; then
++      unset LAUNCHD
++      AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no])
++fi
++if test "x$LAUNCHD" = xyes ; then
++      AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
++fi
++
+ AC_OUTPUT
+ 
+ dnl Configuration output
+diff -Naurp libxcb-1.1.orig/src/xcb_util.c libxcb-1.1/src/xcb_util.c
+--- src/xcb_util.c	2007-10-23 09:44:59.000000000 -0700
++++ src/xcb_util.c	2008-11-23 17:27:12.000000000 -0800
+@@ -266,11 +266,22 @@ xcb_connection_t *xcb_connect(const char
+     char *protocol;
+     xcb_connection_t *c;
+     xcb_auth_info_t auth;
++    
++    int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp);
+ 
+-    if(!_xcb_parse_display(displayname, &host, &protocol, &display, screenp))
++#ifdef HAVE_LAUNCHD
++    if(!displayname)
++        displayname = getenv("DISPLAY");
++    if(displayname && strlen(displayname)>11 && !strncmp(displayname, "/tmp/launch", 11))
++        fd = _xcb_open_unix(NULL, displayname);
++    else
++#endif
++    if(!parsed)
+         return (xcb_connection_t *) &error_connection;
+-    fd = _xcb_open(host, protocol, display);
++    else
++        fd = _xcb_open(host, protocol, display);
+     free(host);
++
+     if(fd == -1)
+         return (xcb_connection_t *) &error_connection;
+ 
+@@ -291,10 +302,21 @@ xcb_connection_t *xcb_connect_to_display
+     char *host;
+     char *protocol;
+ 
+-    if(!_xcb_parse_display(displayname, &host, &protocol, &display, screenp))
++    int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp);
++    
++#ifdef HAVE_LAUNCHD
++    if(!displayname)
++        displayname = getenv("DISPLAY");
++    if(displayname && strlen(displayname)>11 && !strncmp(displayname, "/tmp/launch", 11))
++        fd = _xcb_open_unix(NULL, displayname);
++    else
++#endif
++    if(!parsed)
+         return (xcb_connection_t *) &error_connection;
+-    fd = _xcb_open(host, protocol, display);
++    else
++        fd = _xcb_open(host, protocol, display);
+     free(host);
++
+     if(fd == -1)
+         return (xcb_connection_t *) &error_connection;
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081202/fd26b239/attachment.html>


More information about the macports-changes mailing list