1 | # -*- 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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | PortGroup cxx11 1.1 |
---|
6 | |
---|
7 | github.setup google protobuf 3.5.1 v |
---|
8 | name protobuf3-cpp |
---|
9 | categories devel |
---|
10 | maintainers blair |
---|
11 | license BSD |
---|
12 | description Encode data in an efficient yet extensible format. |
---|
13 | conflicts protobuf-cpp |
---|
14 | |
---|
15 | long_description \ |
---|
16 | Google Protocol Buffers are a flexible, efficient, \ |
---|
17 | automated mechanism for serializing structured data -- \ |
---|
18 | think XML, but smaller, faster, and simpler. You \ |
---|
19 | define how you want your data to be structured once, \ |
---|
20 | then you can use special generated source code to \ |
---|
21 | easily write and read your structured data to and from \ |
---|
22 | a variety of data streams and using a variety of \ |
---|
23 | languages. You can even update your data structure \ |
---|
24 | without breaking deployed programs that are compiled \ |
---|
25 | against the "old" format. You specify how you want \ |
---|
26 | the information you're serializing to be structured by \ |
---|
27 | defining protocol buffer message types in .proto \ |
---|
28 | files. Each protocol buffer message is a small \ |
---|
29 | logical record of information, containing a series of \ |
---|
30 | name-value pairs. |
---|
31 | |
---|
32 | github.tarball_from releases |
---|
33 | distname protobuf-cpp-${version} |
---|
34 | worksrcdir protobuf-${version} |
---|
35 | |
---|
36 | if {${os.platform} eq "darwin" && ${os.major} < 11} { |
---|
37 | if {[string match *clang* ${configure.compiler}] && ${configure.cxx_stdlib} eq "macports-libstdc++"} { |
---|
38 | # GCC emulates thread-local storage |
---|
39 | compiler.whitelist macports-gcc-7 |
---|
40 | } else { |
---|
41 | configure.cppflags-append -DGOOGLE_PROTOBUF_NO_THREADLOCAL |
---|
42 | } |
---|
43 | } |
---|
44 | |
---|
45 | checksums rmd160 21375095e562cfee25ba68d68e481cf608ac9a9a \ |
---|
46 | sha256 c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092 |
---|
47 | |
---|
48 | platforms darwin |
---|
49 | |
---|
50 | depends_lib port:zlib |
---|
51 | |
---|
52 | # see https://trac.macports.org/wiki/UsingTheRightCompiler |
---|
53 | configure.env-append \ |
---|
54 | CC_FOR_BUILD=${configure.cc} \ |
---|
55 | CXX_FOR_BUILD=${configure.cxx} |
---|
56 | |
---|
57 | configure.cflags-append -g |
---|
58 | configure.cppflags-append -g |
---|
59 | |
---|
60 | depends_build-append port:libtool |
---|
61 | post-configure { |
---|
62 | # when linking, libtool does not respect -stdlib |
---|
63 | delete ${worksrcpath}/libtool |
---|
64 | xinstall -m 0755 ${prefix}/bin/glibtool ${worksrcpath}/libtool |
---|
65 | } |
---|
66 | |
---|
67 | post-destroot { |
---|
68 | set docdir ${destroot}${prefix}/share/doc/${name} |
---|
69 | |
---|
70 | xinstall -d -m 755 ${docdir} |
---|
71 | |
---|
72 | foreach f {CHANGES.txt CONTRIBUTORS.txt LICENSE README.md editors examples} { |
---|
73 | file copy ${worksrcpath}/${f} ${docdir} |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | test.run yes |
---|
78 | test.target check |
---|