# $Id: Portfile 53308 2009-07-03 00:32:43Z blair@macports.org $

PortSystem 1.0

name            protobuf-cpp
version         2.1.0
categories      devel
maintainers     blair
description     Encode data in an efficient yet extensible format.

long_description \
                Google Protocol Buffers are a flexible, efficient, \
                automated mechanism for serializing structured data -- \
                think XML, but smaller, faster, and simpler.  You \
                define how you want your data to be structured once, \
                then you can use special generated source code to \
                easily write and read your structured data to and from \
                a variety of data streams and using a variety of \
                languages.  You can even update your data structure \
                without breaking deployed programs that are compiled \
                against the "old" format.  You specify how you want \
                the information you're serializing to be structured by \
                defining protocol buffer message types in .proto \
                files.  Each protocol buffer message is a small \
                logical record of information, containing a series of \
                name-value pairs.

homepage        http://code.google.com/p/protobuf/
master_sites    googlecode:protobuf

distname        protobuf-${version}
use_bzip2       yes
checksums       md5 7aedd257d8723c128cc1529c4675f858 \
                sha1 042025cac0b8f76468091bc796d3fd8807a4664f \
                rmd160 f209732febc8d4cc321246c5caff2b7502d13073

platforms       darwin

configure.cflags-append         -g
configure.cppflags-append       -g

post-destroot {
        set docdir ${destroot}${prefix}/share/doc/${name}

        xinstall -d -m 755 ${docdir}

        foreach f {CHANGES.txt CONTRIBUTORS.txt COPYING.txt INSTALL.txt README.txt examples} {
                file copy ${worksrcpath}/${f} ${docdir}
        }
}

test.run        yes
test.cmd        "ulimit -c 0; make"
test.target     check
