golang-design / clipboard

📋 cross-platform clipboard package that supports accessing text and image in Go (macOS/Linux/Windows/Android/iOS)
https://golang.design/x/clipboard
MIT License
632 stars 68 forks source link

Add *BSD support #55

Open arturbrzoz opened 1 year ago

arturbrzoz commented 1 year ago

Hi,

when building on recent FreeBSD 14.0 and OpenBSD 7.3 (amd64):

$ go install golang.design/x/clipboard/cmd/gclip@latest
# golang.design/x/clipboard
.go/pkg/mod/golang.design/x/clipboard@v0.7.0/clipboard.go:107:15: undefined: initialize
.go/pkg/mod/golang.design/x/clipboard@v0.7.0/clipboard.go:118:14: undefined: read
.go/pkg/mod/golang.design/x/clipboard@v0.7.0/clipboard.go:138:18: undefined: write
.go/pkg/mod/golang.design/x/clipboard@v0.7.0/clipboard.go:153:9: undefined: watch

I figure this is due to *BSDs not being explicitly supported, but perhaps there's a way to build clipboard anyways, especially since BSDs share a lot with Linux, including the X system.