Re: [PATCH] www/lynx (drop dependency on bzip2)

2016-09-23 Thread Frederic Cambus
On Thu, Sep 15, 2016 at 12:36:20AM +0200, Frederic Cambus wrote:

> 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?

Here is an improved patch using suggestions provided by sthen@. This
allows disabling bzip2 at the configure level which is much cleaner,
cover more #ifdefs within the program, and does not require any 
additional patches.

Index: Makefile
===
RCS file: /cvs/ports/www/lynx/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile22 Sep 2016 12:57:18 -  1.29
+++ Makefile23 Sep 2016 15:17:42 -
@@ -5,7 +5,7 @@ PL =9
 COMMENT =  text web browser
 DISTNAME = lynx${V}dev.${PL}
 PKGNAME =  lynx-${V}pl${PL}
-REVISION = 1
+REVISION = 2
 EXTRACT_SUFX = .tar.bz2
 CATEGORIES =   www net
 
@@ -17,13 +17,11 @@ MAINTAINER =Frederic Cambus 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 \
@@ -36,10 +34,13 @@ CONFIGURE_ARGS =--datarootdir="${PREFIX
--enable-widec \
--with-ssl=/usr \
--with-zlib \
-   --with-bzlib
+   --without-bzlib
 
 # This disables most calls to getpw*(3) so we can avoid pledge "getpw".
-CONFIGURE_ENV =CFLAGS="-DNOUSERS"
+CONFIGURE_ENV +=   CFLAGS="-DNOUSERS"
+
+# Prevent accepting bzip2 compressed HTML to avoid spawning processes.
+CONFIGURE_ENV +=   ac_cv_path_BZIP2=none
 
 MAKE_FILE =makefile
 



Re: [PATCH] www/lynx (drop dependency on bzip2)

2016-09-23 Thread Frederic Cambus
On Mon, Sep 19, 2016 at 11:25:10PM +0200, Jeremie Courreges-Anglas wrote:

> > 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.
> 
> Not a lynx user here, just wondering: what is the reason for this
> revert?  Limiting the deps shipped by the install CDs?

The rationale was to avoid depending on bzip2 for a rarely useful
feature (only Lighttpd sends bzip2 compressed content), and go back
to a dependency free Lynx port.

As we both know, it's a bit too late to limit the deps shipped by
install CDs. But you have a point, it's maybe not that important
anymore now and a cheap dependency on bzip2 might be better than
adding another patch.



Re: [PATCH] www/lynx (drop dependency on bzip2)

2016-09-19 Thread Jeremie Courreges-Anglas
Frederic Cambus  writes:

> 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.

Not a lynx user here, just wondering: what is the reason for this
revert?  Limiting the deps shipped by the install CDs?

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE