source: trunk/dports/devel/jsoncpp/Portfile

Last change on this file was 154300, checked in by michaelld@…, 9 months ago

jsoncpp*: require a c++11 compliant compiler.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
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# $Id: Portfile 154300 2016-10-26 16:55:34Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           cmake 1.0
7
8name                jsoncpp
9categories          devel
10platforms           darwin
11maintainers         michaelld openmaintainer
12license             MIT
13
14description         JSON C++ library
15
16long_description    JSON data format manipulation C++ library
17
18subport jsoncpp-devel {}
19
20if {${subport} eq ${name}} {
21
22    # release
23    github.setup    open-source-parsers jsoncpp 1.7.7
24    checksums       rmd160 c78b702eadfc845b8d99bfbed07492c776fa7761 \
25                    sha256 00fe9895d03a693e0f876e1ce0f88059bebc185029d6bee9bf452a7c37986a02
26
27    conflicts       jsoncpp-devel
28
29} else {
30
31    # devel
32
33    github.setup    open-source-parsers jsoncpp a1db52b030416c0c03868e1be95689a6f05a20a5
34    version         20161024
35    checksums       rmd160 3e8d8bc104bea336d07af6c58a80daa7e3f6c367 \
36                    sha256 e86f1d4ba65c5b733d772dd58a3eed66ba48a9b27fa1169dcea7243a44b158b1
37
38    conflicts       jsoncpp
39    long_description ${description}: \
40        This port follows the GIT master version of ${name}, which is typically updated every few days to weeks.
41
42}
43
44patchfiles          patch-CMakeLists.txt.diff
45
46cmake.out_of_source yes
47
48configure.args-append \
49                    -DBUILD_SHARED_LIBS=ON \
50                    -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
51
52# require c++11
53
54if {${configure.cxx_stdlib} eq "libstdc++"} {
55
56    # *clang* when using libstdc++ do not seem to support C++11;
57    # C++11 support seems to need GCC 4.7+ when using libstdc++;
58    # could use C++0x support on GCC4.[56], but just ignore it since
59    # there are newer compilers already in place as defaults.
60
61    # Blacklist GCC compilers not supporting C++11 and all CLANG.
62    # This is probably not necessary, but it's good practice.
63
64    compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
65
66    # and whitelist those we do want to use. wish there were a better way.
67    # these will be used in the order provided.
68
69    compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
70
71} else {
72
73    # using libc++;
74    # Blacklist Clang not supporting C++11 in some form and all GCC.
75    # Just use the cxx11 PortGroup for this specific case.
76
77    PortGroup cxx11 1.0
78
79}
Note: See TracBrowser for help on using the repository browser.