Bug 212956

Summary: [PATCH] Uses/go.mk, add GO_EXTRA_PACKAGES for multi-package applications
Product: Ports & Packages Reporter: Kyle Evans <kevans>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me CC: ports-bugs
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 212964    
Attachments:
Description Flags
svn(1) diff of Mk/Uses/go.mk to add GO_EXTRA_PACKAGES none

Description Kyle Evans freebsd_committer freebsd_triage 2016-09-24 05:42:59 UTC
Created attachment 175116 [details]
svn(1) diff of Mk/Uses/go.mk to add GO_EXTRA_PACKAGES

I've ran into a golang application ([1]) that is actually composed of four different packages within its own repository, plus a couple of external dependencies.

Currently, this makes for kind of an ugly situation where one would need to put these into their proper ${GO_SRCDIR}/${PACKAGENAME} paths in order to properly build, and it gets kind of messy. Additionally, the behavior for creating ${GO_WRKSRC} is out-right wrong because the repository is already package-aware.

I'm attaching a patch that handles this situation a little better with a GO_EXTRA_PACKAGES var.

If GO_EXTRA_PACKAGES is populated, then:

* Make sure that ${GO_PKGNAME} is included -- for multi-package repositories, this should *always* work as it's the only sane layout I can think of

* In post-extract we assume/check that each package is currently living in ${WRKSRC}/src and symlink it into place if proper.


[1] https://github.com/arduino/arduino-builder
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2016-10-09 17:33:13 UTC
Whoops, sorry. Closed as FIXED given a workaround provided.