aboutsummaryrefslogtreecommitdiffstats
path: root/security/gpgme/Makefile
blob: 84fcf8a5d3181f3fb5233b392bf823a0f2d06c2b (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
# Created by: teramoto@comm.eng.osaka-u.ac.jp
# $FreeBSD$

PORTNAME=   gpgme
PORTVERSION=    1.5.1
PORTREVISION=   1
CATEGORIES= security
MASTER_SITES=   GNUPG/gpgme

MAINTAINER= jhale@FreeBSD.org
COMMENT=    Library to make access to GnuPG easier

LICENSE=    LGPL21

LIB_DEPENDS=    libassuan.so:${PORTSDIR}/security/libassuan \
        libgpg-error.so:${PORTSDIR}/security/libgpg-error

GNU_CONFIGURE=  yes
USES=       cpe gmake libtool tar:bzip2
USE_LDCONFIG=   yes

CONFIGURE_ARGS= --includedir=${PREFIX}/include/gpgme
INSTALL_TARGET= install-strip

CPE_VENDOR= gnu

INFO=       gpgme
PORTDOCS=   AUTHORS ChangeLog INSTALL NEWS README THANKS TODO

OPTIONS_DEFINE=     DOCS UISERVER
OPTIONS_SINGLE=     GNUPG
OPTIONS_SINGLE_GNUPG=   GNUPG1 GNUPG2
OPTIONS_DEFAULT=    GNUPG2 UISERVER

GNUPG1_DESC=        Build gpgme library for GnuPG 1.x
GNUPG1_BUILD_DEPENDS=   gpgv:${PORTSDIR}/security/gnupg1
GNUPG1_RUN_DEPENDS= gpgv:${PORTSDIR}/security/gnupg1

GNUPG2_DESC=        Build gpgme library for GnuPG 2.x
GNUPG2_BUILD_DEPENDS=   gpg2:${PORTSDIR}/security/gnupg
GNUPG2_RUN_DEPENDS= gpg2:${PORTSDIR}/security/gnupg

UISERVER_DESC=          GnuPG UI server support
UISERVER_CONFIGURE_ENABLE=  fd-passing

.include <bsd.port.options.mk>

.if !exists(${LOCALBASE}/bin/gpgsm)
CONFIGURE_ARGS+=    --disable-gpgsm-test
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
                    ${WRKSRC}/${CONFIGURE_SCRIPT} \
                    ${WRKSRC}/src/Makefile.in \
                    ${WRKSRC}/src/gpgme-config.in \
                    ${WRKSRC}/tests/gpg/Makefile.in
    @${REINPLACE_CMD} -e 's|^clfilesdir.*|clfilesdir=$$\(libdir\)/common-lisp/gpgme|g' \
                    ${WRKSRC}/lang/cl/Makefile.in

post-install:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>