aboutsummaryrefslogtreecommitdiff
path: root/security/botan110/Makefile
blob: 13cb54f8651f7b95a65d3940d68da8ab2340d47a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$

PORTNAME=	botan
PORTVERSION=	1.10.7
CATEGORIES=	security
MASTER_SITES=	http://files.randombit.net/botan/v1.10/
PKGNAMESUFFIX=	110
DISTNAME=	Botan-${PORTVERSION}
EXTRACT_SUFX=	.tbz

MAINTAINER=	lapo@lapo.it
COMMENT=	Portable, easy to use, and efficient C++ crypto library

LICENSE=	BSD
LICENSE_FILE=	${WRKSRC}/doc/license.txt

LATEST_LINK=	botan${PKGNAMESUFFIX}

OPTIONS_DEFINE=		SSL GMP ECC
OPTIONS_DEFAULT=	SSL GMP ECC
ECC_DESC=	ECC support

USES=		compiler gmake
USE_BZIP2=	yes
USE_PYTHON_BUILD=	yes
HAS_CONFIGURE=	yes
CONFIGURE_SCRIPT=	configure.py
CONFIGURE_ARGS=	--prefix=${PREFIX} --with-bzip2 --with-zlib
MAKE_ARGS=	CXX="${CXX}" LIB_OPT="${CXXFLAGS}"
USE_LDCONFIG=	yes
PLIST_FILES=	bin/botan-config-1.10 lib/libbotan-1.10.a lib/libbotan-1.10.so lib/libbotan-1.10.so.0 \
		lib/libbotan-1.10.so.0.7 libdata/pkgconfig/botan-1.10.pc

DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
PORTDOCS=	*

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSSL}
USE_OPENSSL=	yes
CONFIGURE_ARGS+=--with-openssl
.endif

.if ${PORT_OPTIONS:MGMP}
LIB_DEPENDS+=	gmp:${PORTSDIR}/math/gmp
CONFIGURE_ARGS+=--with-gnump
MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib"
.endif

.if ${PORT_OPTIONS:MECC}
BUILD_DEPENDS+=	${LOCALBASE}/include/boost/tr1/memory.hpp:${PORTSDIR}/devel/boost-libs
CONFIGURE_ARGS+=--with-tr1-implementation=boost
CXXFLAGS+=	-I${LOCALBASE}/include
.else
CONFIGURE_ARGS+=--with-tr1-implementation=none
.endif

.include <bsd.port.pre.mk>

CONFIGURE_ARGS+=--cc ${COMPILER_TYPE}

post-patch:
	${REINPLACE_CMD} -e "s|#!/usr/bin/env python|#!${PYTHON_CMD}|" \
			${WRKSRC}/configure.py
.if ! ${PORT_OPTIONS:MDOCS}
	${REINPLACE_CMD} -e '/DOCDIR/d' \
			${WRKSRC}/src/build-data/makefile/unix_shr.in
.endif

post-install:
	@(cd "${STAGEDIR}${PREFIX}"; ${FIND} -s include/botan-1.10 -not -type d) >> ${TMPPLIST}
	@${ECHO_CMD} @dirrm include/botan-1.10/botan >> ${TMPPLIST}
	@${ECHO_CMD} @dirrm include/botan-1.10 >> ${TMPPLIST}

.include <bsd.port.post.mk>