[62349] trunk/dports/sysutils/screen
ryandesign at macports.org
ryandesign at macports.org
Mon Jan 4 16:22:07 PST 2010
Revision: 62349
http://trac.macports.org/changeset/62349
Author: ryandesign at macports.org
Date: 2010-01-04 16:22:05 -0800 (Mon, 04 Jan 2010)
Log Message:
-----------
screen: fix build on snow leopard; see #20862 (maintainer timeout)
Modified Paths:
--------------
trunk/dports/sysutils/screen/Portfile
trunk/dports/sysutils/screen/files/patch-screen.c
Added Paths:
-----------
trunk/dports/sysutils/screen/files/patch-process.c
Modified: trunk/dports/sysutils/screen/Portfile
===================================================================
--- trunk/dports/sysutils/screen/Portfile 2010-01-05 00:01:40 UTC (rev 62348)
+++ trunk/dports/sysutils/screen/Portfile 2010-01-05 00:22:05 UTC (rev 62349)
@@ -67,6 +67,17 @@
patchfiles-append patch-Makefile.in patch-config.h.in patch-configure patch-pty.c patch-window.c patch-screen.c
}
+platform darwin 10 {
+ # These patches are based on http://www.opensource.apple.com/source/screen/screen-16/patches/
+ # The vproc_priv.h is the private header from launchd, used in Apple's 10.6 screen patches
+ # We copied the header file from http://launchd.macosforge.org/trac/browser/trunk/launchd/src/vproc_priv.h, r23776
+ master_sites-append http://www.cis.nctu.edu.tw/~is85005/dports/screen/r23776/:launchd_priv_header
+ distfiles-append vproc_priv.h:launchd_priv_header
+ checksums-append vproc_priv.h md5 50800817fa688e7e6ae379cd599f15ca
+ post-extract { file copy ${distpath}/vproc_priv.h ${workpath}/${distname} }
+ patchfiles-append patch-Makefile.in patch-config.h.in patch-configure patch-pty.c patch-window.c patch-screen.c patch-process.c
+}
+
post-install {
ui_msg "===============================================================================\n"
ui_msg "Any screens running before upgrading, will not be available, post-install.\n"
Added: trunk/dports/sysutils/screen/files/patch-process.c
===================================================================
--- trunk/dports/sysutils/screen/files/patch-process.c (rev 0)
+++ trunk/dports/sysutils/screen/files/patch-process.c 2010-01-05 00:22:05 UTC (rev 62349)
@@ -0,0 +1,13 @@
+diff -r -u screen-4.0.3.orig/process.c screen-4.0.3/process.c
+--- process.c 2008-07-06 23:40:16.000000000 -0700
++++ process.c 2008-07-06 23:47:55.000000000 -0700
+@@ -5466,7 +5466,7 @@
+ *buf = 0;
+ return;
+ }
+- act.nr = (int)data;
++ act.nr = (int)(intptr_t)data;
+ act.args = noargs;
+ act.argl = 0;
+ DoAction(&act, -1);
+
Modified: trunk/dports/sysutils/screen/files/patch-screen.c
===================================================================
--- trunk/dports/sysutils/screen/files/patch-screen.c 2010-01-05 00:01:40 UTC (rev 62348)
+++ trunk/dports/sysutils/screen/files/patch-screen.c 2010-01-05 00:22:05 UTC (rev 62349)
@@ -1,26 +1,44 @@
---- screen.c.orig 2009-01-21 12:06:11.000000000 +0800
-+++ screen.c 2009-01-21 12:08:27.000000000 +0800
+--- screen.c 2003-09-08 07:26:41.000000000 -0700
++++ screen.c 2009-02-13 12:05:05.000000000 -0800
@@ -101,6 +101,11 @@
- #include "logfile.h" /* islogfile, logfflush */
+ #include "logfile.h" /* islogfile, logfflush */
+#ifdef __APPLE__
+#include <vproc.h>
-+#include "vproc_priv.h"
++#include <vproc_priv.h>
+#endif
+
#ifdef DEBUG
FILE *dfp;
#endif
-@@ -1211,6 +1216,11 @@
+@@ -929,6 +934,16 @@
+ Panic(0, "No $SCREENDIR with multi screens, please.");
+ #endif
+ }
++#ifdef __APPLE__
++ else if (!multi && real_uid == eff_uid) {
++ static char DarwinSockDir[PATH_MAX];
++ if (confstr(_CS_DARWIN_USER_TEMP_DIR, DarwinSockDir, sizeof(DarwinSockDir))) {
++ strlcat(DarwinSockDir, ".screen", sizeof(DarwinSockDir));
++ SockDir = DarwinSockDir;
++ }
++ }
++#endif /* __APPLE__ */
++
+ #ifdef MULTIUSER
+ if (multiattach)
+ {
+@@ -1211,6 +1226,11 @@
freopen("/dev/null", "w", stderr);
debug("-- screen.back debug started\n");
+#ifdef __APPLE__
-+ if (_vprocmgr_move_subset_to_user(real_uid, "Background") != NULL)
-+ errx(1, "can't migrate to background session");
++ if (_vprocmgr_detach_from_console(0) != NULL)
++ errx(1, "can't detach from console");
+#endif
+
/*
* This guarantees that the session owner is listed, even when we
* start detached. From now on we should not refer to 'LoginName'
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100104/3574facf/attachment.html>
More information about the macports-changes
mailing list