# -*- 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 github 1.0 PortGroup muniversal 1.1 set csname CoreLocationCLI github.setup fulldecent [string tolower ${csname}] 4.0.4 github.tarball_from archive revision 0 platforms {darwin >= 19} categories sysutils license MIT maintainers {i0ntempest @i0ntempest} openmaintainer description Command line program to print location information from CoreLocation long_description ${csname} gets the physical location of your device and prints it to standard output.\ If you move it can also print your updated location. checksums rmd160 941ab21b648b0f1059acd1575a452d4351fcf3aa \ sha256 55f65d6f52c2a40fde1aed5da58b5c82fce243bb350cfbdb68c77244000e0d21 \ size 11012 use_configure no universal_variant yes post-patch { system -W ${worksrcpath} "/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${version}\" Info.plist" } build.cmd swiftc build.target Sources/${csname}/main.swift build.args -O -whole-module-optimization -o ${csname} if {${universal_possible} && [variant_isset universal]} { foreach arch "${muniversal.architectures}" { build.args.${arch}-append -target "${arch}-${triplet.vendor}-${triplet.os}" } } destroot { # Binary must be packaged as an app and signed to pass macOS Privacy checks and function properly # But it does not have a GUI so not putting it into ${applications_dir} file mkdir -p ${destroot}${prefix}/libexec/${name}/${csname}.app/Contents/MacOS/ xinstall -m 755 ${worksrcpath}/${csname} ${destroot}${prefix}/libexec/${name}/${csname}.app/Contents/MacOS/ xinstall -m 644 ${worksrcpath}/Info.plist ${destroot}${prefix}/libexec/${name}/${csname}.app/Contents/ system -W ${destroot}${prefix}/libexec/${name} "/usr/bin/codesign --sign - --deep --force ${csname}.app" ln -s ${prefix}/libexec/${name}/${csname}.app/Contents/MacOS/${csname} ${destroot}${prefix}/bin/${name} }