Download all distfiles only for amd64

Hello everybody...

How can I download all distfiles just for my platform (amd64).
Using "make fetch" every time it finds a port to another platform, for example sparc64, the command stops the process...
Any tips?
 
The ports tree works for all architectures and versions. Very few distfiles are actually architecture dependent.
 
[ X$(make -V __ARCH_OK) == "X1" ] && make fetch
but as SirDice said, there are very few ports that depend on $ARCH
Can you give more details on how to use?

For example:

root@n43s:/usr/ports/sysutils # make fetch
...
===> adtool-1.3.3_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by adtool-1.3.3_3 for building
===> afbinit
===> afbinit-1.0_4 is only for sparc64, while you are running amd64.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/afbinit
*** Error code 1

Stop.

root@n43s:/usr/ports/sysutils # make fetch-recursive
make: don't know how to make fetch-recursive. Stop

make: stopped in /usr/ports/sysutils
root@n43s:/usr/ports/sysutils #

"FREEBSD HANDBOOK...

5.5.1.1. Customizing Ports Installation​

Some ports provide build options which can be used to enable or disable application components, provide security options, or allow for other customizations. Examples include www/firefox, security/gpgme, and mail/sylpheed-claws. If the port depends upon other ports which have configurable options, it may pause several times for user interaction as the default behavior is to prompt the user to select options from a menu. To avoid this, run make config-recursive within the port skeleton to do this configuration in one batch. Then, run make install [clean] to compile and install the port.

Tip:​

When using config-recursive, the list of ports to configure are gathered by the all-depends-list target. It is recommended to run make config-recursive until all dependent ports options have been defined, and ports options screens no longer appear, to be certain that all dependency options have been configured.
There are several ways to revisit a port's build options menu in order to add, remove, or change these options after a port has been built. One method is to cd into the directory containing the port and type make config. Another option is to use make showconfig. Another option is to execute make rmconfig which will remove all selected options and allow you to start over. All of these options, and others, are explained in great detail in ports(7).

The ports system uses fetch(1) to download the source files, which supports various environment variables. The FTP_PASSIVE_MODE, FTP_PROXY, and FTP_PASSWORD variables may need to be set if the FreeBSD system is behind a firewall or FTP/HTTP proxy. See fetch(3) for the complete list of supported variables.

For users who cannot be connected to the Internet all the time, make fetch can be run within /usr/ports, to fetch all distfiles, or within a category, such as /usr/ports/net, or within the specific port skeleton. Note that if a port has any dependencies, running this command in a category or ports skeleton will not fetch the distfiles of ports from another category. Instead, use make fetch-recursive to also fetch the distfiles for all the dependencies of a port.

... "
 
just paste my 1st post in the terminal, should work if you are using bourne shell
root@n43s:/usr/ports/sysutils # [ X$(make -V __ARCH_OK ) == "X1" ] && make fetch
Illegal variable name.

I'm using it in the bourne shell
 
No, that's not the problem. The problem is that $(...) doesn't work in a C shell (produces an Illegal variable name error).

Code:
dice@molly:~ % echo $(id)
Illegal variable name.
dice@molly:~ % sh
$ echo $(id)
uid=1001(dice) gid=1001(dice) groups=1001(dice),0(wheel)

This will work in both C shell and Bourne shells: [ X`make -V __ARCH_OK` == "X1" ] && make fetch (but those backticks are often mangled when copy/pasting from webpages).
 
root@n43s:/usr/ports/sysutils # echo "$SHELL"
/bin/sh
root@n43s:/usr/ports/sysutils # [ X$(make -V __ARCH_OK) == "X1" ] && make fetch
root@n43s:/usr/ports/sysutils #
Did nothing...

root@n43s:/usr/ports/sysutils # [ X$(make -V __ARCH_OK ) == X"1" ] && make fetch
root@n43s:/usr/ports/sysutils #
Did nothing...


I use CCACHE...Any influence?
My /etc/make.conf:
WITH_CCACHE_BUILD=yes

.if ${.CURDIR:M*/ports/devel/ccache}
NO_CCACHE= yes
.endif
 
You could
Code:
/usr/ports/sysutils: # mv Makefile  Makefile.orig

# cp Makefile.orig  Makefile

edit Makefile, delete line

25     SUBDIR += afbinit

After make fetch is completed:
Code:
#  mv  Makefile.orig  Makefile
 
… I thought FreeBSD was installed with the default shell…

 
Back
Top