# $Id: Portfile 87096 2011-11-10 17:47:50Z blair@macports.org $

PortSystem      1.0
PortGroup       python26 1.0

name            protobuf-python26
version         2.4.1
categories      devel
maintainers     blair
supported_archs noarch
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}
dist_subdir     protobuf-cpp
use_bzip2       yes
checksums       md5 ed436802019c9e1f40cc750eaf78f318 \
                sha1 df5867e37a4b51fb69f53a8baf5b994938691d6d \
                rmd160 405eccad08463c2f84064bb68d8a8e757235765f

platforms       darwin

depends_lib     port:protobuf-cpp \
                port:py26-distribute

worksrcdir      ${worksrcdir}/python

build.env       PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
build.cmd-append build_ext -I${prefix}/include

destroot.env    PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp

test.run        yes
test.env        PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
test.cmd        "${prefix}/bin/python2.6 setup.py"
test.target     test
