# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 92980 2012-05-12 16:08:12Z cal@macports.org $

PortSystem              1.0

name                    nxproxy
version                 3.5.0-1

categories              net
platforms               darwin
license                 GPL-2

maintainers             cal openmaintainer

description             nxproxy is a compressing proxy for X
long_description        nxproxy is a library compressing X commands to be passed over network \
                        for use with x2go.

homepage                http://www.nomachine.com/
master_sites            http://code.x2go.org/releases/source/nx-libs/nxproxy/
worksrcdir              ${name}
checksums               rmd160  82d0e132c94ff259485ac166fa4ac380bb9371f5 \
                        sha256  8aa59727dfcd914d73447992120e100c20d17df5aeb42c4ac6712e13d56bbb1e

universal_variant       yes
supported_archs         ppc i386 x86_64

depends_lib             port:nxcomp

livecheck.url           ${master_sites}
livecheck.regex         ${name}-(\[0-9\]+(\\.\[0-9\]+)+(-\[0-9\]+)?)

post-configure {
    reinplace -E "s|-L../nxcomp|-L${prefix}/lib/|g" ${worksrcpath}/Makefile
    reinplace -E "s|-I../nxcomp|-I${prefix}/include/nxcomp|g" ${worksrcpath}/Makefile
    reinplace -E "s|prefix      = ${prefix}|prefix      = \$(DESTDIR)${prefix}|g" ${worksrcpath}/Makefile
    if {[variant_isset universal]} {
        reinplace -E "s|CXXFLAGS =|CXXFLAGS = ${configure.universal_cxxflags}|g" ${worksrcpath}/Makefile
    }
}

