diff options
author | gavan <gavan@pkgsrc.org> | 2017-08-17 01:28:52 +0000 |
---|---|---|
committer | gavan <gavan@pkgsrc.org> | 2017-08-17 01:28:52 +0000 |
commit | 6a107b78f217f4945c958346d1f881ceef7683d0 (patch) | |
tree | 8dc13aaab44f024d769f5856304b3ba333d5b608 /devel | |
parent | dab87e632d0857c6ab4dc3f23a0fad35017947bb (diff) | |
download | pkgsrc-6a107b78f217f4945c958346d1f881ceef7683d0.tar.gz |
Add go-homedir package
Diffstat (limited to 'devel')
-rw-r--r-- | devel/go-homedir/DESCR | 5 | ||||
-rw-r--r-- | devel/go-homedir/Makefile | 19 | ||||
-rw-r--r-- | devel/go-homedir/PLIST | 7 | ||||
-rw-r--r-- | devel/go-homedir/buildlink3.mk | 17 | ||||
-rw-r--r-- | devel/go-homedir/distinfo | 6 |
5 files changed, 54 insertions, 0 deletions
diff --git a/devel/go-homedir/DESCR b/devel/go-homedir/DESCR new file mode 100644 index 00000000000..3cce38eedae --- /dev/null +++ b/devel/go-homedir/DESCR @@ -0,0 +1,5 @@ +This is a Go library for detecting the user's home directory without the use of cgo, so the library can be used in cross-compilation environments. + +Usage is incredibly simple, just call homedir.Dir() to get the home directory for a user, and homedir.Expand() to expand the ~ in a path to the home directory. + +Why not just use os/user? The built-in os/user package requires cgo on Darwin systems. This means that any Go code that uses that package cannot cross compile. But 99% of the time the use for os/user is just to retrieve the home directory, which we can do for the current user without cgo. This library does that, enabling cross-compilation. diff --git a/devel/go-homedir/Makefile b/devel/go-homedir/Makefile new file mode 100644 index 00000000000..a675f3eb140 --- /dev/null +++ b/devel/go-homedir/Makefile @@ -0,0 +1,19 @@ +# $NetBSD: Makefile,v 1.1 2017/08/17 01:28:52 gavan Exp $ + +DISTNAME= go-homedir-0.0.20161203 +MASTER_SITES= ${MASTER_SITE_GITHUB:=mitchellh/} +CATEGORIES= devel +GITHUB_TAG= b8bc1bf767474819792c23f32d8286a45736f1c6 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/mitchellh/go-homedir +COMMENT= Go library for detecting and expanding the user's home directory without cgo. +LICENSE= mit + +GO_DIST_BASE= ${DISTNAME} +GO_DIST_BASE= ${GITHUB_PROJECT}-${GITHUB_TAG} +GO_SRCPATH= github.com/mitchellh/go-homedir + +.include "../../lang/go/go-package.mk" +.include "../../mk/bsd.pkg.mk" + diff --git a/devel/go-homedir/PLIST b/devel/go-homedir/PLIST new file mode 100644 index 00000000000..9b2e14679a6 --- /dev/null +++ b/devel/go-homedir/PLIST @@ -0,0 +1,7 @@ +@comment $NetBSD: PLIST,v 1.1 2017/08/17 01:28:52 gavan Exp $ +gopkg/pkg/${GO_PLATFORM}/github.com/mitchellh/go-homedir.a +gopkg/src/github.com/mitchellh/go-homedir/LICENSE +gopkg/src/github.com/mitchellh/go-homedir/README.md +gopkg/src/github.com/mitchellh/go-homedir/homedir.go +gopkg/src/github.com/mitchellh/go-homedir/homedir_test.go +@pkgdir bin diff --git a/devel/go-homedir/buildlink3.mk b/devel/go-homedir/buildlink3.mk new file mode 100644 index 00000000000..e7b8a03e53e --- /dev/null +++ b/devel/go-homedir/buildlink3.mk @@ -0,0 +1,17 @@ +# $NetBSD: buildlink3.mk,v 1.1 2017/08/17 01:28:52 gavan Exp $ + +BUILDLINK_TREE+= go-homedir + +.if !defined(GO_HOMEDIR_BUILDLINK3_MK) +GO_HOMEDIR_BUILDLINK3_MK:= + +BUILDLINK_CONTENTS_FILTER.go-homedir= ${EGREP} gopkg/ +BUILDLINK_DEPMETHOD.go-homedir?= build + +BUILDLINK_API_DEPENDS.go-homedir+= go-homedir>=0.0 +BUILDLINK_PKGSRCDIR.go-homedir?= ../../devel/go-homedir + +.endif # GO_HOMEDIR_BUILDLINK3_MK + +BUILDLINK_TREE+= -go-homedir + diff --git a/devel/go-homedir/distinfo b/devel/go-homedir/distinfo new file mode 100644 index 00000000000..66ca5f904c3 --- /dev/null +++ b/devel/go-homedir/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2017/08/17 01:28:52 gavan Exp $ + +SHA1 (go-homedir-0.0.20161203-b8bc1bf767474819792c23f32d8286a45736f1c6.tar.gz) = 2dbe35e5d2b67fefd55077a81139192e864d84e4 +RMD160 (go-homedir-0.0.20161203-b8bc1bf767474819792c23f32d8286a45736f1c6.tar.gz) = 5a043564e1ad83b31da8b271bb825e82780c68f8 +SHA512 (go-homedir-0.0.20161203-b8bc1bf767474819792c23f32d8286a45736f1c6.tar.gz) = 06ce740663a17f09fede31738dbe7d4e56522fad8b5cf899b578409029a1014ee1e4a5f6ee46931c298cfcd46e3881944b6f8aa182b4482b75f808d7be233ec5 +Size (go-homedir-0.0.20161203-b8bc1bf767474819792c23f32d8286a45736f1c6.tar.gz) = 2999 bytes |