[46275] trunk/dports/x11/xorg-server
jeremyhu at macports.org
jeremyhu at macports.org
Sun Feb 1 15:34:48 PST 2009
Revision: 46275
http://trac.macports.org/changeset/46275
Author: jeremyhu at macports.org
Date: 2009-02-01 15:34:48 -0800 (Sun, 01 Feb 2009)
Log Message:
-----------
xorg-server: Version bump to 1.4.2-apple32 and support GLX on Tiger
Modified Paths:
--------------
trunk/dports/x11/xorg-server/Portfile
Added Paths:
-----------
trunk/dports/x11/xorg-server/files/tiger.indirect.patch
Removed Paths:
-------------
trunk/dports/x11/xorg-server/files/prefix.patch
trunk/dports/x11/xorg-server/files/vnc-workaround.patch
Modified: trunk/dports/x11/xorg-server/Portfile
===================================================================
--- trunk/dports/x11/xorg-server/Portfile 2009-02-01 23:20:03 UTC (rev 46274)
+++ trunk/dports/x11/xorg-server/Portfile 2009-02-01 23:34:48 UTC (rev 46275)
@@ -3,7 +3,7 @@
PortSystem 1.0
name xorg-server
-version 1.4.2-apple31
+version 1.4.2-apple32
categories x11 devel
maintainers jeremyhu openmaintainer
description The X.org / Xquartz X server.
@@ -18,10 +18,10 @@
distfiles xorg-server-$version.tar.bz2:xq \
MesaLib-${mesavers}.tar.bz2:mesa
-checksums xorg-server-1.4.2-apple31.tar.bz2 \
- md5 7b4c16698836ac1904227f53b1eeee75 \
- sha1 7d65a928dd7fd655cafff4fdebe3458276016974 \
- rmd160 e19742eb64c3ce73d2bb2be11d47083149f97f91 \
+checksums xorg-server-1.4.2-apple32.tar.bz2 \
+ md5 5e7a28a2b21e6d9308a7f7088ef2f3ae \
+ sha1 9a12c5f9142ccfc60fa51921ea97cd693eec12ca \
+ rmd160 3d7f7449ea5d3630689489c1adea20290cd1bbb4 \
MesaLib-7.0.4.tar.bz2 \
md5 8d7bacbe0234742a5d08c8088c4619e9 \
sha1 7e2ecbe89d245510d2681d04e959aee6adc205c5 \
@@ -57,7 +57,6 @@
port:xinit \
port:xorg-fonts
-# I'd prefer to keep pixman a port: dependency here for building the server
depends_lib \
port:libpixman \
port:xorg-libxkbfile \
@@ -66,6 +65,8 @@
port:xorg-libAppleWM \
port:xorg-libXfixes
+patchfiles tiger.indirect.patch
+
post-patch {
reinplace "s|ensure_path(X11BINDIR);|ensure_path(X11BINDIR); ensure_path(\"${x11prefix}/bin\");|" ${worksrcpath}/hw/xquartz/mach-startup/bundle-main.c
@@ -90,7 +91,6 @@
}
if {${os.major} < 9} {
- configure.args-append --disable-glx
post-install {
ui_msg "This server has not been thoroughly tested on Tiger. Your feedback would be welcomed on x11-users at macosforge.org."
}
Deleted: trunk/dports/x11/xorg-server/files/prefix.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/prefix.patch 2009-02-01 23:20:03 UTC (rev 46274)
+++ trunk/dports/x11/xorg-server/files/prefix.patch 2009-02-01 23:34:48 UTC (rev 46275)
@@ -1,572 +0,0 @@
-diff --git configure.ac configure.ac
-index 32ccf0c..6ce1dcd 100644
---- configure.ac
-+++ configure.ac
-@@ -64,6 +64,7 @@ AC_PROG_LEX
- AC_PROG_YACC
- AC_SYS_LARGEFILE
- XORG_PROG_RAWCPP
-+AC_PATH_PROG(SED,sed)
-
- dnl Check for dtrace program (needed to build Xserver dtrace probes)
- dnl Also checks for <sys/sdt.h>, since some Linux distros have an
-@@ -470,6 +471,14 @@ AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir
- [ APPLE_APPLICATIONS_DIR="${withval}" ],
- [ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ])
- AC_SUBST([APPLE_APPLICATIONS_DIR])
-+AC_ARG_WITH(apple-application-name,AS_HELP_STRING([--with-apple-application-name=NAME], [Name for the .app (default: X11)]),
-+ [ APPLE_APPLICATION_NAME="${withval}" ],
-+ [ APPLE_APPLICATION_NAME="X11" ])
-+AC_SUBST([APPLE_APPLICATION_NAME])
-+AC_ARG_WITH(apple-application-id,AS_HELP_STRING([--with-apple-application-id=VALUE], [CFBundleIdentification for the .app (default: org.x.X11)]),
-+ [ APPLE_APPLICATION_ID="${withval}" ],
-+ [ APPLE_APPLICATION_ID="org.x.X11" ])
-+AC_SUBST([APPLE_APPLICATION_ID])
- AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Build docs (default: disabled)]),
- [BUILDDOCS=$enableval],
- [BUILDDOCS=no])
-diff --git hw/xquartz/Makefile.am hw/xquartz/Makefile.am
-index d1eb283..e5e2e9e 100644
---- hw/xquartz/Makefile.am
-+++ hw/xquartz/Makefile.am
-@@ -7,7 +7,8 @@ AM_CPPFLAGS = \
- -DINXQUARTZ \
- -DUSE_NEW_CLUT \
- -DXFree86Server \
-- -I$(top_srcdir)/miext/rootless
-+ -I$(top_srcdir)/miext/rootless \
-+ -DX11LIBDIR=\"$(libdir)\"
-
- if GLX
- GL_DIR = GL
-diff --git hw/xquartz/X11Application.m hw/xquartz/X11Application.m
-index 2fe4ca7..d03d3b6 100644
---- hw/xquartz/X11Application.m
-+++ hw/xquartz/X11Application.m
-@@ -54,7 +54,7 @@
- // pbproxy/pbproxy.h
- extern BOOL xpbproxy_init (void);
-
--#define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist"
-+#define DEFAULTS_FILE X11LIBDIR"/X11/xserver/Xquartz.plist"
-
- #ifndef XSERVER_VERSION
- #define XSERVER_VERSION "?"
-diff --git hw/xquartz/X11Controller.m hw/xquartz/X11Controller.m
-index 67a80d3..7222f46 100644
---- hw/xquartz/X11Controller.m
-+++ hw/xquartz/X11Controller.m
-@@ -314,65 +314,79 @@ BOOL xquartz_resetenv_display = NO;
-
- - (void) launch_client:(NSString *)filename
- {
-- const char *command = [filename UTF8String];
-- const char *argv[7];
-- int child1, child2 = 0;
-- int status;
--
-- argv[0] = "/usr/bin/login";
-- argv[1] = "-fp";
-- argv[2] = getlogin();
-- argv[3] = [X11App prefs_get_string:@PREFS_LOGIN_SHELL default:"/bin/sh"];
-- argv[4] = "-c";
-- argv[5] = command;
-- argv[6] = NULL;
--
-- /* Do the fork-twice trick to avoid having to reap zombies */
-+ const char *command = [filename UTF8String];
-+ int child1, child2 = 0;
-+ int status;
-+ char newcommand[1024];
-+ char *newargv[1024];
-+ char buf[128];
-+ size_t newargc;
-+ char *s;
-
-- child1 = fork();
-+ if(strlen(command) > 1023) {
-+ fprintf(stderr, "Error: command is too long: %s\n", command);
-+ return;
-+ }
-+
-+ strlcpy(newcommand, command, 1024);
-
-- switch (child1) {
-- case -1: /* error */
-- break;
-+ for(newargc=0, s=newcommand; *s; newargc++) {
-+ for(; *s && *s == ' '; s++);
-+ if(!*s)
-+ break;
-+
-+ newargv[newargc] = s;
-+ for(; *s && *s != ' '; s++);
-+
-+ if(*s) {
-+ *s='\0';
-+ s++;
-+ }
-+ }
-+ newargv[newargc] = NULL;
-+
-+ s = getenv("DISPLAY");
-+ if (xquartz_resetenv_display || s == NULL || s[0] == 0) {
-+ snprintf(buf, sizeof(buf), ":%s", display);
-+ setenv("DISPLAY", buf, TRUE);
-+ }
-+
-+ /* Do the fork-twice trick to avoid having to reap zombies */
-+ child1 = fork();
-+ switch (child1) {
-+ case -1: /* error */
-+ break;
-
-- case 0: /* child1 */
-- child2 = fork();
-+ case 0: /* child1 */
-+ child2 = fork();
-
-- switch (child2) {
-- int max_files, i;
-- char buf[1024], *temp;
--
-- case -1: /* error */
-- _exit(1);
--
-- case 0: /* child2 */
-- /* close all open files except for standard streams */
-- max_files = sysconf(_SC_OPEN_MAX);
-- for (i = 3; i < max_files; i++) close(i);
--
-- /* ensure stdin is on /dev/null */
-- close(0);
-- open("/dev/null", O_RDONLY);
--
-- /* Setup environment */
-- temp = getenv("DISPLAY");
-- if (xquartz_resetenv_display || temp == NULL || temp[0] == 0) {
-- snprintf(buf, sizeof(buf), ":%s", display);
-- setenv("DISPLAY", buf, TRUE);
-- }
--
-- execvp(argv[0], (char **const) argv);
--
-- _exit(2);
--
-- default: /* parent (child1) */
-- _exit(0);
-- }
-- break;
-+ switch (child2) {
-+ int max_files, i;
-+
-+ case -1: /* error */
-+ _exit(1);
-+
-+ case 0: /* child2 */
-+ /* close all open files except for standard streams */
-+ max_files = sysconf(_SC_OPEN_MAX);
-+ for(i = 3; i < max_files; i++)
-+ close(i);
-+
-+ /* ensure stdin is on /dev/null */
-+ close(0);
-+ open("/dev/null", O_RDONLY);
-+
-+ execvp(newargv[0], (char **const) newargv);
-+ _exit(2);
-+
-+ default: /* parent (child1) */
-+ _exit(0);
-+ }
-+ break;
-
-- default: /* parent */
-- waitpid(child1, &status, 0);
-- }
-+ default: /* parent */
-+ waitpid(child1, &status, 0);
-+ }
- }
-
- - (void) app_selected:sender
-diff --git hw/xquartz/bundle/Info.plist hw/xquartz/bundle/Info.plist
-deleted file mode 100644
-index f4a9287..0000000
---- hw/xquartz/bundle/Info.plist
-+++ /dev/null
-@@ -1,39 +0,0 @@
--<?xml version="1.0" encoding="UTF-8"?>
--<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
--<plist version="1.0">
--<dict>
-- <key>CFBundleDevelopmentRegion</key>
-- <string>English</string>
-- <key>CFBundleExecutable</key>
-- <string>X11</string>
-- <key>CFBundleGetInfoString</key>
-- <string>X11</string>
-- <key>CFBundleIconFile</key>
-- <string>X11.icns</string>
-- <key>CFBundleIdentifier</key>
-- <string>org.x.X11</string>
-- <key>CFBundleInfoDictionaryVersion</key>
-- <string>6.0</string>
-- <key>CFBundleName</key>
-- <string>X11</string>
-- <key>CFBundlePackageType</key>
-- <string>APPL</string>
-- <key>CFBundleShortVersionString</key>
-- <string>2.3.2</string>
-- <key>CFBundleVersion</key>
-- <string>2.3.2</string>
-- <key>CFBundleSignature</key>
-- <string>x11a</string>
-- <key>CSResourcesFileMapped</key>
-- <true/>
-- <key>NSHumanReadableCopyright</key>
-- <string>Copyright © 2003-2008, Apple Inc.
--Copyright © 2003, XFree86 Project, Inc.
--Copyright © 2003-2008, X.org Foundation, Inc.
--</string>
-- <key>NSMainNibFile</key>
-- <string>main</string>
-- <key>NSPrincipalClass</key>
-- <string>X11Application</string>
--</dict>
--</plist>
-diff --git hw/xquartz/bundle/Info.plist.cpp hw/xquartz/bundle/Info.plist.cpp
-new file mode 100644
-index 0000000..9713289
---- /dev/null
-+++ hw/xquartz/bundle/Info.plist.cpp
-@@ -0,0 +1,39 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-+<plist version="1.0">
-+<dict>
-+ <key>CFBundleDevelopmentRegion</key>
-+ <string>English</string>
-+ <key>CFBundleExecutable</key>
-+ <string>X11.sh</string>
-+ <key>CFBundleGetInfoString</key>
-+ <string>APPLE_APPLICATION_NAME</string>
-+ <key>CFBundleIconFile</key>
-+ <string>X11.icns</string>
-+ <key>CFBundleIdentifier</key>
-+ <string>APPLE_APPLICATION_ID</string>
-+ <key>CFBundleInfoDictionaryVersion</key>
-+ <string>6.0</string>
-+ <key>CFBundleName</key>
-+ <string>APPLE_APPLICATION_NAME</string>
-+ <key>CFBundlePackageType</key>
-+ <string>APPL</string>
-+ <key>CFBundleShortVersionString</key>
-+ <string>2.3.2</string>
-+ <key>CFBundleVersion</key>
-+ <string>2.3.2</string>
-+ <key>CFBundleSignature</key>
-+ <string>x11a</string>
-+ <key>CSResourcesFileMapped</key>
-+ <true/>
-+ <key>NSHumanReadableCopyright</key>
-+ <string>Copyright © 2003-2008, Apple Inc.
-+Copyright © 2003, XFree86 Project, Inc.
-+Copyright © 2003-2008, X.org Foundation, Inc.
-+</string>
-+ <key>NSMainNibFile</key>
-+ <string>main</string>
-+ <key>NSPrincipalClass</key>
-+ <string>X11Application</string>
-+</dict>
-+</plist>
-diff --git hw/xquartz/bundle/Makefile.am hw/xquartz/bundle/Makefile.am
-index 7b76f84..03fa1dd 100644
---- hw/xquartz/bundle/Makefile.am
-+++ hw/xquartz/bundle/Makefile.am
-@@ -1,12 +1,24 @@
-+include cpprules.in
-+
-+CPP_FILES_FLAGS = \
-+ -DAPPLE_APPLICATION_ID="$(APPLE_APPLICATION_ID)" \
-+ -DAPPLE_APPLICATION_NAME="$(APPLE_APPLICATION_NAME)"
-+
- install-data-hook:
-- ./mk_bundke.sh $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/X11.app
-+ ./mk_bundke.sh $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app
-+
-+noinst_PRE = Info.plist.cpp
-+noinst_DATA = $(noinst_PRE:plist.cpp=plist)
-+
-+CLEANFILES = $(noinst_DATA)
-
- resourcedir=$(libdir)/X11/xserver
- resource_DATA = Xquartz.plist
-
- EXTRA_DIST = \
- mk_bundke.sh \
-- Info.plist \
-+ X11.sh \
-+ Info.plist.cpp \
- PkgInfo \
- $(resource_DATA) \
- Resources/da.lproj/InfoPlist.strings \
-diff --git hw/xquartz/bundle/X11.sh hw/xquartz/bundle/X11.sh
-new file mode 100755
-index 0000000..5e00a82
---- /dev/null
-+++ hw/xquartz/bundle/X11.sh
-@@ -0,0 +1,3 @@
-+#!/bin/bash --login
-+
-+"$(dirname $0)"/X11 "${@}"
-diff --git hw/xquartz/bundle/cpprules.in hw/xquartz/bundle/cpprules.in
-new file mode 100644
-index 0000000..f32eafc
---- /dev/null
-+++ hw/xquartz/bundle/cpprules.in
-@@ -0,0 +1,37 @@
-+# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
-+# to cpp, because that trick does not work on all ANSI C preprocessors.
-+# Delete line numbers from the cpp output (-P is not portable, I guess).
-+# Allow XCOMM to be preceded by whitespace and provide a means of generating
-+# output lines with trailing backslashes.
-+# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
-+
-+CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
-+ -e '/^\#line *[0-9][0-9]* *.*$$/d' \
-+ -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
-+ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
-+ -e '/^[ ]*XHASH/s/XHASH/\#/' \
-+ -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \
-+ -e '/\@\@$$/s/\@\@$$/\\/'
-+
-+# Strings to replace in man pages
-+XORGRELSTRING = @PACKAGE_STRING@
-+ XORGMANNAME = X Version 11
-+
-+MANDEFS = \
-+ -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
-+ -D__appmansuffix__=$(APP_MAN_SUFFIX) \
-+ -D__filemansuffix__=$(FILE_MAN_SUFFIX) \
-+ -D__libmansuffix__=$(LIB_MAN_SUFFIX) \
-+ -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
-+ -D__XSERVERNAME__=Xorg -D__XCONFIGFILE__=xorg.conf \
-+ -D__xinitdir__=$(XINITDIR) \
-+ -D__bindir__=$(bindir) \
-+ -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS)
-+
-+SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp
-+
-+.cpp:
-+ $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
-+
-+.man.$(APP_MAN_SUFFIX):
-+ $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
-diff --git hw/xquartz/bundle/mk_bundke.sh hw/xquartz/bundle/mk_bundke.sh
-index 0b2a144..5c5733a 100755
---- hw/xquartz/bundle/mk_bundke.sh
-+++ hw/xquartz/bundle/mk_bundke.sh
-@@ -20,6 +20,9 @@ install -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
- install -m 644 Info.plist ${BUNDLE_ROOT}/Contents
- install -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
-
-+mkdir -p ${BUNDLE_ROOT}/Contents/MacOS
-+install -m 755 X11.sh ${BUNDLE_ROOT}/Contents/MacOS
-+
- if [[ $(id -u) == 0 ]] ; then
- chown -R root:admin ${BUNDLE_ROOT}
- fi
-diff --git hw/xquartz/mach-startup/bundle-main.c hw/xquartz/mach-startup/bundle-main.c
-index 0e4ed34..7677a9a 100644
---- hw/xquartz/mach-startup/bundle-main.c
-+++ hw/xquartz/mach-startup/bundle-main.c
-@@ -59,8 +59,8 @@ extern int noPanoramiXExtension;
-
- extern int xquartz_resetenv_display;
-
--#define DEFAULT_CLIENT "/usr/X11/bin/xterm"
--#define DEFAULT_STARTX "/usr/X11/bin/startx"
-+#define DEFAULT_CLIENT X11BINDIR "/xterm"
-+#define DEFAULT_STARTX X11BINDIR "/startx"
- #define DEFAULT_SHELL "/bin/sh"
-
- #ifndef BUILD_DATE
-@@ -278,8 +278,12 @@ static int create_socket(char *filename_out) {
- return 0;
- }
-
-+static int launchd_socket_handed_off = 0;
-+
- kern_return_t do_request_fd_handoff_socket(mach_port_t port, string_t filename) {
- socket_handoff_t *handoff_data;
-+
-+ launchd_socket_handed_off = 1;
-
- handoff_data = (socket_handoff_t *)calloc(1,sizeof(socket_handoff_t));
- if(!handoff_data) {
-@@ -318,6 +322,12 @@ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv,
- char **_envp = alloca((envpCnt + 1) * sizeof(char *));
- size_t i;
-
-+ /* If we didn't get handed a launchd DISPLAY socket, we shoul
-+ * unset DISPLAY or we can run into problems with pbproxy
-+ */
-+ if(!launchd_socket_handed_off)
-+ unsetenv("DISPLAY");
-+
- if(!_argv || !_envp) {
- return KERN_FAILURE;
- }
-@@ -420,19 +430,49 @@ int startup_trigger(int argc, char **argv, char **envp) {
- }
-
- /** Setup the environment we want our child processes to inherit */
--static void setup_env() {
-+static void ensure_path(const char *dir) {
- char buf[1024], *temp;
--
-+
- /* Make sure /usr/X11/bin is in the $PATH */
- temp = getenv("PATH");
- if(temp == NULL || temp[0] == 0) {
-- snprintf(buf, sizeof(buf), "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:%s", X11BINDIR);
-+ snprintf(buf, sizeof(buf), "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:%s", dir);
- setenv("PATH", buf, TRUE);
- } else if(strnstr(temp, X11BINDIR, sizeof(temp)) == NULL) {
-- snprintf(buf, sizeof(buf), "%s:%s", temp, X11BINDIR);
-+ snprintf(buf, sizeof(buf), "%s:%s", temp, dir);
- setenv("PATH", buf, TRUE);
- }
-+}
-+
-+static void setup_env() {
-+ char *temp;
-+ const char *pds = NULL;
-+
-+ /* Pass on our prefs domain to startx and its inheritors (mainly for
-+ * quartz-wm and the Xquartz stub's MachIPC)
-+ */
-+ CFBundleRef bundle = CFBundleGetMainBundle();
-+ if(bundle) {
-+ CFStringRef pd = CFBundleGetIdentifier(bundle);
-+ if(pd) {
-+ pds = CFStringGetCStringPtr(pd, 0);
-+ if(pds) {
-+ server_bootstrap_name = malloc(sizeof(char) * (strlen(pds) + 1));
-+ strcpy(server_bootstrap_name, pds);
-+ setenv("X11_PREFS_DOMAIN", pds, 1);
-+ }
-+ }
-+ }
-
-+ /* If we're not org.x.X11, we want to unset DISPLAY, so we don't
-+ * use the launchd DISPLAY socket.
-+ */
-+ if(pds == NULL || strcmp(pds, "org.x.X11") != 0)
-+ unsetenv("DISPLAY");
-+
-+ /* Make sure PATH is right */
-+ ensure_path(X11BINDIR);
-+
- /* cd $HOME */
- temp = getenv("HOME");
- if(temp != NULL && temp[0] != '\0')
-@@ -455,22 +495,6 @@ int main(int argc, char **argv, char **envp) {
-
- /* Setup the initial crasherporter info */
- strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len);
--
-- /* Pass on our prefs domain to startx and its inheritors (mainly for
-- * quartz-wm and the Xquartz stub's MachIPC)
-- */
-- CFBundleRef bundle = CFBundleGetMainBundle();
-- if(bundle) {
-- CFStringRef pd = CFBundleGetIdentifier(bundle);
-- if(pd) {
-- const char *pds = CFStringGetCStringPtr(pd, 0);
-- if(pds) {
-- server_bootstrap_name = malloc(sizeof(char) * (strlen(pds) + 1));
-- strcpy(server_bootstrap_name, pds);
-- setenv("X11_PREFS_DOMAIN", pds, 1);
-- }
-- }
-- }
-
- fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
- for(i=0; i < argc; i++) {
-@@ -505,22 +529,39 @@ int main(int argc, char **argv, char **envp) {
-
- return EXIT_SUCCESS;
- }
--
--static int execute(const char *command) {
-- const char *newargv[7];
-- const char **s;
-
-- newargv[0] = "/usr/bin/login";
-- newargv[1] = "-fp";
-- newargv[2] = getlogin();
-- newargv[3] = command_from_prefs("login_shell", DEFAULT_SHELL);
-- newargv[4] = "-c";
-- newargv[5] = command;
-- newargv[6] = NULL;
-+static int execute(const char *command) {
-+ char newcommand[1024];
-+ char *newargv[1024];
-+ size_t newargc;
-+ char *s;
-+ char **p;
-+
-+ if(strlen(command) > 1023) {
-+ fprintf(stderr, "Error: command is too long: %s\n", command);
-+ return 1;
-+ }
-+
-+ strlcpy(newcommand, command, 1024);
-+
-+ for(newargc=0, s=newcommand; *s; newargc++) {
-+ for(; *s && *s == ' '; s++);
-+ if(!*s)
-+ break;
-+
-+ newargv[newargc] = s;
-+ for(; *s && *s != ' '; s++);
-+
-+ if(*s) {
-+ *s='\0';
-+ s++;
-+ }
-+ }
-+ newargv[newargc] = NULL;
-
- fprintf(stderr, "X11.app: Launching %s:\n", command);
-- for(s=newargv; *s; s++) {
-- fprintf(stderr, "\targv[%ld] = %s\n", (long int)(s - newargv), *s);
-+ for(p=newargv; *p; p++) {
-+ fprintf(stderr, "\targv[%ld] = %s\n", (long int)(p - newargv), *p);
- }
-
- execvp (newargv[0], (char * const *) newargv);
-diff --git hw/xquartz/xpr/xprScreen.c hw/xquartz/xpr/xprScreen.c
-index 18406b8..b813727 100644
---- hw/xquartz/xpr/xprScreen.c
-+++ hw/xquartz/xpr/xprScreen.c
-@@ -279,7 +279,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
-
- switch(depth) {
- case -8: // broken
-- FatalError("Unsupported color depth %d\n", darwinDesiredDepth);
-+ FatalError("Unsupported color depth %d %d\n", darwinDesiredDepth, depth);
- dfb->visuals = (1 << StaticGray) | (1 << GrayScale);
- dfb->preferredCVC = GrayScale;
- dfb->depth = 8;
-@@ -320,7 +320,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
- dfb->blueMask = 0x000000ff;
- break;
- default:
-- FatalError("Unsupported color depth %d\n", darwinDesiredDepth);
-+ FatalError("Unsupported color depth %d %d\n", darwinDesiredDepth, depth);
- }
-
- if (noPseudoramiXExtension)
Added: trunk/dports/x11/xorg-server/files/tiger.indirect.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/tiger.indirect.patch (rev 0)
+++ trunk/dports/x11/xorg-server/files/tiger.indirect.patch 2009-02-01 23:34:48 UTC (rev 46275)
@@ -0,0 +1,88 @@
+diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
+index 504b637..c4e2824 100644
+--- hw/xquartz/GL/indirect.c
++++ hw/xquartz/GL/indirect.c
+@@ -37,6 +37,13 @@
+
+ #include "dri.h"
+
++#include <AvailabilityMacros.h>
++
++/*
++ * These define seem questionable to me, but I'm not sure why they were here
++ * in the first place.
++ */
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ #define GL_EXT_histogram 1
+ #define GL_EXT_polygon_offset 1
+ #define GL_SGIS_pixel_texture 1
+@@ -53,6 +60,7 @@
+ #define GL_APPLE_fence 1
+ #define GL_IBM_multimode_draw_arrays 1
+ #define GL_EXT_fragment_shader 1
++#endif
+
+ #include <OpenGL/OpenGL.h>
+ #include <OpenGL/CGLContext.h>
+@@ -1283,7 +1291,9 @@ static void setup_dispatch_table(void) {
+ SET_BlendEquationSeparateEXT(disp, glBlendEquationSeparateEXT);
+ SET_BlendFunc(disp, glBlendFunc);
+ SET_BlendFuncSeparateEXT(disp, glBlendFuncSeparateEXT);
++#if MAC_OS_X_VERSION_MIN_REQUIRED > 1050
+ SET_BlitFramebufferEXT(disp, glBlitFramebufferEXT);
++#endif
+ SET_BufferDataARB(disp, glBufferDataARB);
+ SET_BufferSubDataARB(disp, glBufferSubDataARB);
+ SET_CallList(disp, glCallList);
+@@ -1340,12 +1350,16 @@ static void setup_dispatch_table(void) {
+ SET_ColorTable(disp, glColorTable);
+ SET_ColorTableParameterfv(disp, glColorTableParameterfv);
+ SET_ColorTableParameteriv(disp, glColorTableParameteriv);
++
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ SET_CombinerInputNV(disp, glCombinerInputNV);
+ SET_CombinerOutputNV(disp, glCombinerOutputNV);
+ SET_CombinerParameterfNV(disp, glCombinerParameterfNV);
+ SET_CombinerParameterfvNV(disp, glCombinerParameterfvNV);
+ SET_CombinerParameteriNV(disp, glCombinerParameteriNV);
+ SET_CombinerParameterivNV(disp, glCombinerParameterivNV);
++#endif
+ SET_CompileShaderARB(disp, glCompileShaderARB);
+ SET_CompressedTexImage1DARB(disp, glCompressedTexImage1DARB);
+ SET_CompressedTexImage2DARB(disp, glCompressedTexImage2DARB);
+@@ -1423,7 +1437,10 @@ static void setup_dispatch_table(void) {
+ SET_EvalPoint2(disp, glEvalPoint2);
+ //SET_ExecuteProgramNV(disp, glExecuteProgramNV);
+ SET_FeedbackBuffer(disp, glFeedbackBuffer);
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ SET_FinalCombinerInputNV(disp, glFinalCombinerInputNV);
++#endif
+ SET_Finish(disp, glFinish);
+ SET_FinishFenceNV(disp, glFinishFenceAPPLE); // <-- APPLE -> NV
+ SET_Flush(disp, glFlush);
+@@ -1465,10 +1482,12 @@ static void setup_dispatch_table(void) {
+ SET_GetColorTable(disp, glGetColorTable);
+ SET_GetColorTableParameterfv(disp, glGetColorTableParameterfv);
+ SET_GetColorTableParameteriv(disp, glGetColorTableParameteriv);
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ SET_GetCombinerInputParameterfvNV(disp, glGetCombinerInputParameterfvNV);
+ SET_GetCombinerInputParameterivNV(disp, glGetCombinerInputParameterivNV);
+ SET_GetCombinerOutputParameterfvNV(disp, glGetCombinerOutputParameterfvNV);
+ SET_GetCombinerOutputParameterivNV(disp, glGetCombinerOutputParameterivNV);
++#endif
+ SET_GetCompressedTexImageARB(disp, glGetCompressedTexImageARB);
+ SET_GetConvolutionFilter(disp, glGetConvolutionFilter);
+ SET_GetConvolutionParameterfv(disp, glGetConvolutionParameterfv);
+@@ -1476,8 +1495,10 @@ static void setup_dispatch_table(void) {
+ SET_GetDoublev(disp, glGetDoublev);
+ SET_GetError(disp, glGetError);
+ //SET_GetFenceivNV(disp, glGetFenceivNV);
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ SET_GetFinalCombinerInputParameterfvNV(disp, glGetFinalCombinerInputParameterfvNV);
+ SET_GetFinalCombinerInputParameterivNV(disp, glGetFinalCombinerInputParameterivNV);
++#endif
+ SET_GetFloatv(disp, glGetFloatv);
+ SET_GetFramebufferAttachmentParameterivEXT(disp, glGetFramebufferAttachmentParameterivEXT);
+ SET_GetHandleARB(disp, glGetHandleARB);
Deleted: trunk/dports/x11/xorg-server/files/vnc-workaround.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/vnc-workaround.patch 2009-02-01 23:20:03 UTC (rev 46274)
+++ trunk/dports/x11/xorg-server/files/vnc-workaround.patch 2009-02-01 23:34:48 UTC (rev 46275)
@@ -1,207 +0,0 @@
-diff --git a/hw/xquartz/X11Application.m xorg-server-1.4.2-apple30hw/xquartz/X11Application.m
-index 990c008..90077fe 100644
---- hw/xquartz/X11Application.m
-+++ hw/xquartz/X11Application.m
-@@ -63,13 +63,8 @@ extern BOOL xpbproxy_init (void);
- #define ProximityIn 0
- #define ProximityOut 1
-
--/* workaround a bug in vnc for those hit by a bug in Remote Desktop on OSX */
--#define VNCMODIFIERBUGWORKAROUND 1
--
--#ifdef VNCMODIFIERBUGWORKAROUND
--static BOOL vncModifierBugWorkaround = YES;
-+/* Stuck modifier / button state... force release when we context switch */
- static NSEventType keyState[NUM_KEYCODES];
--#endif
-
- int X11EnableKeyEquivalents = TRUE, quartzFullscreenMenu = FALSE;
- int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
-@@ -187,41 +182,36 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
-
- - (void) activateX:(OSX_BOOL)state {
- /* Create a TSM document that supports full Unicode input, and
-- * have it activated while X is active
-- */
-+ have it activated while X is active */
- static TSMDocumentID x11_document;
--#ifdef VNCMODIFIERBUGWORKAROUND
- size_t i;
--#endif
- DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active)
- if (state) {
- DarwinSendDDXEvent(kXquartzActivate, 0);
--
-+
- if (!_x_active) {
- if (x11_document == 0) {
- OSType types[1];
- types[0] = kUnicodeDocument;
- NewTSMDocument (1, types, &x11_document, 0);
- }
--
-+
- if (x11_document != 0) ActivateTSMDocument (x11_document);
- }
- } else {
--#ifdef VNCMODIFIERBUGWORKAROUND
-- if(vncModifierBugWorkaround) {
-- DarwinUpdateModKeys(0);
-- for(i=0; i < NUM_KEYCODES; i++) {
-- if(keyState[i] == NSKeyDown)
-- DarwinSendKeyboardEvents(KeyRelease, i);
-- }
-+
-+ DarwinUpdateModKeys(0);
-+ for(i=0; i < NUM_KEYCODES; i++) {
-+ if(keyState[i] == NSKeyDown)
-+ DarwinSendKeyboardEvents(KeyRelease, i);
- }
--#endif
-- DarwinSendDDXEvent(kXquartzDeactivate, 0);
-
-+ DarwinSendDDXEvent(kXquartzDeactivate, 0);
-+
- if (_x_active && x11_document != 0)
- DeactivateTSMDocument (x11_document);
- }
--
-+
- _x_active = state;
- }
-
-@@ -697,11 +687,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
- {
- NSString *nsstr;
- const char *tem;
--
--#ifdef VNCMODIFIERBUGWORKAROUND
-- vncModifierBugWorkaround = [self prefs_get_boolean:@"vncModifierBugWorkaround" default:vncModifierBugWorkaround];
--#endif
--
-+
- quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP
- default:quartzUseSysBeep];
- quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS
-@@ -884,10 +870,7 @@ environment the next time you start X11?", @"Startup xinitrc dialog");
-
- void X11ApplicationMain (int argc, char **argv, char **envp) {
- NSAutoreleasePool *pool;
--#ifdef VNCMODIFIERBUGWORKAROUND
-- size_t i;
--#endif
--
-+
- #ifdef DEBUG
- while (access ("/tmp/x11-block", F_OK) == 0) sleep (1);
- #endif
-@@ -904,14 +887,6 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
- selector:@selector (became_key:)
- name:NSWindowDidBecomeKeyNotification object:nil];
-
--#ifdef VNCMODIFIERBUGWORKAROUND
-- if(vncModifierBugWorkaround) {
-- for(i=0; i < NUM_KEYCODES; i++) {
-- keyState[i] = NSKeyUp;
-- }
-- }
--#endif
--
- /*
- * The xpr Quartz mode is statically linked into this server.
- * Initialize all the Quartz functions.
-@@ -957,6 +932,18 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
- @implementation X11Application (Private)
- extern int darwin_modifier_flags; // darwinEvents.c
-
-+#ifdef NX_DEVICELCMDKEYMASK
-+/* This is to workaround a bug in the VNC server where we sometimes see the L
-+ * modifier and sometimes see no "side"
-+ */
-+static inline int ensure_flag(int flags, int device_independent, int device_dependents, int device_dependent_default) {
-+ if( (flags & device_independent) &&
-+ !(flags & device_dependents))
-+ flags |= device_dependent_default;
-+ return flags;
-+}
-+#endif
-+
- - (void) sendX11NSEvent:(NSEvent *)e {
- NSRect screen;
- NSPoint location;
-@@ -964,6 +951,7 @@ extern int darwin_modifier_flags; // darwinEvents.c
- int ev_button, ev_type;
- float pointer_x, pointer_y, pressure, tilt_x, tilt_y;
- DeviceIntPtr pDev;
-+ int modifierFlags;
-
- /* convert location to be relative to top-left of primary display */
- location = [e locationInWindow];
-@@ -984,17 +972,34 @@ extern int darwin_modifier_flags; // darwinEvents.c
- pressure = 0;
- tilt_x = 0;
- tilt_y = 0;
-+
-+ modifierFlags = [e modifierFlags];
-+
-+ /* These are the "only" modifier keys we care about */
-+ modifierFlags &= (NX_COMMANDMASK | NX_CONTROLMASK | NX_ALTERNATEMASK | NX_SHIFTMASK |
-+ NX_SECONDARYFNMASK | NX_ALPHASHIFTMASK | NX_NUMERICPADMASK |
-+ NX_HELPMASK | NX_DEVICELCTLKEYMASK | NX_DEVICELSHIFTKEYMASK |
-+ NX_DEVICERSHIFTKEYMASK | NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK |
-+ NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK | NX_DEVICERCTLKEYMASK);
-+
-+#ifdef NX_DEVICELCMDKEYMASK
-+ /* This is to workaround a bug in the VNC server where we sometimes see the L
-+ * modifier and sometimes see no "side"
-+ */
-+ modifierFlags = ensure_flag(modifierFlags, NX_CONTROLMASK, NX_DEVICELCTLKEYMASK | NX_DEVICERCTLKEYMASK, NX_DEVICELCTLKEYMASK);
-+ modifierFlags = ensure_flag(modifierFlags, NX_SHIFTMASK, NX_DEVICELSHIFTKEYMASK | NX_DEVICERSHIFTKEYMASK, NX_DEVICELSHIFTKEYMASK);
-+ modifierFlags = ensure_flag(modifierFlags, NX_COMMANDMASK, NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK, NX_DEVICELCMDKEYMASK);
-+ modifierFlags = ensure_flag(modifierFlags, NX_ALTERNATEMASK, NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK, NX_DEVICELALTKEYMASK);
-+#endif
-
- /* We don't receive modifier key events while out of focus, and 3button
- * emulation mucks this up, so we need to check our modifier flag state
- * on every event... ugg
- */
--#ifdef VNCMODIFIERBUGWORKAROUND
-- if(!vncModifierBugWorkaround)
--#endif
-- if(darwin_modifier_flags != [e modifierFlags])
-- DarwinUpdateModKeys([e modifierFlags]);
--
-+
-+ if(darwin_modifier_flags != modifierFlags)
-+ DarwinUpdateModKeys(modifierFlags);
-+
- switch ([e type]) {
- case NSLeftMouseDown: ev_button=1; ev_type=ButtonPress; goto handle_mouse;
- case NSOtherMouseDown: ev_button=2; ev_type=ButtonPress; goto handle_mouse;
-@@ -1133,21 +1138,14 @@ extern int darwin_modifier_flags; // darwinEvents.c
- }
- }
-
--#ifdef VNCMODIFIERBUGWORKAROUND
-- if(vncModifierBugWorkaround)
-- keyState[[e keyCode]] == [e type];
--#endif
-+ /* Avoid stuck keys on context switch */
-+ if(keyState[[e keyCode]] == [e type])
-+ return;
-+ keyState[[e keyCode]] = [e type];
-
- DarwinSendKeyboardEvents(([e type] == NSKeyDown) ? KeyPress : KeyRelease, [e keyCode]);
- break;
--
--#ifdef VNCMODIFIERBUGWORKAROUND
-- case NSFlagsChanged:
-- if(vncModifierBugWorkaround)
-- DarwinUpdateModKeys([e modifierFlags]);
-- break;
--#endif
--
-+
- default: break; /* for gcc */
- }
- }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090201/7e6635a4/attachment-0001.html>
More information about the macports-changes
mailing list