View Single Post
  #2   (View Single Post)  
Old 30th September 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Default

On most ports, you run # make && make install. The port will ask you what settings you want, and save your answers in a config file for next time (/var/db/ports/portname/config, I think)

Some ports have not been updated to use this system, and for them you will need to set the variables you have seen. The syntax is # make WITHOUT_FEATURE="yes" WITH_FEATURE="yes" USE_PROG_VERSION="2.3" install. You can also use the -D argument to make if you prefer. (make -DWITH_FEATURE )

There are a number of ways to automate things. Ports that use the config system automate themselves. for the others, there are a number of different options.
If you are using portupgrade to manage your ports, then it has a /usr/local/etc/pkgtools.conf file to automate things. The portsconf ports allows you to automatically set ports variables in it's config file. A very clever way is by slightly misusing /etc/make.conf - carpetsmoker at this forum has an example - to insert make variables depending on the port you are building.

Edit carpetsmoker's make.conf
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.

Last edited by robbak; 30th September 2008 at 11:44 PM.
Reply With Quote