summaryrefslogtreecommitdiff
path: root/editors/zed
diff options
context:
space:
mode:
authorSergei Kolobov <sergei@FreeBSD.org>2003-12-13 00:25:50 +0000
committerSergei Kolobov <sergei@FreeBSD.org>2003-12-13 00:25:50 +0000
commit893b8363671346d779a8f47dc31d220b5e5560e5 (patch)
tree818c1c1254a945fe88e517d33a38c4fdd545539d /editors/zed
parent- Update to 1.1.42 (diff)
- Add patch which remedies the problem of Zombie childs upon
using the built-in shell/make utility which uses fork() - Switch to do-install target, respect ${PREFIX} - Bump PORTREVISION PR: 59760 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=95700
Diffstat (limited to 'editors/zed')
-rw-r--r--editors/zed/Makefile14
-rw-r--r--editors/zed/files/patch-main.cc61
-rw-r--r--editors/zed/pkg-plist8
3 files changed, 77 insertions, 6 deletions
diff --git a/editors/zed/Makefile b/editors/zed/Makefile
index b91fd2b837ea..dbdaccb01021 100644
--- a/editors/zed/Makefile
+++ b/editors/zed/Makefile
@@ -7,13 +7,21 @@
PORTNAME= zed
PORTVERSION= 1.0.5
+PORTREVISION= 1
CATEGORIES= editors
MASTER_SITES= http://zed.c3po.it/
MAINTAINER= exile@chamber.ee
-COMMENT= Simple, fast, powerful, small, highly configurable TEXT EDITOR
+COMMENT= Simple, small, fast, highly configurable text editor
-post-install:
- @${STRIP_CMD} ${PREFIX}/bin/zed
+DOCS= CHANGES zed.doc
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/zed ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/cfg/zedrc ${PREFIX}/etc/zedrc.sample
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
+.endif
.include <bsd.port.mk>
diff --git a/editors/zed/files/patch-main.cc b/editors/zed/files/patch-main.cc
new file mode 100644
index 000000000000..7b18f79b56ee
--- /dev/null
+++ b/editors/zed/files/patch-main.cc
@@ -0,0 +1,61 @@
+--- main.cc.orig Fri Nov 28 16:17:58 2003
++++ main.cc Fri Nov 28 14:44:27 2003
+@@ -25,6 +25,7 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <regex.h>
++#include <errno.h>
+ #ifdef X11
+ #include <X11/Xlib.h>
+ #endif
+@@ -91,6 +92,8 @@
+
+ /***************************************************************************/
+
++int fork2();
++
+ void resetcfg(int flag,char *str)
+ {
+ if (config.keys==(unsigned int *)0xffffffff) config.keys=0;
+@@ -554,7 +557,7 @@
+
+ if (piped) pipe(pp); else deinit(); // ripristino i settaggi del terminale
+
+- if ((pid=fork())==0)
++ if ((pid=fork2())==0)
+ { // figlio
+ char *argv[100];
+ int argc=0;
+@@ -1352,6 +1355,32 @@
+ deinit();
+
+ return(0);
++}
++
++int fork2() {
++ pid_t pid;
++ int status;
++
++ if (!(pid = fork())) {
++ switch (fork()) {
++ case 0: return 0;
++ case -1: _exit(errno); /* assumes all errnos are <256 */
++ default: _exit(0);
++ }
++ }
++
++ if (pid < 0 || waitpid(pid,&status,0) < 0)
++ return -1;
++
++ if (WIFEXITED(status))
++ if (WEXITSTATUS(status) == 0)
++ return 1;
++ else
++ errno = WEXITSTATUS(status);
++ else
++ errno = EINTR; /* well, sort of :-) */
++
++ return -1;
+ }
+
+ /***************************************************************************/
diff --git a/editors/zed/pkg-plist b/editors/zed/pkg-plist
index 8f24ace15d30..c485e4a6246f 100644
--- a/editors/zed/pkg-plist
+++ b/editors/zed/pkg-plist
@@ -1,4 +1,6 @@
+@comment $FreeBSD$
bin/zed
-etc/zedrc
-share/doc/zed/zed.doc
-@dirrm share/doc/zed
+etc/zedrc.sample
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES
+%%PORTDOCS%%%%DOCSDIR%%/zed.doc
+%%PORTDOCS%%@dirrm %%DOCSDIR%%