Bug 205106 - [NEW MODULE] bundle.mk: USES=bundle allows bundling ports with the third party submodules
Summary: [NEW MODULE] bundle.mk: USES=bundle allows bundling ports with the third part...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords: feature, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-12-08 00:52 UTC by Yuri Victorovich
Modified: 2016-09-08 14:14 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.15 KB, patch)
2015-12-08 00:52 UTC, Yuri Victorovich
no flags Details | Diff
patch (1.14 KB, patch)
2015-12-08 01:06 UTC, Yuri Victorovich
no flags Details | Diff
patch (1.25 KB, patch)
2015-12-13 14:41 UTC, Yuri Victorovich
no flags Details | Diff
patch (1.44 KB, patch)
2015-12-29 05:08 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2015-12-08 00:52:03 UTC
Created attachment 163956 [details]
patch

USES=bundle simplifies bundling ports with submodules taken from the other repositories.

# example use
USES+=          bundle
BUNDLE+=        3rdparty/easyloggingpp:easyloggingpp
BUNDLE+=        3rdparty/qtconsole:qtconsole
BUNDLE+=        src/resources/qml/3rdparty/php-unserialize-js:php-unserialize-js

# bundled distfiles might be defined like this
GH_TUPLE+=      easylogging:easyloggingpp:f926802:easyloggingpp
GH_TUPLE+=      uglide:QtConsole:0e7c88c:qtconsole
GH_TUPLE+=      RedisDesktop:php-unserialize-js:a4d804f:php-unserialize-js

In case of USES=bundle extract will only extract the default distfile, and the rest will be extracted into the specified subdirectories.

The idea of USES=bundle was inspired by git submodules (which are used a lot now). Many projects now recommend to use
> git submodule update --recursive
to update git submodules. In this case USES=bundle should be used.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-08 01:06:36 UTC
Created attachment 163961 [details]
patch
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2015-12-08 07:27:33 UTC
I have something like this on the way, though, a bit simpler.
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2015-12-08 07:28:50 UTC
For example, it is simpler to let do-extract extract everything, and then only move things around.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-08 07:49:51 UTC
If do-extract extracts everything under WRKDIR/, then you need to move the contents of the folders, not the folders themselves. Another custom step. The extract that I suggested looks simpler and more standard. -)
Comment 5 Mathieu Arnold freebsd_committer freebsd_triage 2015-12-08 09:06:44 UTC
Why can't you move the folders ? Because it works just right here.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-08 09:25:14 UTC
Because the folders are supplied by the parent repository, and they might already have some files in them.

If you move the directories, this means you need to delete the originals first with their contents. Why force the additional restrictions? Let authors decide how they bundle things.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-13 14:41:53 UTC
Created attachment 164186 [details]
patch

Added BUNDLE_ROOT variable.
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-29 05:08:44 UTC
Created attachment 164803 [details]
patch
Comment 9 Mathieu Arnold freebsd_committer freebsd_triage 2016-09-08 14:14:18 UTC
This was implemented with GH_SUBDIR.