Created attachment 210626 [details] Shell archive of new port Fast, indexed regexp search over large file trees: https://github.com/google/codesearch and https://swtch.com/~rsc/regexp/regexp4.html
(In reply to eborisch+FreeBSD from comment #0) Hi, Thank you for the new port submission, but new go ports shouldn't add a build dependency to lang/go, please switch to USES=go instead [1]. There are many examples of such ports in the ports tree - devel/dep, sysutils/immortal etc. [1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#uses-go
(In reply to Dmitri Goutnik from comment #1) I can, but it's an old package, doesn't rely on any external modules and doesn't work cleanly with the build that USES=go, so it ends up looking like this. Let me know which way you would like to go. Thanks! == FreeBSD$ PORTNAME= codesearch DISTVERSIONPREFIX= v DISTVERSION= 1.1.0 CATEGORIES= textproc MAINTAINER= eborisch@gmail.com COMMENT= Fast (indexed) text search tool from Google LICENSE= BSD3CLAUSE USES= go:no_targets USE_GITHUB= yes GH_ACCOUNT= google GH_SUBDIR= src/github.com/google/codesearch BIN_FILES= cgrep csearch cindex PORTDOCS= LICENSE README AUTHORS CONTRIBUTORS OPTIONS_DEFINE= DOCS do-build: .for bin in ${BIN_FILES} cd ${WRKSRC}/src/github.com/google/codesearch/cmd/${bin}; ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build .endfor do-install: .for bin in ${BIN_FILES} cd ${WRKSRC}/src/github.com/google/codesearch/cmd/${bin}; ${CP} ${bin} ${STAGEDIR}${PREFIX}/bin/${src} .endfor post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} .for doc in ${PORTDOCS} ${CP} ${WRKSRC}/src/github.com/google/codesearch/${doc} ${STAGEDIR}${DOCSDIR} .endfor .include <bsd.port.mk>
Created attachment 210695 [details] codesearch-1.1.0.patch
(In reply to eborisch+FreeBSD from comment #2) Please see attached patch.
Created attachment 210696 [details] codesearch-1.1.0.patch Fix typo in directory name
That looks great! Clearly I have much to learn about USES=go (I've never done any go development myself, which likely doesn't help on that front.)
A commit references this bug: Author: dmgk Date: Fri Jan 17 19:00:04 UTC 2020 New revision: 523350 URL: https://svnweb.freebsd.org/changeset/ports/523350 Log: New port: textproc/codesearch Code Search is a tool for indexing and then performing regular expression searches over large bodies of source code. It is a set of command-line programs written in Go. WWW: https://github.com/google/codesearch PR: 243273 Submitted by: eborisch+FreeBSD@gmail.com Changes: head/textproc/Makefile head/textproc/codesearch/ head/textproc/codesearch/Makefile head/textproc/codesearch/distinfo head/textproc/codesearch/pkg-descr
Committed, thanks!