Date: Wed, 19 Mar 2008 22:56:53 GMT From: bf <bf2006a@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/121886: [PATCH]www/links: update to 2.1pre33 Message-ID: <200803192256.m2JMurhY008956@www.freebsd.org> Resent-Message-ID: <200803192300.m2JN05Iu051983@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 121886 >Category: ports >Synopsis: [PATCH]www/links: update to 2.1pre33 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Mar 19 23:00:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: bf >Release: 7-STABLE i386 >Organization: - >Environment: >Description: Update to 2.1pre33; expose some configuration options; add www/links1 to CONFLICTS (see PR ports/121781). Sadly, the Javascript interpreter was found to be buggy and abandoned, although it can be re-enabled in a custom build -- details below. Relevant cumulative changes: Fixed a bug that strings with spaces could not be passed from command line Socks 4A support (so that Links can be used with tor without intermediate proxy) Do not display links to alternate stylesheets Use Content-Disposition as a suggestion for downloaded file name Fixed write to freed memory resulting in misbehavior of radio buttons and a possible crash Do not search for compressed-file extension (.gz, .bz2) in URLs containing '?', '&' or ';' --- they are likely scripts and they should provide information about compression in the header. When the document was truncated to zero size on reload and no data were received, links didn't invalidate formatted document cache Accept capital 'X' as a hex number mark in html entities Do not print links to stylesheet to the document Slightly improve parsing of ftp --- when the line contains "<DIR>", we can assume that it is a directory Some newer Linuxes unfortunatelly do not send SIGCONT when running process is brougt to foreground with 'fg' command. So implement 0.5s polling to test if we're on foreground. Do not request compression for files with .Z, .gz or .bz2 suffix --- some servers will compress them again Support HTTP/0.9 (without header) In case of non-restartable connection, proceed with the connection even if the server is on blacklist An option to disallow non-proxy connections (for anonymization via tor or similar services) Turn off compression if the server closes the connection prematurely Some servers erroneously send the size of uncompressed data An option to disable compression. Disable compression automatically for a given server if links receives erroneous compressed data Break ansi aliasing on ICC 10 with -ipo Empty function call was not enough to break it When the connection dies after the last received byte, do not send "Range:" header in retry request --- servers don't like "Range" pointing after the last byte Fixed security bug in pre29 (not in any previous versions): special characters in URL could be passed to a shell when spawning user viewer Fixed needlessly large selection boxes in graphics mode Release mouse when spawning OS shell or user viewers Fixed bad redraw of X window when Expose event come for some area while scrolling different area Set extension of downloaded or viewed files according to content-type, not according to URL extension Fixed bad displaying of jpeg images on machines where memcpy operates in different order Fixed crash on invalid jpeg files (found by Michael Scherer <misc@zarb.org> with http://fusil.hachoir.org/) Do not send If-Modified-Since or Range in HTTP request if cached page has an error code Fixed some quirks with download file handling --- when each terminal had different CWD, downloaded files were not deleted When getting EFBIG error (file size exceeded), continue download in another file A possibility to pass HTTP or FTP URLs directly to external programs (programs such as mpg321, ogg123, mplayer can play directly from the network) Fixed inability to display images compressed on the fly by the server (it is pointless to try to compress already compressed images, but some servers do it anyway) Escape Referer: correctly Fixed bug that it couldn't be compiled without optimization without javascript Blacklist FORPSI server --- do not send Range: to it Javascript was removed. The reason is that it is very buggy, Martin Pergel doesn't have time to develop it and code is so messy that no one else can understand it. If you use links for special purposes (embedded devices, etc.), you can bring javascript back by copying javascript files from previous release, removing "dnl javascript" lines from configure.in, adding *.c and *.h files to Makefile.am and re-running automake and autoconf. Javascript hooks from main code were not removed --- they just won't be maintained. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN links.orig/Makefile links/Makefile --- links.orig/Makefile 2007-07-05 05:15:41.000000000 -0400 +++ links/Makefile 2008-03-19 17:56:28.475914859 -0400 @@ -6,52 +6,59 @@ # PORTNAME= links -PORTVERSION= 2.1.p28 +DISTVERSION= 2.1pre33 PORTEPOCH= 1 -CATEGORIES?= www +CATEGORIES= www MASTER_SITES= http://links.twibright.com/download/ -DISTNAME= ${PORTNAME}-2.1pre28 -MAINTAINER?= demon@FreeBSD.org +MAINTAINER= demon@FreeBSD.org COMMENT= Lynx-like text WWW browser -LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre +CONFLICTS= links-0* -GNU_CONFIGURE= yes -CONFIGURE_ARGS+= --enable-javascript --with-ssl -CONFIGURE_ENV+= CPPFLAGS='-I${LOCALBASE}/include' -LDFLAGS+= -L${LOCALBASE}/lib +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --with-ssl --without-pmshell --without-atheos --without-gpm \ + --without-fb +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" +LDFLAGS+= -L${LOCALBASE}/lib USE_OPENSSL= yes USE_BZIP2= yes OPTIONS= SVGALIB "non-X11 graphics support" off \ + DIRECTFB "directfb driver support" off \ X11 "X11 graphics support" on .include <bsd.port.pre.mk> -.if defined(WITH_SVGALIB) -LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib \ - png.5:${PORTSDIR}/graphics/png \ +.ifdef(WITH_SVGALIB) || defined(WITH_X11) || defined(WITH_DIRECTFB) +LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png \ jpeg.9:${PORTSDIR}/graphics/jpeg \ tiff.4:${PORTSDIR}/graphics/tiff CONFIGURE_ARGS+= --enable-graphics -OPTIONS_MESG= "non-X11 graphics support enabled, " +.else +CONFIGURE_ARGS+= --disable-graphics --without-libjpeg --without-libtiff +.endif + +.ifdef(WITH_SVGALIB) +LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib +CONFIGURE_ARGS+= --with-svgalib .else CONFIGURE_ARGS+= --without-svgalib -OPTIONS_MESG= "non-X11 graphics support disabled, " +.endif + +.ifdef(WITH_DIRECTFB) +LIB_DEPENDS+= libdirectfb:${PORTSDIR}/devel/directfb +CONFIGURE_ARGS+= --with-directfb +.else +CONFIGURE_ARGS+= --without-directfb .endif .if !defined(WITHOUT_X11) -LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png \ - jpeg.9:${PORTSDIR}/graphics/jpeg \ - tiff.4:${PORTSDIR}/graphics/tiff -USE_XLIB= yes -CONFIGURE_ARGS+= --enable-graphics --with-x -OPTIONS_MESG+= "X11 graphics support enabled." +USE_XORG= x11 xproto +CONFIGURE_ARGS+= --with-x .else CONFIGURE_ARGS+= --without-x -OPTIONS_MESG+= "X11 graphics support disabled." .endif MAN1= links.1 @@ -61,6 +68,5 @@ @${ECHO_MSG} ${OPTIONS_MESG} post-patch: - @${REINPLACE_CMD} -e "s!/etc/!${PREFIX}/etc/!" ${WRKSRC}/default.c - + @${REINPLACE_CMD} -e "s!/etc/!${PREFIX}/etc/!" ${WRKSRC}/os_dep.h .include <bsd.port.post.mk> diff -ruN links.orig/distinfo links/distinfo --- links.orig/distinfo 2007-07-05 05:15:41.000000000 -0400 +++ links/distinfo 2008-03-19 17:56:28.475914859 -0400 @@ -1,3 +1,3 @@ -MD5 (links-2.1pre28.tar.bz2) = 815afe558dd548258eeb03b01cce01ce -SHA256 (links-2.1pre28.tar.bz2) = 203531be7c84ebe3a5d53c6d6cda4f4a27626dec620ec5aa8926414d0bee5995 -SIZE (links-2.1pre28.tar.bz2) = 3915943 +MD5 (links-2.1pre33.tar.bz2) = 99cdbd1194579eea6d857168a57e0d74 +SHA256 (links-2.1pre33.tar.bz2) = 1f6be6db54eb5fb2947926b5214879c260030da9909c1d189d053d8dc3357f98 +SIZE (links-2.1pre33.tar.bz2) = 3817630 diff -ruN links.orig/files/patch-ab links/files/patch-ab --- links.orig/files/patch-ab 2003-03-01 14:13:14.000000000 -0500 +++ links/files/patch-ab 1969-12-31 19:00:00.000000000 -0500 @@ -1,14 +0,0 @@ ---- kbd.c.orig Sat Oct 12 19:47:58 2002 -+++ kbd.c Sat Mar 1 16:03:31 2003 -@@ -746,9 +746,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 -ruN links.orig/files/patch-default.c links/files/patch-default.c --- links.orig/files/patch-default.c 2003-03-01 14:13:14.000000000 -0500 +++ links/files/patch-default.c 2008-03-19 17:56:28.475914859 -0400 @@ -1,11 +1,11 @@ ---- default.c.orig Tue Feb 11 21:54:38 2003 -+++ default.c Sat Mar 1 16:03:31 2003 -@@ -300,7 +300,7 @@ +--- default.c.orig 2008-03-06 22:43:25.117856165 -0500 ++++ default.c 2008-03-06 22:44:12.412560939 -0500 +@@ -400,7 +400,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 set the $HOME variable correctly and that you have write permission to your home directory.\n"); ++ 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 -ruN links.orig/files/patch-regexp.c links/files/patch-regexp.c --- links.orig/files/patch-regexp.c 2006-01-24 05:53:39.000000000 -0500 +++ links/files/patch-regexp.c 1969-12-31 19:00:00.000000000 -0500 @@ -1,19 +0,0 @@ ---- regexp.c~ Fri Nov 25 02:38:35 2005 -+++ regexp.c Tue Jan 24 12:39:04 2006 -@@ -148,6 +148,7 @@ - #ifdef HAVE_PCRE - const char *er_ptr; - int erroffset; -+ pcre *ppat; - #else - regmatch_t pmat[MAXCAPTURE/3]; - regex_t ppat_data; -@@ -197,7 +198,7 @@ - #endif /* REGEX_DEBUG */ - - #ifdef HAVE_PCRE -- pcre *ppat = pcre_compile(pom, 0/*PCRE_ANCHORED*/, &er_ptr, &erroffset, NULL); -+ ppat = pcre_compile(pom, 0/*PCRE_ANCHORED*/, &er_ptr, &erroffset, NULL); - pcre_free(pom); - #else /* HAVE_PCRE */ - ppat = &ppat_data; diff -ruN links.orig/files/patch-types.c links/files/patch-types.c --- links.orig/files/patch-types.c 2007-07-05 05:15:41.000000000 -0400 +++ links/files/patch-types.c 2008-03-19 18:26:38.059562222 -0400 @@ -1,11 +1,11 @@ ---- types.c.orig Thu Jul 5 13:10:37 2007 -+++ types.c Thu Jul 5 13:12:07 2007 -@@ -807,7 +807,8 @@ +--- types.c.orig 2008-03-19 18:18:18.614955994 -0400 ++++ types.c 2008-03-19 18:21:18.345245179 -0400 +@@ -820,7 +820,8 @@ ext = NULL; } if (ext) while (ext[extl] && ext[extl] != '.' && !dir_sep(ext[extl]) && !end_of_dir(url, ext[extl])) extl++; - if ((extl == 3 && !casecmp(ext, "htm", 3)) || -+ if (force_html || ++ if (force_html || + (extl == 3 && !casecmp(ext, "htm", 3)) || (extl == 4 && !casecmp(ext, "html", 4))) return stracpy("text/html"); foreach(e, extensions) { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803192256.m2JMurhY008956>