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 python 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | PortGroup cxx11 1.1 |
---|
7 | |
---|
8 | name py-protobuf3.8 |
---|
9 | version 3.8.0 |
---|
10 | categories-append devel |
---|
11 | maintainers {toby @tobypeterson} openmaintainer |
---|
12 | license BSD |
---|
13 | description Encode data in an efficient yet extensible format. |
---|
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.setup google protobuf ${version} v |
---|
33 | github.tarball_from releases |
---|
34 | homepage https://github.com/google/protobuf |
---|
35 | master_sites https://github.com/google/protobuf/releases/download/v${version} |
---|
36 | distfiles protobuf-python-${version}.tar.gz |
---|
37 | worksrcdir protobuf-${version} |
---|
38 | |
---|
39 | checksums sha256 3b7c258a79839056f2ee3be467581b4acac3e091f7757c8203360b354d32afd5 \ |
---|
40 | rmd160 722f912c1e457319b16efed46f2c5a94ab94dde9 \ |
---|
41 | size 4861658 |
---|
42 | |
---|
43 | platforms darwin |
---|
44 | |
---|
45 | python.versions 27 35 36 37 38 |
---|
46 | |
---|
47 | if {${name} ne ${subport}} { |
---|
48 | conflicts py${python.version}-protobuf \ |
---|
49 | py${python.version}-protobuf3 |
---|
50 | |
---|
51 | depends_build port:py${python.version}-setuptools |
---|
52 | |
---|
53 | depends_lib port:protobuf3.8-cpp \ |
---|
54 | port:py${python.version}-six |
---|
55 | |
---|
56 | worksrcdir ${worksrcdir}/python |
---|
57 | |
---|
58 | # tricks to force the right -stdlib setting |
---|
59 | # and to put a needed CXX flag on the 10.6 build |
---|
60 | # see https://trac.macports.org/ticket/56482 |
---|
61 | patchfiles-append patch-py-protobuf3-settings.diff |
---|
62 | |
---|
63 | post-patch { |
---|
64 | set extraargs "" |
---|
65 | set clang_stdlib "" |
---|
66 | |
---|
67 | if {[string match *clang* ${configure.compiler}]} { |
---|
68 | set clang_stdlib -stdlib=${configure.cxx_stdlib} |
---|
69 | |
---|
70 | if {${os.platform} eq "darwin" && ${os.major} < 11} { |
---|
71 | set extraargs -DGOOGLE_PROTOBUF_NO_THREADLOCAL |
---|
72 | } |
---|
73 | } |
---|
74 | |
---|
75 | reinplace "s|@@MACPORTS_STDLIB@@|${clang_stdlib}|g" setup.py |
---|
76 | reinplace "s|@@MACPORTS_EXTRAARG@@|${extraargs}|g" setup.py |
---|
77 | } |
---|
78 | |
---|
79 | |
---|
80 | destroot.cmd-append --cpp_implementation |
---|
81 | |
---|
82 | test.run yes |
---|
83 | test.cmd "${python.bin} setup.py" |
---|
84 | test.target test --cpp_implementation |
---|
85 | |
---|
86 | livecheck.type none |
---|
87 | } |
---|
88 | |
---|
89 | github.livecheck.regex {([0-9.]+)} |
---|