pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Allow building direnv with versioned Go.



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Tue Oct 2 18:35:51 2018 +0000
Changeset:	67bced1295c73ef334c7fa08d9d32bde9b5593d9

Modified Files:
	direnv/Makefile
	direnv/distinfo
Added Files:
	direnv/patches/patch-Makefile

Log Message:
Allow building direnv with versioned Go.

Fix build.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=67bced1295c73ef334c7fa08d9d32bde9b5593d9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 direnv/Makefile               |  5 ++++-
 direnv/distinfo               |  1 +
 direnv/patches/patch-Makefile | 40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)

diffs:
diff --git a/direnv/Makefile b/direnv/Makefile
index a8a529a052..7a3153bff2 100644
--- a/direnv/Makefile
+++ b/direnv/Makefile
@@ -10,14 +10,17 @@ HOMEPAGE=	http://direnv.net/
 COMMENT=	Environment switcher for the shell
 LICENSE=	mit
 
-BUILD_DEPENDS+=	go>=1.6:../../lang/go
+BUILD_DEPENDS+=	${GO_PACKAGE_DEP}
 
 USE_TOOLS+=	gmake
 
+MAKE_ENV+=	GO=${GO:Q}
+
 do-install:
 	${INSTALL_PROGRAM_DIR} ${DESTDIR}/${PREFIX}/bin
 	${INSTALL_MAN_DIR} ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1
 	${INSTALL_PROGRAM} ${WRKSRC}/direnv ${DESTDIR}/${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/man/*.1 ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1
 
+.include "../../lang/go/version.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/direnv/distinfo b/direnv/distinfo
index 3e14f57425..c836578556 100644
--- a/direnv/distinfo
+++ b/direnv/distinfo
@@ -4,3 +4,4 @@ SHA1 (direnv-2.8.1.tar.gz) = 46ca5e298deadd017aacf3e1b7ca692df9ed9363
 RMD160 (direnv-2.8.1.tar.gz) = 05e50ccdd717644289832b6d9c021071179eda1c
 SHA512 (direnv-2.8.1.tar.gz) = 5f88b98dc86b37241677a71ecca73152460f6c15f73570d604d6fb5593581ca0a3b8e6e5caafb5a995776d156bc18b6a9d50e8aab9bf66650c54733c7a84815c
 Size (direnv-2.8.1.tar.gz) = 39292 bytes
+SHA1 (patch-Makefile) = 030218e6781fe24684549c8f1788c0e9b76699ae
diff --git a/direnv/patches/patch-Makefile b/direnv/patches/patch-Makefile
new file mode 100644
index 0000000000..7b59bef26c
--- /dev/null
+++ b/direnv/patches/patch-Makefile
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- Makefile.orig	2016-04-04 17:39:36.000000000 +0000
++++ Makefile
+@@ -2,6 +2,7 @@ DESTDIR ?= /usr/local
+ 
+ MAN_MD = $(wildcard man/*.md)
+ ROFFS = $(MAN_MD:.md=)
++GO ?= go
+ 
+ ifeq ($(shell uname), Darwin)
+ 	# Fixes DYLD_INSERT_LIBRARIES issues
+@@ -19,8 +20,8 @@ stdlib.go: stdlib.sh
+ 	cat $< | ./script/str2go main STDLIB $< > $@
+ 
+ direnv: stdlib.go *.go
+-	go fmt
+-	go build $(GO_FLAGS) -o direnv
++	${GO} fmt
++	${GO} build $(GO_FLAGS) -o direnv
+ 
+ clean:
+ 	rm -f direnv
+@@ -32,7 +33,7 @@ clean:
+ man: $(ROFFS)
+ 
+ test: build
+-	go test
++	${GO} test
+ 	./test/direnv-test.sh
+ 
+ install: all
+@@ -42,6 +43,6 @@ install: all
+ 	cp -R man/*.1 $(DESTDIR)/share/man/man1
+ 
+ dist:
+-	go get github.com/mitchellh/gox
++	${GO} get github.com/mitchellh/gox
+ 	gox -output "dist/direnv.{{.OS}}-{{.Arch}}"
+ 


Home | Main Index | Thread Index | Old Index