# -*- 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           xcode 1.0

name                dtrace
version             370.40.1
categories          sysutils
maintainers         nomaintainer
license             APSL-2 CDDL
# error: An empty identity is not valid when signing a binary for the product type 'Command-line Tool'. (in target 'ctfconvert' from project 'dtrace')
platforms           {darwin < 22}

description         DTrace support tools
long_description    The ctfconvert, ctfmerge and ctfdump tools for \
                    DTrace, required to build the XNU kernel. The main \
                    dtrace tool and libraries are not included, because \
                    these rely on an unpublished private framework.

homepage            http://opensource.apple.com/source/${name}/
master_sites        https://github.com/apple-oss-distributions/${name}/archive/

checksums           rmd160  2c1375c56ea6b620a791ea154cc8bd56e3ee1003 \
                    sha256  e1ae4c8163eb5e808b5ad6cf60d812c42f754a75eae2909dcb6df4d0632547e2 \
                    size    1281877

xcode.destroot.path ${prefix}/bin
xcode.target        ctfconvert ctfmerge ctfdump

# for ppc support
if {${os.major} == 9} {
    version         48.1

    checksums       rmd160  b909716f534fcfeb0cdc36cb47c78abf76a1b421 \
                    sha256  25da58051aef4c781684899fb19d3f217b332ef5cfa134d97b396021d8f50cf8 \
                    size    1858024

    depends_build   path:${prefix}/lib/libiberty.a:binutils
    xcode.build.settings    LIBRARY_SEARCH_PATHS='${prefix}/lib'
    xcode.destroot.settings LIBRARY_SEARCH_PATHS='${prefix}/lib'
}

# handle stealth update; remove with next version change
dist_subdir         ${name}/${version}_1
worksrcdir          ${name}-${distname}

livecheck.type      regex
livecheck.regex     "${name}-(\[\\d.\]+)"
