ports/169613: security/botan: Fix ECDSA for dns/powerdns and maybe others
Joe Holden
joe at rewt.org.uk
Mon Jul 2 20:00:29 UTC 2012
>Number: 169613
>Category: ports
>Synopsis: security/botan: Fix ECDSA for dns/powerdns and maybe others
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 02 20:00:26 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Joe Holden
>Release: 9.0-RELEASE
>Organization:
Pseudo Networks Limited
>Environment:
FreeBSD abby.lhr1.as41113.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
As it stands the botan port deletes the required headers after install, which means that powerdns is unable to build due to a hardcoded dependency (which is configurable in my other patch). This fixes that and also makes build options configurable.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- Makefile.orig 2012-03-31 17:49:45.000000000 +0100
+++ Makefile 2012-03-31 19:37:40.000000000 +0100
@@ -1,13 +1,6 @@
-# ex:ts=8
-# New ports collection makefile for: botan
-# Date created: Mar 3, 2001
-# Whom: Ying-Chieh Liao <ijliao at FreeBSD.org>
-#
-# $FreeBSD: ports/security/botan/Makefile,v 1.56 2011/12/03 18:39:28 scheidell Exp $
-#
-
PORTNAME= botan
PORTVERSION= 1.8.13
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://files.randombit.net/botan/v1.8/
DISTNAME= Botan-${PORTVERSION}
@@ -19,55 +12,60 @@
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/doc/license.txt
-OPTIONS= SSL "Enable OpenSSL engine" on \
- GMP "Enable GMP engine" on \
- ECC "Enable ECC support" on
-
USE_BZIP2= yes
USE_PYTHON_BUILD= yes
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= configure.py
-CONFIGURE_ARGS= --prefix=${PREFIX} --with-tr1-implementation=boost \
- --with-bzip2 --with-zlib
+CONFIGURE_ARGS= --prefix=${PREFIX} --with-bzip2 --with-zlib
USE_GMAKE= yes
MAKE_ARGS= CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
USE_LDCONFIG= yes
PLIST_FILES= bin/botan-config lib/libbotan.a lib/libbotan.so lib/libbotan.so.0 libdata/pkgconfig/botan-1.8.pc
-PORTDOCS= *
+OPTIONS= SSL "Enable OpenSSL engine" on \
+ GMP "Enable GMP engine" on \
+ ECC "Enable ECC support" on \
+ ECDSA "Enable ECDSA (PowerDNS et al.)" on
+
-.include <bsd.port.options.mk>
+PORTDOCS= ${WRKSRC}/doc
-.if !defined(WITHOUT_SSL)
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_SSL)
USE_OPENSSL= yes
-CONFIGURE_ARGS+=--with-openssl
+CONFIGURE_ARGS+= --with-openssl
.endif
-.if !defined(WITHOUT_GMP)
+.if defined(WITH_GMP)
LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
-CONFIGURE_ARGS+=--with-gnump
+CONFIGURE_ARGS+= --with-gnump
MAKE_ARGS+= LDFLAGS="-L${LOCALBASE}/lib"
.endif
-.if !defined(WITHOUT_ECC)
+.if defined(WITH_ECDSA)
+CONFIGURE_ARGS+= --enable-modules=ecdsa
+.if !defined(WITH_ECC)
+BROKEN="ECC required but not enabled, bailing."
+.endif
+.endif
+
+.if defined(WITH_ECC)
BUILD_DEPENDS+= ${LOCALBASE}/include/boost/tr1/memory.hpp:${PORTSDIR}/devel/boost-libs
-CONFIGURE_ARGS+=--with-tr1-implementation=boost
+CONFIGURE_ARGS+= --with-tr1-implementation=boost
CXXFLAGS+= -I${LOCALBASE}/include
.else
-CONFIGURE_ARGS+=--with-tr1-implementation=none
+CONFIGURE_ARGS+= --with-tr1-implementation=none
.endif
-post-patch:
+post-extract:
${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
${WRKSRC}/configure.py
+
.if defined(NOPORTDOCS)
${REINPLACE_CMD} -e '/$$(MKDIR_INSTALL) $$(DOCDIR)/d' \
-e '/$$(INSTALL_CMD_DATA) $$$$i $$(DOCDIR); /d' \
${WRKSRC}/src/build-data/makefile/unix_shr.in
.endif
-post-install:
- @(cd ${PREFIX}; ${FIND} -s include/botan -not -type d) >> ${TMPPLIST}
- @${ECHO_CMD} @dirrm include/botan >> ${TMPPLIST}
-
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list