/
Portfile
60 lines (52 loc) · 2.12 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- 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
PortSystem 1.0
PortGroup cmake 1.1
PortGroup compiler_blacklist_versions 1.0
PortGroup github 1.0
PortGroup legacysupport 1.1
# https://trac.macports.org/ticket/67411
legacysupport.newest_darwin_requires_legacy 16
legacysupport.use_mp_libcxx yes
github.setup yhirose cpp-peglib 1.8.8 v
revision 0
categories devel
# Do not set is as noarch until this issue is fixed:
# https://trac.macports.org/ticket/69317
# platforms any
# supported_archs noarch
license MIT
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
description A single file C++ header-only PEG (Parsing Expression Grammars) library
long_description {*}${description}
checksums rmd160 498939f9f017000a5b98ae9597d49527fdbb420a \
sha256 3019d8084a146562fe2fd4c71e3226ac6e3994e8cee21cab27b3cd5a86bcef34 \
size 228192
github.tarball_from archive
# The port needs Gtest for building tests, however linking to external Gtest fails.
# It uses git to fetch needed branch of Gtest.
platform darwin {
if {${os.major} < 13} {
# Lion+ (with Xcode 4.1+) have git; earlier need to bring their own.
# On 10.8.5 git fetch fails with ssl error.
depends_build-append port:git
git.cmd ${prefix}/bin/git
}
}
compiler.cxx_standard 2017
compiler.blacklist-append \
{clang < 902}
configure.args-append \
-DBUILD_TESTS=ON \
-DTHREADS_PREFER_PTHREAD_FLAG=ON
# We do not want a conflict with Gtest port, so implement a manual destroot.
destroot {
copy ${worksrcpath}/peglib.h ${destroot}${prefix}/include/
xinstall -d ${destroot}${prefix}/share/${name}
fs-traverse f ${worksrcpath}/docs {
if {[file exists ${f}] && [file isfile ${f}]} {
copy ${f} ${destroot}${prefix}/share/${name}/
}
}
}
test.run yes
test.cmd ctest