Recreate FreeBSD ports build option

As big fan of FreeBSD ports, I like to play around with ports option, like when installing php4 I was prompted with a lot of build options :

kongja# whereis php4
php4: /usr/ports/lang/php4
kongja# cd /usr/ports/lang/php4

then this ncurse option will popup

phpbuild.PNG

===> Found saved configuration for php4-4.4.6
===> Extracting for php4-4.4.6


=> MD5 Checksum OK for php-4.4.6.tar.bz2.
=> SHA256 Checksum OK for php-4.4.6.tar.bz2.
=> MD5 Checksum OK for suhosin-patch-4.4.6-0.9.6.patch.gz.
=> SHA256 Checksum OK for suhosin-patch-4.4.6-0.9.6.patch.gz.
===> Patching for php4-4.4.6
===> Applying distribution patches for php4-4.4.6
===> Applying FreeBSD patches for php4-4.4.6
===> php4-4.4.6 depends on file: /usr/local/bin/autoconf259 – found
===> Configuring for php4-4.4.6

…………..

process will continue till end

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

kongja# make
kongja# make clean
===>  Cleaning for autoconf-2.59_2
===>  Cleaning for perl-5.8.8
===>  Cleaning for m4-1.4.9
===>  Cleaning for help2man-1.36.4_1
===>  Cleaning for gmake-3.81_1
===>  Cleaning for p5-gettext-1.05_1
===>  Cleaning for gettext-0.16.1_1
===>  Cleaning for libtool-1.5.22_4
===>  Cleaning for libiconv-1.9.2_2
===>  Cleaning for php4-4.4.6
kongja# make
===>  Found saved configuration for php4-4.4.6
===>  Extracting for php4-4.4.6
=> MD5 Checksum OK for php-4.4.6.tar.bz2.
=> SHA256 Checksum OK for php-4.4.6.tar.bz2.
=> MD5 Checksum OK for suhosin-patch-4.4.6-0.9.6.patch.gz.
=> SHA256 Checksum OK for suhosin-patch-4.4.6-0.9.6.patch.gz.
^C
I forgot to include “Build Apache Module”

phpbuild2.PNG

delete “php4” and go to php4 directory

kongja# rm -rf php4

kongja# cd /usr/ports/lang/php4

kongja# make clean
===>  Cleaning for autoconf-2.59_2
===>  Cleaning for perl-5.8.8
===>  Cleaning for m4-1.4.9
===>  Cleaning for help2man-1.36.4_1
===>  Cleaning for gmake-3.81_1
===>  Cleaning for p5-gettext-1.05_1
===>  Cleaning for gettext-0.16.1_1
===>  Cleaning for libtool-1.5.22_4
===>  Cleaning for libiconv-1.9.2_2
===>  Cleaning for php4-4.4.6

kongja# make

since php4 folder isn’t exist on /var/db/ports you’ll get “new” popup ,  it’s time to correct my fault 🙂

phpbuild3.PNG

deselect CGI and select Apache 🙂

Followed with make  or make install command.