aboutsummaryrefslogtreecommitdiffstats
path: root/net/nxproxy/Makefile
blob: 228ea27fd8da3425d59e5b5d12ca7b71db619a25 (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
# New ports collection makefile for:    nxproxy
# Date created:             2010-06-24
# Whom:                 arved
#
# $FreeBSD$

PORTNAME=   nxproxy
DISTVERSION=    3.4.0-2
PORTREVISION=   1
CATEGORIES= net
MASTER_SITES=   http://x2go.obviously-nice.de/deb/pool-lenny/nxproxy/:nxproxy \
        http://x2go.obviously-nice.de/deb/pool-lenny/nxcomp/:nxcomp
DISTFILES=  nxcomp-${DISTVERSION:S/2/1/}.tar.gz:nxcomp\
        nxproxy-${DISTVERSION}.tar.gz:nxproxy

MAINTAINER= arved@FreeBSD.org
COMMENT=    An x2go helper program

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

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/LICENSE
CONFLICTS=  nxserver-[0-9]*
GNU_CONFIGURE=  yes
USE_XORG=   ice x11 sm
PLIST_FILES=    bin/nxproxy bin/setsid

.include <bsd.port.pre.mk>

post-extract:
    ${LN} -sf ${WRKDIR}/nxcomp-${DISTVERSION:S/2/1/} ${WRKDIR}/nxcomp

post-patch:
    ${REINPLACE_CMD} -e "s,-O3,${CFLAGS}," ${WRKSRC}/configure \
        ${WRKDIR}/nxcomp/configure
    ${REINPLACE_CMD} -e "s,-lXcomp, -L${PREFIX}/lib -lpng -ljpeg ../nxcomp/libXcomp.a," \
        ${WRKSRC}/configure
.if ${OSVERSION} < 700000
    ${REINPLACE_CMD} -e "s,result = unsetenv,unsetenv," ${WRKDIR}/nxcomp/Children.cpp
.endif

pre-configure:
    cd ${WRKDIR}/nxcomp; ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS};

pre-build:
    cd ${WRKDIR}/nxcomp; ${MAKE_ENV} ${MAKE}
    cd ${WRKSRC}; ${CC} ${CFLAGS} ${FILESDIR}/setsid.c -o setsid

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/nxproxy ${PREFIX}/bin
    ${INSTALL_PROGRAM} ${WRKSRC}/setsid ${PREFIX}/bin

.include <bsd.port.post.mk>