Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2019 01:12:59 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r497895 - head/security/dsniff
Message-ID:  <201904050112.x351CxHX082818@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Fri Apr  5 01:12:59 2019
New Revision: 497895
URL: https://svnweb.freebsd.org/changeset/ports/497895

Log:
  security/dsniff: unbreak for FreeBSD 12+
  
  This software needs old SSL interfaces that pre-date OpenSSL 1.1
  and provided by LibreSSL still.
  
  Unbreak build for systems using openssl 1.1 following technique
  of security/acme-client: compile with temporary copy of LibreSSL
  and statically link binaries sshmitm and webmitm with LibreSSL's
  libraries. Do not install LibreSSL to the system
  if SSL_DEFAULT is not libressl.

Modified:
  head/security/dsniff/Makefile

Modified: head/security/dsniff/Makefile
==============================================================================
--- head/security/dsniff/Makefile	Fri Apr  5 01:12:08 2019	(r497894)
+++ head/security/dsniff/Makefile	Fri Apr  5 01:12:59 2019	(r497895)
@@ -14,13 +14,10 @@ COMMENT=	Various sniffing utilities for penetration te
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BROKEN_SSL=	openssl111
-BROKEN_SSL_REASON_openssl111=	incomplete definition of type 'struct rsa_st'
-
 BUILD_DEPENDS=	${LOCALBASE}/lib/libnids.a:net/libnids
 LIB_DEPENDS=	libnet.so:net/libnet
 
-USES=		gettext pkgconfig ssl
+USES=		gettext gnome pkgconfig
 USE_GNOME=	glib20
 
 GNU_CONFIGURE=	yes
@@ -37,9 +34,25 @@ X11_CONFIGURE_WITH=x
 
 .include <bsd.port.pre.mk>
 
-.if ${SSL_DEFAULT} == base
-BROKEN_FreeBSD_12=	incomplete definition of type 'struct rsa_st'
-BROKEN_FreeBSD_13=	incomplete definition of type 'struct rsa_st'
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200085
+USES+=		ssl
+.endif
+
+.if (${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085) || ${SSL_DEFAULT} == openssl111
+# Requires LibreSSL for old SSL interface
+BUILD_DEPENDS+=		${NONEXISTENT}:security/libressl:stage
+CPPFLAGS+=		-nostdinc -I/usr/include -I${WRKDIR}/libressl/include
+LDFLAGS+=		-L${WRKDIR}/libressl/lib
+CONFIGURE_ARGS+=	--with-openssl=${WRKDIR}/libressl
+
+# Don't use COPYTREE_SHARE here as it hard links files, and the original files
+# are owned by root, which creates problems of its own.
+pre-configure:
+	@cd `${MAKE} -V STAGEDIR -C ${PORTSDIR}/security/libressl`${PREFIX} \
+	    && ${FIND} -E . ! -name *.so\* | ${CPIO} -dump ${WRKDIR}/libressl >/dev/null 2>&1
+.else
+BROKEN_SSL=	openssl111
+BROKEN_SSL_REASON_openssl111=	incomplete definition of type 'struct rsa_st'
 .endif
 
 post-patch:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904050112.x351CxHX082818>