Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2003 20:10:02 +0200
From:      Stijn Hoop <stijn@win.tue.nl>
To:        dinoex@freebsd.org, freebsd-ports@freebsd.org
Subject:   bsd.openssl.mk
Message-ID:  <20030506181002.GA91666@pcwin002.win.tue.nl>

next in thread | raw e-mail | index | archive | help

--p4qYPpj5QlsIQJ0K
Content-Type: multipart/mixed; boundary="zYM0uCDKw75PZbzx"
Content-Disposition: inline


--zYM0uCDKw75PZbzx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

In the process of setting up a new machine, I thought I'd be smart and
get rid of the base versions of OpenSSH & OpenSSL, in favor of the ports.
So I rebuilt a RELENG_4_8 world with the attached make.conf, and then
did a find / -mtime +1 to remove all unnecessary base system bits, including
of course the OpenSSL libraries.

The problem is that bsd.port.mk is unable to cope with this situation. It
unconditionally wants to have /usr/lib/libcrypto.so, or it assumes that
OpenSSL is not present.

Fortunately, dinoex@FreeBSD.org has made an excellent bsd.openssl.mk, that
is able to deal with the situation. I therefore tried to patch a few
ports that I needed to use it, and this was surprisingly easy! See the
attached patch for the changes, to these ports:

databases/postgresql7
ftp/wget
mail/mutt
mail/postfix
net/bind9
news/slrn
www/apache2
www/links

Now, my question: can bsd.openssl.mk not be integrated into bsd.port.mk?
That would save the hassle of including bsd.port.pre.mk in a few of these
ports, and it would save a lot of port changes when USE_OPENSSL continues
to work. Or is this already planned?

--Stijn

--=20
"Harry, I'm going to let you in on a little secret. Every day, once a day,
 give yourself a present. Don't plan it, don't wait for it, just let it
 happen. Could be a new shirt at the men's store, a catnap in your office
  chair, or... two cups of good, hot, black coffee. Like this."
		-- Special Agent Dale Cooper, "Twin Peaks"

--zYM0uCDKw75PZbzx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="make.conf"

#
# $Sandcat$
#

CPUTYPE=		p3
DISTDIR=		/usr/local/distfiles
WRKDIRPREFIX=		/usr/local/work
PACKAGES=		/usr/local/packages
KERNCONFDIR=		/usr/local/etc

# We're not in the USA.
USA_RESIDENT=		no

# Do not build various parts of the system that we either provide from
# ports, or do not need at all.
NO_BIND=		true
NO_FORTRAN=		true
NO_I4B=			true
NO_IPFILTER=		true
NO_LPR=			true
NO_OBJC=		true
NOSECURE=		true
NO_OPENSSH=		true
NO_OPENSSL=		true
NO_X=			true
NO_SENDMAIL=		true
NOPERL=			true
NO_PERL=		true
NO_PERL_WRAPPER=	true
NOUUCP=			true
NOKERBEROS=		true

# Tell the ports system that we use ports for various components
WITH_OPENSSL_PORT=	yes
PERL_VER=		5.6.1
PERL_VERSION=		5.6.1
PERL_ARCH=		mach

--zYM0uCDKw75PZbzx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openssl.patch"
Content-Transfer-Encoding: quoted-printable

diff -urN www/apache2/Makefile.orig www/apache2/Makefile
--- www/apache2/Makefile.orig	Wed Apr 16 23:33:58 2003
+++ www/apache2/Makefile	Mon May  5 21:00:33 2003
@@ -51,11 +51,11 @@
 CONFIGURE_ARGS+=3D --enable-v4-mapped
 .endif
=20
+.include <bsd.port.pre.mk>
+
 .if !defined(WITHOUT_SSL)
-USE_OPENSSL=3D	yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
 .endif
-
-.include <bsd.port.pre.mk>
=20
 .if defined(WITH_SUEXEC)
 SUEXEC_DOCROOT?=3D ${PREFIX_RELDEST}/www/data
diff -urN net/bind9/Makefile.orig net/bind9/Makefile
--- net/bind9/Makefile.orig	Tue Mar  4 10:44:15 2003
+++ net/bind9/Makefile	Tue May  6 14:54:43 2003
@@ -30,11 +30,8 @@
 		--with-randomdev=3D/dev/random
=20
 .include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >=3D 400014
-USE_OPENSSL=3D	yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
 CONFIGURE_ARGS+=3D	--with-openssl=3D${OPENSSLBASE}
-.endif
=20
 .if defined(PORT_REPLACES_BASE_BIND9)
 PKGNAMESUFFIX=3D	-base
diff -urN www/links/Makefile.orig www/links/Makefile
--- www/links/Makefile.orig	Tue Apr 29 17:38:06 2003
+++ www/links/Makefile	Tue May  6 17:04:57 2003
@@ -19,11 +19,11 @@
 CONFIGURE_ARGS+=3D	--enable-javascript --with-ssl --without-svgalib
 CONFIGURE_ENV+=3D	CPPFLAGS=3D'-I${LOCALBASE}/include' LDFLAGS=3D'-L${LOCAL=
BASE}/lib'
=20
-USE_OPENSSL=3D	yes
 USE_BZIP2=3D	yes
 USE_REINPLACE=3D	yes
=20
 .include <bsd.port.pre.mk>
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
=20
 .if !defined(WITHOUT_X11)
 LIB_DEPENDS+=3D	png.5:${PORTSDIR}/graphics/png \
diff -urN mail/mutt/Makefile.orig mail/mutt/Makefile
--- mail/mutt/Makefile.orig	Wed Apr 30 22:45:07 2003
+++ mail/mutt/Makefile	Tue May  6 16:40:27 2003
@@ -56,9 +56,11 @@
 RUN_DEPENDS+=3D	slrnface:${PORTSDIR}/news/slrnface
 .endif
=20
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
+
 DIST_SUBDIR=3D	mutt
 WRKSRC=3D		${WRKDIR}/${DISTNAME:S/i$//}
-USE_OPENSSL=3D	yes
 GNU_CONFIGURE=3D	yes
 USE_AUTOMAKE=3D	yes	# configure.in is patched by <PATCHFILES>
 USE_REINPLACE=3D	yes
@@ -150,4 +152,4 @@
 	@${ECHO} ""
 .endif
=20
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN mail/postfix/scripts/configure.postfix.orig mail/postfix/scripts/=
configure.postfix
--- mail/postfix/scripts/configure.postfix.orig	Tue Apr 15 09:44:41 2003
+++ mail/postfix/scripts/configure.postfix	Tue May  6 14:22:21 2003
@@ -109,7 +109,7 @@
 			;;
 		TLS)
 			echo "MAN8+=3D		tlsmgr.8"
-			echo "USE_OPENSSL=3D	yes"
+			echo ".include \"\${PORTSDIR}/security/openssl/bsd.openssl.mk\""
 			echo "POSTFIX_CCARGS+=3D	-DHAS_SSL -I\${OPENSSLINC}"
 			echo "POSTFIX_AUXLIBS+=3D	-L\${OPENSSLLIB} -lssl -lcrypto"
 			echo "DISTFILES+=3D	\${DISTNAME}.tar.gz pfixtls-0.8.13-2.0.6-0.9.7a.tar=
.gz"
diff -urN databases/postgresql7/Makefile.orig databases/postgresql7/Makefile
--- databases/postgresql7/Makefile.orig	Thu Feb 20 02:14:11 2003
+++ databases/postgresql7/Makefile	Tue May  6 19:50:20 2003
@@ -72,8 +72,10 @@
 INSTALL_TARGET=3D	install-strip
 .endif
=20
+.include <bsd.port.pre.mk>
+
 .if !defined(WITHOUT_SSL)
-USE_OPENSSL=3D	yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
 CONFIGURE_ARGS+=3D "--with-openssl=3D${OPENSSLBASE}"
 .endif
=20
@@ -225,5 +227,5 @@
 	 fi
 .endif
=20
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
 .endif
diff -urN news/slrn/Makefile.orig news/slrn/Makefile
--- news/slrn/Makefile.orig	Fri Mar  7 07:07:46 2003
+++ news/slrn/Makefile	Tue May  6 16:52:30 2003
@@ -33,8 +33,10 @@
 		--with-libiconv-prefix=3D${LOCALBASE}
 CONFIGURE_ENV=3D	CFLAGS=3D"${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}=
/lib"
=20
+.include <bsd.port.pre.mk>
+
 .if !defined(WITHOUT_SSL)
-USE_OPENSSL=3D	YES
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
 CONFIGURE_ARGS+=3D	--with-ssl
 .endif
=20
@@ -65,4 +67,4 @@
 .endfor
 .endif
=20
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN ftp/wget/Makefile.orig ftp/wget/Makefile
--- ftp/wget/Makefile.orig	Fri Apr 25 13:11:26 2003
+++ ftp/wget/Makefile	Tue May  6 16:25:32 2003
@@ -27,10 +27,12 @@
 USE_GMAKE=3D	yes
 GNU_CONFIGURE=3D	yes
=20
+.include <bsd.port.pre.mk>
+
 .if defined(WITHOUT_SSL)
 CONFIGURE_ARGS=3D	--with-ssl=3Dno
 .else
-USE_OPENSSL=3D	yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
 .endif
 CONFIGURE_ENV+=3D	CPPFLAGS=3D-I${LOCALBASE}/include \
 		LIBS=3D-L${LOCALBASE}/lib
@@ -48,4 +50,4 @@
 post-install:
 	install-info ${PREFIX}/info/wget.info ${PREFIX}/info/dir
=20
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

--zYM0uCDKw75PZbzx--

--p4qYPpj5QlsIQJ0K
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+t/p6Y3r/tLQmfWcRAqmwAJ98ZdN8cGqe8fnnKyKe3sFDMddGYgCgifW6
bvcjZNMsPLNd6jFx2cq+7zw=
=hLkx
-----END PGP SIGNATURE-----

--p4qYPpj5QlsIQJ0K--



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