Hi ports@,

Here is a patch to remove the bzip2 dependency from Lynx. We were
previously linking against bzlib so the library would be used instead
of the bzip2 binary, in order to unpack bzip2 compressed HTML.

We now prevent lynx from appending 'bzip2' in the 'Accept-Encoding'
header instead.

Here are a few sites to test the patch against:

http://www.lighttpd.net
https://www.faimaison.net

Comments? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/lynx/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile    4 Sep 2016 13:35:02 -0000       1.28
+++ Makefile    14 Sep 2016 22:26:41 -0000
@@ -5,25 +5,23 @@ PL =          9
 COMMENT =      text web browser
 DISTNAME =     lynx${V}dev.${PL}
 PKGNAME =      lynx-${V}pl${PL}
-REVISION =     0
+REVISION =     1
 EXTRACT_SUFX = .tar.bz2
 CATEGORIES =   www net
 
 HOMEPAGE =     http://lynx.invisible-island.net/
 
-MAINTAINER =   Frederic Cambus <[email protected]>
+MAINTAINER =   Frederic Cambus <[email protected]>
 
 # GPLv2 only
 PERMIT_PACKAGE_CDROM = Yes
 
 # uses pledge()
-WANTLIB += bz2 c crypto ncurses ssl z
+WANTLIB +=     c crypto ncurses ssl z
 
 MASTER_SITES = http://invisible-mirror.net/archives/lynx/tarballs/ \
                ftp://invisible-island.net/lynx/tarballs/
 
-LIB_DEPENDS =  archivers/bzip2
-
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ARGS =       --datarootdir="${PREFIX}/share/doc/lynx" \
                        --disable-idna \
@@ -35,8 +33,7 @@ CONFIGURE_ARGS =      --datarootdir="${PREFIX
                        --enable-ipv6 \
                        --enable-widec \
                        --with-ssl=/usr \
-                       --with-zlib \
-                       --with-bzlib
+                       --with-zlib
 
 # This disables most calls to getpw*(3) so we can avoid pledge "getpw".
 CONFIGURE_ENV =        CFLAGS="-DNOUSERS"
Index: patches/patch-src_LYrcFile_c
===================================================================
RCS file: patches/patch-src_LYrcFile_c
diff -N patches/patch-src_LYrcFile_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_LYrcFile_c        14 Sep 2016 22:26:41 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- src/LYrcFile.c.orig        Sat Sep 10 18:33:37 2016
++++ src/LYrcFile.c     Sat Sep 10 18:33:56 2016
+@@ -100,9 +100,6 @@ Config_Enum tbl_preferred_encoding[] = {
+ #if defined(USE_ZLIB) || defined(COMPRESS_PATH)
+     { "compress",     encodingCOMPRESS },
+ #endif
+-#if defined(USE_BZLIB) || defined(BZIP2_PATH)
+-    { "bzip2",                encodingBZIP2 },
+-#endif
+     { "all",          encodingALL },
+     { NULL,           -1 }
+ };

Reply via email to