setup your build env
ls -lF /usr/pkgsrc/mk/defaults/mk.conf vi /etc/mk.conf MAKE_JOBS=8 ALLOW_VULNERABLE_PACKAGES=+nmap X11_TYPE=modular SSLBASE=/usr/local/ssl
grab the latest tarball
cd /usr/ ls -lhF | grep pkgsrc ftp -a http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc.tar.gz nice progress -zf pkgsrc.tar.gz tar xf - #gnu/linux #wget http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc.tar.gz #nice tar xzf pkgsrc.tar.gz
In case you are on gnu/linux or the pkgsrc-current tree is too recent compared to your NetBSD release
unset PKG_PATH cd /usr/pkgsrc/bootstrap/ ./bootstrap
Fix a package’s deps by rebuilding it and look at your options
unset PKG_PATH cd /usr/pkgsrc/mail/alpine/ cd /usr/pkgsrc/net/wget/ make show-depends make show-options make clean clean-depends /usr/bin/make help topic=make_jobs vi /etc/mk.conf #bootstrapped vi /usr/pkg/etc/mk.conf #natural MAKE_JOBS=8 make make package #make install
clean up the tree
find /usr/pkgsrc -name work -maxdepth 3 | xargs rm -rf
get rid of recently installed packages
ls -ltr /var/db/pkg/ ls -1tr /var/db/pkg/ | sed -rn '/py27-expat-2.7.16/,$p' | sed '$d' pkg_delete `ls -1tr /var/db/pkg/ | sed -rn '/py27-expat-2.7.16/,$p' | sed '$d'` ls -ltr /var/db/pkg/
start from scratch the soft way
echo `pkg_info | awk '{print $1}'` pkg_delete `pkg_info | awk '{print $1}'` pkg_info find /usr/pkg/ find /var/db/pkg/
the brutal way
rm -rf /usr/pkg/ rm -rf /var/db/pkg/*
===> Building for gmake-4.2.1nb1 CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /usr/pkgsrc/devel/gmake/work/make-4.2.1/config/missing aclocal-1.15 -I config /usr/pkgsrc/devel/gmake/work/make-4.2.1/config/missing: aclocal-1.15: not found WARNING: 'aclocal-1.15' is missing on your system. You should only need it if you modified 'acinclude.m4' or 'configure.ac' or m4 files included by 'configure.ac'. The 'aclocal' program is part of the GNU Automake package: <http://www.gnu.org/software/automake> It also requires GNU Autoconf, GNU m4 and Perl in order to run: <http://www.gnu.org/software/autoconf> <http://www.gnu.org/software/m4/> <http://www.perl.org/>
==> use binaries for automake autoconf gmake
and build alpine and wget
and then for alpine
one gets
undefined reference to `tputs'
pkgsrc http://pkgsrc.org/
4.2. Bootstrapping pkgsrc https://www.netbsd.org/docs/pkgsrc/platforms.html#bootstrapping-pkgsrc
5.2. Building packages from source https://www.netbsd.org/docs/pkgsrc/using.html#building-packages-from-source
mk.conf – make configuration file http://netbsd.gw.com/cgi-bin/man-cgi?mk.conf++NetBSD-current
Have pkgsrc building make use of SMP? https://tech-pkg.netbsd.narkive.com/eBKNLzk0/have-pkgsrc-building-make-use-of-smp