Writing a port that needs to download a large number of files

Xavi Garcia xavi.garcia at gmail.com
Wed Apr 19 16:27:07 UTC 2017


Hi all,

We are writing a port for a Java software that downloads a large number of
jar files (around 200) with Gradle (https://gradle.org/), that is similar
to other package managers like Pip or Ruby Gems but for Java projects.

What would be the best practice in this scenario? I am aware that we can
only download files in the fetch phase but I am not sure if my solution is
clean enough.

We will be deploying this port in our servers via Portshaker and Poudriere
but we would also like to commit it to the ports tree.


In short, I am using the 'pre-fetch' phase together with FETCH_DEPENDS  to
drop the Gradle wrapper in ${DISTDIR}/${PORTNAME} and then I use the
'dependencies' task to download all the dependencies.

The 'do-build' stage will run again the Gradle wrapper to build the
software, but using the offline mode.

You can find attached the Makefile.

Kind regards,

Xavier Garcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 1569 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170419/b55a05f1/attachment.obj>


More information about the freebsd-ports mailing list