Bug 118096 - [PATCH]www/lynx: SSL linking problems
Summary: [PATCH]www/lynx: SSL linking problems
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rong-En Fan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-17 01:50 UTC by bf
Modified: 2007-12-13 08:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bf 2007-11-17 01:50:01 UTC
The use of --with-curses-dir=/usr in CONFIGURE_ARGS causes the makefile to prepend a  -L/usr preceding the -L/usr/local when linking with ssl, causing the port to always use the base ssl library rather than that of security/openssl, even when WITH_OPENSSL_PORT is set.  Here's one way to fix it (of course, in the future, if security/gnutls or devel/ncurses or devel/libslang2 support is enabled, a better fix will be required):

diff -ruN lynx.orig/Makefile lynx/Makefile
--- lynx.orig/Makefile	Fri Nov 16 03:23:23 2007
+++ lynx/Makefile	Fri Nov 16 03:19:27 2007
@@ -24,8 +24,8 @@
 WRKSRC=		${WRKDIR}/${PORTNAME}2-8-6
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=--with-screen=ncurses --with-zlib --libdir="${L_LIB}" \
-		--enable-nsl-fork --enable-persistent-cookies --with-ssl \
-		--with-curses-dir=/usr
+		--enable-nsl-fork --enable-persistent-cookies --with-ssl="${OPENSSLBASE}"
+SUB_FILES=	pkg-message
 
 .if defined(WITHOUT_NLS)
 CONFIGURE_ARGS+=--disable-nls
@@ -57,8 +57,6 @@
 
 post-patch:
 	@${RM} -f ${WRKSRC}/CHANGES.orig
-	@${REINPLACE_CMD} -e 's|-lssl -lcrypto|-L${OPENSSLLIB} &|g' \
-		${WRKSRC}/configure
 
 post-install:
 	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
diff -ruN lynx.orig/files/pkg-message.in lynx/files/pkg-message.in
--- lynx.orig/files/pkg-message.in	Wed Dec 31 19:00:00 1969
+++ lynx/files/pkg-message.in	Fri Nov 16 03:40:04 2007
@@ -0,0 +1,13 @@
+To enable certificate handling for SSL connnections, set
+SSL_CERT_DIR and SSL_CERT_FILE in your environment to the
+proper values (depending upon which SSL library
+%%PREFIX%%/bin/lynx uses), as described in:
+ 
+%%DOCSDIR%%/docs/README.sslcerts 
+
+and:
+
+%%DOCSDIR%%/docs/README.rootcerts.
+
+You may also need to generate keys and certificates as
+described in the latter document and your SSL documentation.
Comment 1 Edwin Groothuis freebsd_committer 2007-11-17 01:50:05 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 jharris 2007-11-20 23:59:46 UTC
On Sat, Nov 17, 2007 at 01:50:04AM +0000, Edwin Groothuis wrote:

> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/118096


Approved.  Thanks.

-- 
Jason Harris           |  NIC:  JH329, PGP:  This _is_ PGP-signed, isn't it?
jharris@widomaker.com _|_ web:  http://keyserver.kjsl.com/~jharris/
          Got photons?   (TM), (C) 2004
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2007-11-21 01:30:44 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 4 Rong-En Fan freebsd_committer 2007-11-21 02:06:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rafan

I'll take it.
Comment 5 dfilter service freebsd_committer 2007-12-13 08:38:26 UTC
rafan       2007-12-13 08:38:21 UTC

  FreeBSD ports repository

  Modified files:
    www/lynx             Makefile 
  Added files:
    www/lynx/files       pkg-message.in 
  Log:
  - With latest Lynx (2.8.6), no need to add --with-curses-dir. It works fine
    with/without devel/ncurses installed. This also causes problem when
    you specify to use OpenSSL from ports, as we add -L/usr before -L/usr/local.
  - Add OPENSSLBASE to --with-ssl, no need to patch configurate script anymore.
  - Add some instructions for using SSL
  
  PR:             ports/118096
  Submitted by:   bf <bf2006a at yahoo.com>
  Approved by:    Jason Harris <jharris at widomaker.com> (maintainer)
  
  Revision  Changes    Path
  1.127     +5 -5      ports/www/lynx/Makefile
  1.1       +13 -0     ports/www/lynx/files/pkg-message.in (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Rong-En Fan freebsd_committer 2007-12-13 08:41:20 UTC
State Changed
From-To: open->closed

Committed. Thanks!