Ticket #65988: Portfile

File Portfile, 2.0 KB (added by barracuda156, 19 months ago)

Portfile used:

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
3PortSystem          1.0
4PortGroup           cmake 1.1
5PortGroup           github 1.0
6PortGroup           legacysupport 1.1
7
8# CLOCK_MONOTONIC is available on macOS Sierra and newer
9legacysupport.newest_darwin_requires_legacy 15
10
11github.setup        apple swift-corelibs-libdispatch 469c8ecfa0011f5da23acacf8658b6a60a899a78
12name                libdispatch
13version             2022.10.01
14categories          devel
15license             Apache-2
16maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
17description         Grand Central Dispatch
18long_description    Grand Central Dispatch (GCD or libdispatch) provides comprehensive support for concurrent code execution on multicore hardware.
19homepage            https://apple.github.io/swift-corelibs-libdispatch/
20
21checksums           rmd160  4cef1233c5a05741c5e11277f92e1a91b4f24e6b \
22                    sha256  f8b4e5ec371766ca269355f668275fcf9ab8c09da09f1a8f54471cbcb459dc1c \
23                    size    594288
24
25worksrcdir          ${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.
35platform 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
48compiler.c_standard 2011
49compiler.cxx_standard 2011
50compiler.thread_local_storage yes