On Sat, May 09, 2015 at 07:49:24PM +0200, Fabian Raetz wrote: > i finally found some time to look at this again. The go test cases were > failing because they depend on an initialized git repo in ${WRKSRC} > which i create now in do-test. > > This fixes all go tests for me. > > The cucumber tests are disabled for now. I will dig into this at some > point and see how much work it will be to hook them up. > > New version is attached (and in openbsd-wip by the way)
Looks really good, thanks for updating this! Just a few more nits, and I apologize for not noticing these originally: * Their script/build is actually touching /tmp during the build, and I don't think we want to do that * Their script/test actually calls back into their script/build and does the same :( Here's a small diff to apply on top of your latest tarball that skips going through their script/ wrappers, and also uses jasper@'s lang/go module (wip, but will probably land in cvs before hub is imported): --- Makefile.orig Thu May 14 13:30:14 2015 +++ Makefile Thu May 14 14:11:13 2015 @@ -1,7 +1,5 @@ # $OpenBSD$ -ONLY_FOR_ARCHS = ${GO_ARCHS} - COMMENT = wraps git in order to extend it with extra features V = 2.2.1 @@ -20,18 +18,23 @@ WANTLIB += c pthread -BUILD_DEPENDS = lang/go \ - shells/bash +MODULES = lang/go + +BUILD_DEPENDS = shells/bash RUN_DEPENDS = devel/git +post-extract: + mkdir -p ${WRKSRC}/src/github.com/github + ln -s ${WRKSRC} ${WRKSRC}/src/github.com/github/hub + do-build: - cd ${WRKSRC} && script/build + GOPATH=${GOPATH} go install github.com/github/hub +do-test: + cd ${WRKSRC} && git init && GOPATH=${GOPATH} go test ./... + do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/hub ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/bin/hub ${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/man/hub.1 ${PREFIX}/man/man1 - -do-test: - cd ${WRKSRC} && git init && script/test .include <bsd.port.mk>