bsd.openssl.mk
Stijn Hoop
stijn at win.tue.nl
Tue May 6 11:10:45 PDT 2003
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 at 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
--
"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"
-------------- next part --------------
#
# $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
-------------- next part --------------
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+= --enable-v4-mapped
.endif
+.include <bsd.port.pre.mk>
+
.if !defined(WITHOUT_SSL)
-USE_OPENSSL= yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
.endif
-
-.include <bsd.port.pre.mk>
.if defined(WITH_SUEXEC)
SUEXEC_DOCROOT?= ${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=/dev/random
.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 400014
-USE_OPENSSL= yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
-.endif
.if defined(PORT_REPLACES_BASE_BIND9)
PKGNAMESUFFIX= -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+= --enable-javascript --with-ssl --without-svgalib
CONFIGURE_ENV+= CPPFLAGS='-I${LOCALBASE}/include' LDFLAGS='-L${LOCALBASE}/lib'
-USE_OPENSSL= yes
USE_BZIP2= yes
USE_REINPLACE= yes
.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
.if !defined(WITHOUT_X11)
LIB_DEPENDS+= 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+= slrnface:${PORTSDIR}/news/slrnface
.endif
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
+
DIST_SUBDIR= mutt
WRKSRC= ${WRKDIR}/${DISTNAME:S/i$//}
-USE_OPENSSL= yes
GNU_CONFIGURE= yes
USE_AUTOMAKE= yes # configure.in is patched by <PATCHFILES>
USE_REINPLACE= yes
@@ -150,4 +152,4 @@
@${ECHO} ""
.endif
-.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+= tlsmgr.8"
- echo "USE_OPENSSL= yes"
+ echo ".include \"\${PORTSDIR}/security/openssl/bsd.openssl.mk\""
echo "POSTFIX_CCARGS+= -DHAS_SSL -I\${OPENSSLINC}"
echo "POSTFIX_AUXLIBS+= -L\${OPENSSLLIB} -lssl -lcrypto"
echo "DISTFILES+= \${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= install-strip
.endif
+.include <bsd.port.pre.mk>
+
.if !defined(WITHOUT_SSL)
-USE_OPENSSL= yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
CONFIGURE_ARGS+= "--with-openssl=${OPENSSLBASE}"
.endif
@@ -225,5 +227,5 @@
fi
.endif
-.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=${LOCALBASE}
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib"
+.include <bsd.port.pre.mk>
+
.if !defined(WITHOUT_SSL)
-USE_OPENSSL= YES
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
CONFIGURE_ARGS+= --with-ssl
.endif
@@ -65,4 +67,4 @@
.endfor
.endif
-.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= yes
GNU_CONFIGURE= yes
+.include <bsd.port.pre.mk>
+
.if defined(WITHOUT_SSL)
CONFIGURE_ARGS= --with-ssl=no
.else
-USE_OPENSSL= yes
+.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
.endif
CONFIGURE_ENV+= CPPFLAGS=-I${LOCALBASE}/include \
LIBS=-L${LOCALBASE}/lib
@@ -48,4 +50,4 @@
post-install:
install-info ${PREFIX}/info/wget.info ${PREFIX}/info/dir
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030506/6b58c54d/attachment.bin
More information about the freebsd-ports
mailing list