diff options
author | alane <alane@FreeBSD.org> | 2003-01-07 09:07:49 +0800 |
---|---|---|
committer | alane <alane@FreeBSD.org> | 2003-01-07 09:07:49 +0800 |
commit | 6d1fce9c6fed8dac403fa2a4e0d0d7eb42d7d345 (patch) | |
tree | bc5d41f6cc35904c0154a9406497c7565d2338d6 | |
parent | e23f5ec1fa1fddc7404143c8c90c55a5ed80c430 (diff) | |
download | freebsd-ports-gnome-6d1fce9c6fed8dac403fa2a4e0d0d7eb42d7d345.tar.gz freebsd-ports-gnome-6d1fce9c6fed8dac403fa2a4e0d0d7eb42d7d345.tar.zst freebsd-ports-gnome-6d1fce9c6fed8dac403fa2a4e0d0d7eb42d7d345.zip |
Latest version.
Patch adds printing ability, on the fly gzip/gunzip for downloads, etc.
Just save file to |command line.
-rw-r--r-- | www/elinks/Makefile | 11 | ||||
-rw-r--r-- | www/elinks/distinfo | 3 | ||||
-rw-r--r-- | www/elinks/files/patch-ab | 14 | ||||
-rw-r--r-- | www/elinks/files/patch-default.c | 11 | ||||
-rw-r--r-- | www/elinks/files/patch-document-download.c | 119 | ||||
-rw-r--r-- | www/elinks/manpages.mk | 2 |
6 files changed, 126 insertions, 34 deletions
diff --git a/www/elinks/Makefile b/www/elinks/Makefile index 0463a10f1387..a391611f8722 100644 --- a/www/elinks/Makefile +++ b/www/elinks/Makefile @@ -6,18 +6,15 @@ # PORTNAME= elinks -PORTVERSION= 0.3.2 +PORTVERSION= 0.5.p.0 CATEGORIES= www MASTER_SITES= http://elinks.or.cz/download/ -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.asc - -MAINTAINER= jharris@widomaker.com +DISTNAME= ${PORTNAME}-0.5pre0 +MAINTAINER= alane@freebsd.org GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --program-prefix=e USE_GMAKE= yes USE_BZIP2= yes -MAN1= elinks.1 - +.include "${.CURDIR}/manpages.mk" .include <bsd.port.mk> diff --git a/www/elinks/distinfo b/www/elinks/distinfo index 8f70b4fbf919..faf66adecfb2 100644 --- a/www/elinks/distinfo +++ b/www/elinks/distinfo @@ -1,2 +1 @@ -MD5 (elinks-0.3.2.tar.bz2) = 30e9012d5c9b0c0948f6212537da288c -MD5 (elinks-0.3.2.tar.bz2.asc) = eaeb77ed86bbfa353b6c067c1ad6b39b +MD5 (elinks-0.5pre0.tar.bz2) = b2bea9b6351ade786f499b4d06985fa3 diff --git a/www/elinks/files/patch-ab b/www/elinks/files/patch-ab deleted file mode 100644 index c977c5f01f78..000000000000 --- a/www/elinks/files/patch-ab +++ /dev/null @@ -1,14 +0,0 @@ ---- kbd.c.orig Thu Jan 11 13:26:36 2001 -+++ kbd.c Thu Jan 11 13:28:37 2001 -@@ -479,9 +479,9 @@ - case 'B': ev.x = KBD_DOWN; break; - case 'C': ev.x = KBD_RIGHT; break; - case 'D': ev.x = KBD_LEFT; break; -- case 'F': -+ case 'F': ev.x = KBD_END; break; - case 'e': ev.x = KBD_END; break; -- case 'H': -+ case 'H': ev.x = KBD_HOME; break; - case 0: ev.x = KBD_HOME; break; - case 'I': ev.x = KBD_PAGE_UP; break; - case 'G': ev.x = KBD_PAGE_DOWN; break; diff --git a/www/elinks/files/patch-default.c b/www/elinks/files/patch-default.c deleted file mode 100644 index f525fdc05692..000000000000 --- a/www/elinks/files/patch-default.c +++ /dev/null @@ -1,11 +0,0 @@ ---- default.c.orig Sun Dec 31 14:26:52 2000 -+++ default.c Tue Mar 20 09:32:18 2001 -@@ -265,7 +265,7 @@ - get_system_name(); - links_home = get_home(&first_use); - if (!links_home) { -- fprintf(stderr, "Unable to find or create links config directory. Please check, that you have $HOME variable set correctly and that you have write permission to your home directory.\n\007"); -+ fprintf(stderr, "Unable to find or create links config directory. Please check, that you have $HOME variable set correctly and that you have write permission to your home directory.\n"); - sleep(3); - return; - } diff --git a/www/elinks/files/patch-document-download.c b/www/elinks/files/patch-document-download.c new file mode 100644 index 000000000000..6e832941f68b --- /dev/null +++ b/www/elinks/files/patch-document-download.c @@ -0,0 +1,119 @@ +--- src/document/download.c.orig Mon Dec 16 17:47:54 2002 ++++ src/document/download.c Tue Dec 24 14:06:00 2002 +@@ -1,4 +1,4 @@ +-/* Downloads managment */ ++/* session.c -*-mode: c; c-basic-offset: 8-*- + /* $Id: download.c,v 1.61 2002/12/16 22:47:54 zas Exp $ */ + + #ifdef HAVE_CONFIG_H +@@ -583,6 +583,95 @@ + } + } + ++int create_process(unsigned char *szfn) ++{ ++ int pid, rgfd[ 2 ]; ++ unsigned char *command = szfn; ++ ++ pipe(rgfd); ++ if ((pid = fork()) < 0) { ++ close(rgfd[ 0 ]); ++ close(rgfd[ 1 ]); ++ return -1; ++ } else if (pid > 0) { ++ /* parent: ++ 1. The write "handle" returned to the caller is ++ the canonical write end of the pipe pair. ++ 2. We close the "read" end since we are not using ++ it and we don't want fd leakage. ++ 3. The first thing the child is going to do is ++ fork and exit, so the process we want to run will ++ belong to init, not us. It's gross, but more ++ portable than becoming a session leader. So we wait. ++ */ ++ int status; ++ ++ wait(&status); ++ close(rgfd[ 0 ]); ++ return rgfd[ 1 ]; ++ } else { ++ /* child: ++ at this point, if something goes wrong, ++ there's really nothing we can do about it; ++ the parent will get a SIGPIPE when it ++ tries to write. ++ */ ++ int fdnull = open("/dev/null", O_WRONLY); ++ ++ /* ++ fork again, so we are re-parented to init ++ and avoid the whole SIGCHLD issue. if we ++ aren't the chile, we die. We use _exit so ++ we don't flush any output buffers. ++ */ ++ if ((pid = fork()) != 0) { ++ _exit(0); ++ } ++ ++ /* grandchild: ++ If we got here, we are in the grandchild process, ++ whose parent has died and been reaped. Our parent ++ should be init (the primordial process). ++ ++ Before we exec the command, we need to set up ++ stdin, stdout, and stderr. ++ 1. stdin gets a dup2 of the "read" end of the ++ pipe. ++ 2. stdout and stderr get copies of an fd opened ++ to "/dev/null". ++ */ ++ dup2(rgfd[ 0 ], 0); ++ dup2(fdnull, 1); ++ dup2(fdnull, 2); ++ ++ /* ++ Now we can close everything that is still ++ open, because we've dup'd what we needed. ++ */ ++ close(fdnull); ++ close(rgfd[ 0 ]); ++ close(rgfd[ 1 ]); ++ ++ /* ++ Let the shell handle the command. We use ++ a hard-coded /bin/sh to avoid someone setting ++ SHELL to an odd value and causing damage. ++ ++ Any damage that is done to the user should be ++ self-inflicted, not the result of a maliciously ++ set environment var. ++ */ ++ execlp("/bin/sh", "/bin/sh", "-c", command, 0); ++ ++ /* failure: ++ If we get here, there's not much to do but die. ++ We use _exit so we don't flush any output buffers. ++ */ ++ _exit(1); ++ } ++ /* Trust me, you can't get here. */ ++} ++ + + int + create_download_file(struct terminal *term, unsigned char *fi, int safe, int resume) +@@ -601,6 +690,14 @@ + + wd = get_cwd(); + set_cwd(term->cwd); ++ if (*fi == '|') { ++ /* ++ This will hook any command that saves ++ a file to disk and hijack it to write ++ to the input of a process. Cool, huh? ++ */ ++ return create_process(fi + 1); ++ } + + if (!get_opt_int("document.download.overwrite") || resume) { + file = expand_tilde(file); diff --git a/www/elinks/manpages.mk b/www/elinks/manpages.mk new file mode 100644 index 000000000000..088a728947e5 --- /dev/null +++ b/www/elinks/manpages.mk @@ -0,0 +1,2 @@ +MAN1+= elinks.1 +MAN5+= elinkskeys.5 |