From 512cff9d75ea98dce1a8ce5a59f175581bea5411 Mon Sep 17 00:00:00 2001 From: Julien Rabinow Date: Sat, 31 Aug 2024 01:21:26 -0700 Subject: [PATCH] swiftformat: new port --- devel/swiftformat/Portfile | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 devel/swiftformat/Portfile diff --git a/devel/swiftformat/Portfile b/devel/swiftformat/Portfile new file mode 100644 index 0000000000000..4294f71ccc397 --- /dev/null +++ b/devel/swiftformat/Portfile @@ -0,0 +1,40 @@ +# -*- 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 + +github.setup nicklockwood swiftformat 0.54.3 +github.tarball_from archive +revision 0 + +platforms {darwin >= 21} +categories devel +license MIT +maintainers {jrabinow @jrabinow} openmaintainer +description Swift formatter +long_description A tool to format Swift code + +checksums rmd160 99a28b4b6b7cdfdca0fa25a7f8d82ff2b28f5b80 \ + sha256 f0fb5df2945d49207ef50da971810e6879acb0153267bec0be0d882f77781649 \ + size 3154784 + +# Clearing CPATH because of header conflicts with MacOSX13.sdk when using swiftPM build system +compiler.cpath + +use_configure no +use_xcode yes + +build.cmd swift +build.target build +build.args --configuration release --disable-sandbox + +test.run yes +test.cmd swift +test.target test +test.args --disable-sandbox + +set builtproductdir ${worksrcpath}/.build/release + +destroot { + xinstall -m 755 ${builtproductdir}/${name} ${destroot}${prefix}/bin/ +}