If you need tips & tricks, here they are...

Compile Ports on an OLD FreeBSD Release

Recently I've been updating ports on a really old FreeBSD distribution (7.3-RELEASE for i386) and ran across a few.. hurdles.

First of all 'xz' is not fully supported by the builtin 'tar' - ofc!
So to be able to even start compiling ports using the new 'xz' compression I had to adapt /usr/ports/Mk/ with the following small patch
--- 2013-05-19 01:34:46.000000000 +0200
+++ bsd.port.mk_fixed   2013-05-19 01:34:22.000000000 +0200
@@ -1667,6 +1667,9 @@
 .if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
 EXTRACT_DEPENDS+=      ${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
 .if defined(USE_MAKESELF)
 EXTRACT_DEPENDS+=      unmakeself:${PORTSDIR}/archivers/unmakeself

Secondly the system doesn't have spawn.h - fixed this by copying it from a newer FreeBSD release.
This did not work for the "bison" port though.
The following works for compiling 'bison' <- this also worked for 'wget'
cd /usr/ports/devel/bison
make ac_cv_header_spawn_h=no

or for 'portupgrade'
portupgrade -m ac_cv_header_spawn_h=no bison

as for 'portupgrade'/'portinstall' I made it easy for myself I added
ac_cv_header_spawn_h=no to MAKE_ARGS in /usr/local/etc/pkgtools.conf for '*'.

Add comment