aboutsummaryrefslogtreecommitdiffstats
path: root/net/x11vnc/Makefile
blob: 72ca1b822d88c713b0d6cb892b3a76fdaa7b82b4 (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
# Created by: Loren M. Lang
# $FreeBSD$

PORTNAME=   x11vnc
PORTVERSION=    0.9.13
PORTREVISION=   1
CATEGORIES= net
MASTER_SITES=   SF/libvncserver/${PORTNAME}/${PORTVERSION}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    VNC server for use with real X displays

LICENSE=    GPLv2

LIB_DEPENDS=    jpeg:${PORTSDIR}/graphics/jpeg \
        dbus:${PORTSDIR}/devel/dbus \
        xcb:${PORTSDIR}/x11/libxcb \
        pthread-stubs:${PORTSDIR}/devel/libpthread-stubs

USE_XORG=   x11 xdamage xfixes xrandr xinerama xext xtst xau xrender xdmcp recordproto

# Sets LDFLAGS and adds to CONFIGURE_ENV, therefore we set LDFLAGS
LDFLAGS+=   -L${LOCALBASE}/lib
USE_OPENSSL=    yes
USE_ICONV=  yes
GNU_CONFIGURE=  yes
CPPFLAGS+=  -I${LOCALBASE}/include

MAN1=       x11vnc.1
PORTDOCS=   AUTHORS COPYING ChangeLog NEWS README README.LibVNCServer TODO

OPTIONS_DEFINE=NLS AVAHI
OPTIONS_DEFAULT=NLS AVAHI
NO_OPTIONS_SORT=yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT=    yes
.endif

.if ${PORT_OPTIONS:MAVAHI}
LIB_DEPENDS+=   avahi-common:${PORTSDIR}/net/avahi-app
.else
CONFIGURE_ARGS+=    --without-avahi
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|include_HEADERS = |noinst_HEADERS = |' \
        -e 's|am__include_HEADERS_DIST|am__noinst_HEADERS_DIST|' \
        -e 's|/include/rfb|/include|' ${WRKSRC}/Makefile.in

.if !defined(NOPORTDOCS)
post-install:
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
.endif

.include <bsd.port.mk>