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 cmake 1.1 |
---|
5 | PortGroup github 1.0 |
---|
6 | PortGroup legacysupport 1.1 |
---|
7 | |
---|
8 | # CLOCK_MONOTONIC is available on macOS Sierra and newer |
---|
9 | legacysupport.newest_darwin_requires_legacy 15 |
---|
10 | |
---|
11 | github.setup apple swift-corelibs-libdispatch 469c8ecfa0011f5da23acacf8658b6a60a899a78 |
---|
12 | name libdispatch |
---|
13 | version 2022.10.01 |
---|
14 | categories devel |
---|
15 | license Apache-2 |
---|
16 | maintainers {@barracuda156 gmail.com:vital.had} openmaintainer |
---|
17 | description Grand Central Dispatch |
---|
18 | long_description Grand Central Dispatch (GCD or libdispatch) provides comprehensive support for concurrent code execution on multicore hardware. |
---|
19 | homepage https://apple.github.io/swift-corelibs-libdispatch/ |
---|
20 | |
---|
21 | checksums rmd160 4cef1233c5a05741c5e11277f92e1a91b4f24e6b \ |
---|
22 | sha256 f8b4e5ec371766ca269355f668275fcf9ab8c09da09f1a8f54471cbcb459dc1c \ |
---|
23 | size 594288 |
---|
24 | |
---|
25 | worksrcdir ${name}-${version} |
---|
26 | |
---|
27 | # Documentation suggest using Ninja with Cmake, but it fails on configure: |
---|
28 | # ninja: error: Makefile:5: expected '=', got ':' default_target: all |
---|
29 | #depends_build-append \ |
---|
30 | # port:ninja |
---|
31 | |
---|
32 | # This is supposed to work but does not: |
---|
33 | # CMake Error at tests/CMakeLists.txt:99 (target_link_libraries): |
---|
34 | # Target links to: BlocksRuntime::BlocksRuntime but the target was not found. |
---|
35 | platform darwin { |
---|
36 | if {${os.major} < 10 || (${os.major} == 10 && ${build_arch} eq "ppc")} { |
---|
37 | depends_lib-append port:libblocksruntime |
---|
38 | |
---|
39 | configure.args-append \ |
---|
40 | -DBlocksRuntime_INCLUDE_DIR=${prefix}/include \ |
---|
41 | -DBlocksRuntime_LIBRARIES=${prefix}/lib/libBlocksRuntime.dylib |
---|
42 | configure.ldflags-append -lBlocksRuntime |
---|
43 | } |
---|
44 | } |
---|
45 | |
---|
46 | #build.cmd ninja |
---|
47 | |
---|
48 | compiler.c_standard 2011 |
---|
49 | compiler.cxx_standard 2011 |
---|
50 | compiler.thread_local_storage yes |
---|