Index: Mk/Uses/go.mk =================================================================== --- Mk/Uses/go.mk +++ Mk/Uses/go.mk @@ -1,5 +1,12 @@ +# $FreeBSD$ +# # This file contains logic to ease porting of Go packages or binaries using # the `go` command. +# +# Feature: go +# Usage: USES=go +# Valid ARGS: none +# # You can set the following variables to control the process. # # GO_PKGNAME @@ -16,6 +23,11 @@ # CGO_LDFLAGS # Addional LDFLAGS variables to be passed to the C compiler by the `go` # command +# +# MAINTAINER: jlaffaye@FreeBSD.org + +.if !defined(_INCLUDE_USES_GO_MK) +_INCLUDE_USES_GO_MK= yes .if ${ARCH} == "i386" GOARCH= 386 @@ -77,3 +89,5 @@ fi; .endfor .endif + +.endif Index: databases/godis/Makefile =================================================================== --- databases/godis/Makefile +++ databases/godis/Makefile @@ -10,11 +10,10 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Redis client library written in Go +USES= go GO_PKGNAME= github.com/simonz05/${PORTNAME} pre-install: @${RM} ${WRKSRC}/fmt.sh -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: databases/gomdb/Makefile =================================================================== --- databases/gomdb/Makefile +++ databases/gomdb/Makefile @@ -13,7 +13,7 @@ ONLY_FOR_ARCHS= i386 amd64 -USES= compiler +USES= compiler go USE_GITHUB= yes GH_ACCOUNT= szferi @@ -32,5 +32,4 @@ CONFIGURE_ENV+= CC=${CC} GO_ENV+= ${CONFIGURE_ENV} -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" .include Index: databases/gosqlite3/Makefile =================================================================== --- databases/gosqlite3/Makefile +++ databases/gosqlite3/Makefile @@ -10,15 +10,16 @@ MAINTAINER= lichray@gmail.com COMMENT= Go interface for SQLite3 -USES= compiler +USES= compiler go LIB_DEPENDS+= libsqlite3.so:databases/sqlite3 GO_PKGNAME= github.com/kuroneko/${PORTNAME} .include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" + .if ${COMPILER_TYPE} == clang && ${CC} == cc CC= clang .endif + .include Index: databases/levigo/Makefile =================================================================== --- databases/levigo/Makefile +++ databases/levigo/Makefile @@ -14,7 +14,7 @@ ONLY_FOR_ARCHS= i386 amd64 -USES= compiler +USES= compiler go USE_GITHUB= yes GH_ACCOUNT= jmhodges @@ -35,5 +35,4 @@ CXX=${CXX} GO_ENV+= ${CONFIGURE_ENV} -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" .include Index: databases/redigo/Makefile =================================================================== --- databases/redigo/Makefile +++ databases/redigo/Makefile @@ -10,8 +10,7 @@ COMMENT= Go client for the Redis database WRKSRC= ${WRKDIR}/${DISTNAME}/redis +USES= go GO_PKGNAME= github.com/garyburd/${PORTNAME}/redis -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/gb/Makefile =================================================================== --- devel/gb/Makefile +++ devel/gb/Makefile @@ -12,6 +12,7 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go +USES= go USE_GITHUB= yes GH_ACCOUNT= constabulary @@ -28,6 +29,4 @@ ${MKDIR} ${STAGEDIR}${DOCSDIR} ( cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/ ; ) -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/git-lfs/Makefile =================================================================== --- devel/git-lfs/Makefile +++ devel/git-lfs/Makefile @@ -14,12 +14,11 @@ BROKEN= fails to build +USES= go USE_GITHUB= yes GH_ACCOUNT= github PLIST_FILES= bin/git-lfs GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-btree/Makefile =================================================================== --- devel/go-btree/Makefile +++ devel/go-btree/Makefile @@ -11,6 +11,7 @@ LICENSE= APACHE20 +USES= go USE_GITHUB= yes GH_ACCOUNT= google GH_PROJECT= ${PORTNAME} @@ -18,6 +19,4 @@ GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-flags/Makefile =================================================================== --- devel/go-flags/Makefile +++ devel/go-flags/Makefile @@ -11,6 +11,7 @@ LICENSE= BSD3CLAUSE +USES= go USE_GITHUB= yes GH_ACCOUNT= jessevdk GH_PROJECT= ${PKGNAMEPREFIX}${PORTNAME} @@ -18,6 +19,4 @@ GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-hashicorp-logutils/Makefile =================================================================== --- devel/go-hashicorp-logutils/Makefile +++ devel/go-hashicorp-logutils/Makefile @@ -10,6 +10,7 @@ LICENSE= BSD2CLAUSE +USES= go USE_GITHUB= yes GH_ACCOUNT= hashicorp GH_PROJECT= logutils @@ -17,6 +18,4 @@ GO_PKGNAME= github.com/hashicorp/logutils -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-json-rest/Makefile =================================================================== --- devel/go-json-rest/Makefile +++ devel/go-json-rest/Makefile @@ -12,6 +12,7 @@ MAINTAINER= lattera@gmail.com COMMENT= Quick and easy way to setup a RESTful JSON API +USES= go USE_GITHUB= yes GH_ACCOUNT= ant0ine @@ -22,6 +23,4 @@ @${INSTALL_DATA} ${GO_WRKDIR_PKG}/${GO_PKGNAME}/trie.a \ ${STAGEDIR}${PREFIX}/${GO_LIBDIR}/${GO_PKGNAME} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-pretty/Makefile =================================================================== --- devel/go-pretty/Makefile +++ devel/go-pretty/Makefile @@ -13,8 +13,7 @@ BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/github.com/kr/text.a:textproc/go-text RUN_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/github.com/kr/text.a:textproc/go-text +USES= go GO_PKGNAME= github.com/kr/pretty -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-raw/Makefile =================================================================== --- devel/go-raw/Makefile +++ devel/go-raw/Makefile @@ -10,12 +10,11 @@ #LICENSE= MIT based, but with no-evil clause +USES= go USE_GITHUB= yes GH_ACCOUNT= feyeleanor GH_TAGNAME= 724aedf GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-runewidth/Makefile =================================================================== --- devel/go-runewidth/Makefile +++ devel/go-runewidth/Makefile @@ -11,6 +11,7 @@ LICENSE= MIT +USES= go USE_GITHUB= yes GH_ACCOUNT= mattn GH_PROJECT= ${PKGNAMEPREFIX}${PORTNAME} @@ -18,6 +19,4 @@ GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-slices/Makefile =================================================================== --- devel/go-slices/Makefile +++ devel/go-slices/Makefile @@ -12,12 +12,11 @@ BUILD_DEPENDS= go-raw>0:devel/go-raw +USES= go USE_GITHUB= yes GH_ACCOUNT= feyeleanor GH_TAGNAME= bb44bb2 GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-sql-driver/Makefile =================================================================== --- devel/go-sql-driver/Makefile +++ devel/go-sql-driver/Makefile @@ -11,12 +11,11 @@ MAINTAINER= lattera@gmail.com COMMENT= Lightweight and fast MySQL driver for go +USES= go USE_GITHUB= yes GH_ACCOUNT= ${PORTNAME} GH_PROJECT= mysql GO_PKGNAME= github.com/${PORTNAME}/${GH_PROJECT} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-termbox/Makefile =================================================================== --- devel/go-termbox/Makefile +++ devel/go-termbox/Makefile @@ -13,6 +13,7 @@ BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/github.com/mattn/go-runewidth.a:devel/go-runewidth +USES= go USE_GITHUB= yes GH_ACCOUNT= nsf GH_PROJECT= ${PORTNAME}-go @@ -20,6 +21,4 @@ GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/go-uuid/Makefile =================================================================== --- devel/go-uuid/Makefile +++ devel/go-uuid/Makefile @@ -12,12 +12,11 @@ LICENSE= MIT +USES= go REVISION= 35bc42037350 PROJECTHOST= ${PKGNAMEPREFIX}${PORTNAME} WRKSRC= ${WRKDIR}/go-uuid-${REVISION} GO_PKGNAME= code.google.com/p/go-uuid/uuid GO_TARGET= code.google.com/p/go-uuid/uuid/uuid -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/goprotobuf/Makefile =================================================================== --- devel/goprotobuf/Makefile +++ devel/goprotobuf/Makefile @@ -13,11 +13,10 @@ RUN_DEPENDS= protoc:devel/protobuf +USES= go GO_PKGNAME= github.com/golang/protobuf GO_TARGET= ${GO_PKGNAME}/proto \ ${GO_PKGNAME}/protoc-gen-go \ ${GO_PKGNAME}/jsonpb -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: devel/statik/Makefile =================================================================== --- devel/statik/Makefile +++ devel/statik/Makefile @@ -9,14 +9,11 @@ LICENSE= APACHE20 -BUILD_DEPENDS= go:lang/go - ONLY_FOR_ARCHS= i386 amd64 +USES= go USE_GITHUB= yes GH_ACCOUNT= rakyll GH_TAGNAME= 4a16c83 -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: net-im/xmpp-client/Makefile =================================================================== --- net-im/xmpp-client/Makefile +++ net-im/xmpp-client/Makefile @@ -13,13 +13,8 @@ BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/golang.org/x/crypto/bcrypt.a:security/go.crypto \ ${LOCALBASE}/${GO_LIBDIR}/code.google.com/p/go.net/dict.a:net/go.net +USES= go PLIST_FILES= bin/xmpp-client GO_PKGNAME= github.com/agl/${PORTNAME} -post-extract: - @${MKDIR} ${GO_WRKSRC:H} - @${LN} -sf ${WRKSRC} ${GO_WRKSRC} - -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: net/go-amqp/Makefile =================================================================== --- net/go-amqp/Makefile +++ net/go-amqp/Makefile @@ -10,12 +10,11 @@ LICENSE= BSD2CLAUSE +USES= go USE_GITHUB= yes GH_ACCOUNT= streadway GH_TAGNAME= 7d6d180 GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: net/go-geoip/Makefile =================================================================== --- net/go-geoip/Makefile +++ net/go-geoip/Makefile @@ -13,7 +13,7 @@ LIB_DEPENDS= libGeoIP.so:net/GeoIP -USES= compiler +USES= compiler go USE_GITHUB= yes GH_ACCOUNT= abh GH_TAGNAME= da13074 @@ -21,8 +21,9 @@ GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} .include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" + .if ${COMPILER_TYPE} == clang && ${CC} == cc CC= clang .endif + .include Index: net/go.net/Makefile =================================================================== --- net/go.net/Makefile +++ net/go.net/Makefile @@ -13,6 +13,7 @@ BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/code.google.com/p/go.text:textproc/go.text +USES= go GO_PKGNAME= code.google.com/p/go.net GO_TARGET= ${GO_PKGNAME}/dict \ ${GO_PKGNAME}/html \ @@ -27,6 +28,4 @@ ${GO_PKGNAME}/spdy \ ${GO_PKGNAME}/websocket -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: security/go.crypto/Makefile =================================================================== --- security/go.crypto/Makefile +++ security/go.crypto/Makefile @@ -8,6 +8,7 @@ MAINTAINER= jlaffaye@FreeBSD.org COMMENT= Additional cryptography packages for Go +USES= go GO_PKGNAME= golang.org/x/crypto GO_TARGET= ${GO_PKGNAME}/bcrypt \ ${GO_PKGNAME}/blowfish \ @@ -43,7 +44,4 @@ ${GO_PKGNAME}/xtea \ ${GO_PKGNAME}/xts -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" - -.include +.include Index: security/goptlib/Makefile =================================================================== --- security/goptlib/Makefile +++ security/goptlib/Makefile @@ -8,13 +8,8 @@ MAINTAINER= cs@FreeBSD.org COMMENT= Go pluggable transports library +USES= go GO_PKGNAME= git.torproject.org/pluggable-transports/${PORTNAME}.git GO_TARGET= ${GO_PKGNAME} -post-extract: - @${MKDIR} ${GO_WRKSRC:H} - @${LN} -sf ${WRKSRC} ${GO_WRKSRC} - -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: security/meek/Makefile =================================================================== --- security/meek/Makefile +++ security/meek/Makefile @@ -10,20 +10,15 @@ BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/git.torproject.org/pluggable-transports/goptlib.git.a:security/goptlib +USES= go PLIST_FILES= bin/meek-client bin/meek-server man/man1/meek-client.1.gz man/man1/meek-server.1.gz SUB_FILES= pkg-message GO_PKGNAME= git.torproject.org/pluggable-transports/${PORTNAME}.git GO_TARGET= ${GO_PKGNAME}/${PORTNAME}-server \ ${GO_PKGNAME}/${PORTNAME}-client -post-extract: - @${MKDIR} ${GO_WRKSRC:H} - @${LN} -sf ${WRKSRC} ${GO_WRKSRC} - post-install: ${INSTALL_MAN} ${WRKSRC}/doc/meek-server.1 ${STAGEDIR}${PREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/doc/meek-client.1 ${STAGEDIR}${PREFIX}/man/man1 -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: security/pond/Makefile =================================================================== --- security/pond/Makefile +++ security/pond/Makefile @@ -21,6 +21,7 @@ LIB_DEPENDS= libgtkspell.so:textproc/gtkspell \ libtspi.so:security/trousers +USES= go PLIST_FILES= bin/pond-server bin/pond USE_GNOME= gtk30 GO_PKGNAME= github.com/agl/pond @@ -61,6 +62,4 @@ do-build: @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} install -tags nogui -v ${GO_TARGET}) -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: sysutils/logstash-forwarder/Makefile =================================================================== --- sysutils/logstash-forwarder/Makefile +++ sysutils/logstash-forwarder/Makefile @@ -11,6 +11,7 @@ BUILD_DEPENDS= go:lang/go +USES= go USE_GITHUB= yes GH_ACCOUNT= elasticsearch GH_TAGNAME= 3b718f0 @@ -21,6 +22,4 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/logstash-forwarder.conf.example ${STAGEDIR}${PREFIX}/etc/logstash-forwarder.conf.example -.include -.include "${.CURDIR}/../../lang/go/files/bsd.go.mk" -.include +.include Index: textproc/go-text/Makefile =================================================================== --- textproc/go-text/Makefile +++ textproc/go-text/Makefile @@ -11,8 +11,7 @@ LICENSE= MIT +USES= go GO_PKGNAME= github.com/kr/text -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: textproc/go.text/Makefile =================================================================== --- textproc/go.text/Makefile +++ textproc/go.text/Makefile @@ -10,6 +10,7 @@ LICENSE= BSD3CLAUSE +USES= go GO_PKGNAME= code.google.com/p/go.text GO_TARGET= ${GO_PKGNAME}/cldr \ ${GO_PKGNAME}/collate \ @@ -26,6 +27,4 @@ ${GO_PKGNAME}/transform \ ${GO_PKGNAME}/unicode/norm -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: textproc/peco/Makefile =================================================================== --- textproc/peco/Makefile +++ textproc/peco/Makefile @@ -16,6 +16,7 @@ ${LOCALBASE}/${GO_LIBDIR}/github.com/nsf/termbox-go.a:devel/go-termbox \ ${LOCALBASE}/${GO_LIBDIR}/github.com/google/btree.a:devel/go-btree +USES= go USE_GITHUB= yes WRKSRC_SUBDIR= cmd/peco @@ -26,6 +27,4 @@ @${MKDIR} ${GO_WRKSRC:H:H:H} @${LN} -sf ${WRKSRC:H:H} ${GO_WRKSRC:H:H} -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include Index: www/webgo/Makefile =================================================================== --- www/webgo/Makefile +++ www/webgo/Makefile @@ -13,8 +13,7 @@ SVNVERSION= 20120419 +USES= go GO_PKGNAME= github.com/hoisie/web -.include -.include "${PORTSDIR}/lang/go/files/bsd.go.mk" -.include +.include