Solved download port source file first

When installing ( let's say Chrome) from ports collection on FreeBSD, how can I make it download Chrome and all of it's dependencies first then after that compiling them when going offline
Note:
I don't want to download the source of all the port tree collection, I want it to download only Chrome and its dependencies.

And thanks :)
 
Code:
     fetch          Fetch all of the files needed to build this port from the
                    sites listed in MASTER_SITES and PATCH_SITES.  See
                    FETCH_CMD, MASTER_SITE_OVERRIDE and MASTER_SITE_BACKUP.
Code:
     fetch-recursive      Fetch the distfiles of the port and all its
                          dependencies.
See ports(7).
 
however i suggest to make FreeBSD ports ,by default, download all required sources first for a certain package, then compiling the package and it's dependencies next in new freebsd updates that's because it's more efficient when
  • someone decided to download the package and comiling it later
  • someone who are not have access to the internet all the time
  • when someone have no time for the long compilation process so he download the package first and then compile it when had a lot of time
  • when someone have to install (for example 5 packages from ports) so instead of download and compile pkg no.1 first then download and compile pkg no.2 ... etc , he download pkg no.1 then compiling pkg no.1 while download pkg no.2 at the same time
 
however I suggest to make FreeBSD ports, by default, download all required sources first for a certain package,
That's what fetch-recursive is for. It's up to you how and when to use it.

someone decided to download the package and comiling it later
A package is a pre-compiled set of files, you cannot recompile a package. You need the port for that.
someone who are not have access to the internet all the time
Downloaded and installed packages are cached in /var/cache/pkg/. Distfiles are cached in /usr/ports/distfiles. This is already in place.
when someone have no time for the long compilation process so he download the package first and then compile it when had a lot of time
Same as the first, you cannot (re)compile an existing package, compiling is done with ports and results in a package.
 
sorry it's my bad, when i say pkg i mean a source file which going to be a package after compile but for short i said just "pkg" sorry again
 
Those are called 'distfiles' on FreeBSD (it refers to the files in /usr/ports/distfiles).
 
Back
Top