# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                vpcs
version             0.8c-20160224

categories          emulators
license             BSD
maintainers         {gmail.com:lasticppc @lastic} openmaintainer
platforms           darwin

description         Virtual PC Simulator particularly of use with the Cisco dynamips emulator.
long_description    ${description} The VPCS can simulate up to 9 PCs. \
                    You can ping/traceroute them, or ping/traceroute the other hosts/routers \
                    from the virtual PCs when you study the Cisco routers in the Dynamips. \
                    VPCS is not the traditional PC, it is just a program running on the Linux or Windows, \
                    and only few network commands can be used in it. \
                    But VPCS can give you a big hand when you study the Cisco devices in the Dynamips. \
                    VPCS can replace the routers or VMware boxes which are used as PCs in the Dynamips network.\
                    Try VPCS, it can save your CPU/Memory. It is very small.

homepage            https://wiki.freecode.com.cn/doku.php?id=wiki:vpcs

master_sites        https://sourceforge.net/code-snapshots/svn/v/vp/vpcs/code/

checksums           rmd160   5f633b911a6c0c75b308c1d5e8d12932930ba0c8 \
                    sha256   36182e14866d181e01a7f525cfad6e42f0a8f50f1c6dbce74e91472fd7d41411 \
                    size     171386

use_zip             yes
set release         126
distname            ${name}-code-r${release}-trunk

patchfiles          patch-arch-ppc-fix.diff \
                    patch-nonlinux-test-fix.diff \
                    patch-makefiles-osx.diff

worksrcdir          ${distname}/src

use_configure       no

platform darwin powerpc {
                    build.target        powerpc
}

build.cmd           ./mk.sh
build.env           CXX=${configure.cxx} \
                    "CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
                    CC=${configure.cc} \
                    "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
                    PREFIX=${prefix}

destroot {
    copy ${worksrcpath}/vpcs ${destroot}${prefix}/bin/vpcs
    copy ${worksrcpath}/../man/vpcs.1 ${destroot}${prefix}/share/man/man1/vpcs.1
}
