diff --git a/graphics/d2/Portfile b/graphics/d2/Portfile new file mode 100644 index 0000000000000..441627e6a9dd0 --- /dev/null +++ b/graphics/d2/Portfile @@ -0,0 +1,41 @@ +# -*- 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 golang 1.0 + +go.setup github.com/terrastruct/d2 0.0.13 v +go.package oss.terrastruct.com/d2 +github.tarball_from archive +revision 0 + +description D2 is a modern diagram scripting language that turns text \ + to diagrams. + +long_description {*}${description} + +categories graphics +installs_libs no +license MPL-2 +maintainers {gmail.com:herby.gillot @herbygillot} \ + openmaintainer + +checksums rmd160 de9c2ab4aaa072aeca46739eb9814c0fdb58030d \ + sha256 52fd8cddfb7fb34d88a0d6049c038bc31447216ede659d892ec13e288ab966e7 \ + size 26302041 + +build.env-delete GO111MODULE=off GOPROXY=off + +build.pre_args-append \ + -o ./bin + +build.args ./cmd/... + +pre-build { + file mkdir ${worksrcpath}/bin +} + +destroot { + foreach x [glob ${worksrcpath}/bin/*] { + xinstall -m 0755 ${x} ${destroot}${prefix}/bin/ + } +}