Tweak security/sshblock version 1.0_1
[dports.git] / security / cryptopp / Makefile
1 # Created by: George Reid <greid@ukug.uk.freebsd.org>
2 # $FreeBSD$
3
4 PORTNAME=               cryptopp
5 PORTVERSION=            5.6.2
6 PORTREVISION=           2
7 CATEGORIES=             security
8 MASTER_SITES=           SF \
9                         http://www.cryptopp.com/
10 DISTNAME=               cryptopp${PORTVERSION:S/.//g}
11
12 MAINTAINER=             delphij@FreeBSD.org
13 COMMENT=                Free C++ class library of Cryptographic Primitives
14
15 OPTIONS_DEFINE=         DEBUG DOCS GCC STATIC THREADS
16 OPTIONS_DEFAULT=        THREADS
17 STATIC_DESC=            Build static version only (no shared libs)
18 GCC_DESC=               Build with current GCC
19
20 .include <bsd.port.options.mk>
21
22 NO_WRKSUBDIR=           yes
23 EXTRACT_BEFORE_ARGS=    -aq
24 USES=                   gmake zip:infozip
25 MAKEFILE=               GNUmakefile
26
27 LIBVERSION=             0
28 PLIST_SUB+=             LIBVERSION=${LIBVERSION}
29 PLIST_SUB+=             PORTVERSION=${PORTVERSION}
30
31 .if !${PORT_OPTIONS:MDEBUG}
32 CXXFLAGS+=              -DNDEBUG
33 .endif
34
35 .if ${PORT_OPTIONS:MGCC}
36 USE_GCC=                yes
37 .endif
38
39 .if ${PORT_OPTIONS:MSTATIC}
40 PLIST_SUB+=             DYNAMIC_ENABLED="@comment "
41 .else
42 PLIST_SUB+=             DYNAMIC_ENABLED=""
43 MAKE_ARGS=              all libcryptopp.so
44 CXXFLAGS+=              -fPIC
45 USE_LDCONFIG=           yes
46 .endif
47
48 .if ${PORT_OPTIONS:MTHREADS}
49 CXXFLAGS+=              ${PTHREAD_CFLAGS}
50 LDFLAGS+=               ${PTHREAD_LIBS}
51 .endif
52
53 do-install:
54         ${INSTALL_PROGRAM} ${WRKSRC}/cryptest.exe ${STAGEDIR}${PREFIX}/bin/cryptest
55         ${INSTALL_DATA} ${WRKSRC}/libcryptopp.a ${STAGEDIR}${PREFIX}/lib
56         ${MKDIR} ${STAGEDIR}${PREFIX}/include/cryptopp
57         (for i in `${FIND} ${WRKSRC}/ -name '*.h' \
58                         -and -not -name 'dll.h' \
59                         -and -not -name 'resource.h'`; do \
60                 ${INSTALL_DATA} $$i ${STAGEDIR}${PREFIX}/include/cryptopp; \
61         done)
62 .if !${PORT_OPTIONS:MSTATIC}
63         ${INSTALL_LIB} ${WRKSRC}/libcryptopp.so ${STAGEDIR}${PREFIX}/lib/libcryptopp.so.${PORTVERSION}
64         ${LN} -fs libcryptopp.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libcryptopp.so.${LIBVERSION}
65         ${LN} -fs libcryptopp.so.${LIBVERSION} ${STAGEDIR}${PREFIX}/lib/libcryptopp.so
66 .endif
67         ${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/cryptopp
68         ${CP} ${WRKSRC}/Readme.txt ${STAGEDIR}${PREFIX}/share/doc/cryptopp/README
69         ${CP} ${WRKSRC}/License.txt ${STAGEDIR}${PREFIX}/share/doc/cryptopp/License
70
71 .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
72 BROKEN=         Does not compile on sparc64: unrecognized C++ options
73 .endif
74
75 .include <bsd.port.mk>