# $Id$

PortSystem              1.0

name                    3proxy
version                 0.6.1
categories              net
platforms               darwin
license                 BSD GPL-2+ LGPL-2.1+ Apache
maintainers             mail.ru:nano103
description             tiny free proxy server
long_description        3proxy is a universal proxy server. It can be used \
                        to provide internal users with fully controllable \
                        access to external resources or to provide external \
                        users with access to internal resources.
homepage                http://3proxy.ru/
master_sites            ${homepage}${version}/

extract.suffix          .tgz

checksums               md5     03790467a12e16ed8785ae688ecf9b68 \
                        sha1    07e3f687585c6281847316b0f9220c5b071b3dde \
                        rmd160 9c0394401f31341e09f653a709ca0392c9451e32

patchfiles              Makefile.unix-install.diff
post-patch {
    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Makefile.unix-install
    reinplace "s/-O2/-O2 ${configure.cc_archflags}/g" ${worksrcpath}/Makefile.unix
}

use_configure           no

build.args              -f Makefile.unix CC="${configure.cc}" \
                        LN="${configure.cc}"
destroot.args           -f Makefile.unix-install