aboutsummaryrefslogtreecommitdiffstats
path: root/net/libvncserver/Makefile
blob: 862be362374e9feacb08f09503d9c48e6bbcfb92 (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
# Created by: ijliao
# $FreeBSD$

PORTNAME=   libvncserver
PORTVERSION=    0.9.9
PORTREVISION=   5
CATEGORIES= net devel
MASTER_SITES=   SF
DISTNAME=   LibVNCServer-${PORTVERSION}

MAINTAINER= bapt@FreeBSD.org
COMMENT=    Provide an easy API to write one's own vnc server

LICENSE=    GPLv2

LIB_DEPENDS=    jpeg:${PORTSDIR}/graphics/jpeg \
        png15:${PORTSDIR}/graphics/png

USES=   pathfix
USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
CONFIGURE_ARGS= --without-x

OPTIONS_DEFINE= GNUTLS OPENSSL GCRYPT IPV6
OPTIONS_DEFAULT=    OPENSSL
GNUTLS_DESC=    Enable GnuTLS support
OPENSSL_DESC=   Enable OpenSSL support
GCRYPT_DESC=    Enable libgcrypt support

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGNUTLS}
LIB_DEPENDS+=       gnutls:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+=    --with-gnutls
.else
CONFIGURE_ARGS+=    --without-gnutls
.endif

.if ${PORT_OPTIONS:MOPENSSL}
USE_OPENSSL=    yes
CONFIGURE_ARGS+=    --with-ssl
.else
CONFIGURE_ARGS+=    --without-crypto --without-ssl
.endif

.if ${PORT_OPTIONS:MGCRYPT}
LIB_DEPENDS+=       gcrypt:${PORTSDIR}/security/libgcrypt
CONFIGURE_ARGS+=    --with-gcrypt
.else
CONFIGURE_ARGS+=    --without-gcrypt
.endif

.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+=    --with-ipv6
.else
CONFIGURE_ARGS+=    --without-ipv6
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e \
        '/^SUBDIRS/s|x11vnc||g' ${WRKSRC}/Makefile.in

post-install:
    ${INSTALL_DATA} ${WRKSRC}/rfb/default8x16.h ${PREFIX}/include/rfb

.include <bsd.port.mk>