Which php??

Polytropon freebsd at edvax.de
Wed Jan 12 21:43:26 UTC 2011


On Wed, 12 Jan 2011 12:35:04 -0800, Gary Kline <kline at thought.org> wrote:
> What should I turn on or off
> 	in the Makefile [or using `make config']?

Allow me a quite general comment: Do not modify a port's
Makefile directly. The interface to selectable options is
usually given by "make config" or the configuration files
of the port managament tool you use (if any).

A file-based mechanism has been present in ports, but I'm
not fully sure it hasn't been "obsoleted" already. I have
used this mechanism for things like configuring the options
for the mplayer port.

This mechanism is Makefile.local - a file you place into
the port's directory and specify all the options you need,
maybe based upon the Makefile itself.

For example, a /usr/ports/multimedia/mplayer/Makefile.local
could look this way:

WITH_SDL=yes
WITH_VORBIS=yes
WITH_THEORA=yes
WITH_XANIM=yes
WITH_XVID=yes
WITH_REALPLAYER=yes
WITH_LIVEMEDIA=yes
WITH_ESOUND=yes
WITH_FREETYPE=yes
WITH_LANG=yes
WITH_GUI=yes
WITH_DVD=yes
WITH_GTK1=yes
WITH_LIBDVDNAV=yes
WITH_AMR=yes
WITH_VPX=yes
WITH_WIN32=yes
WITH_V4L=yes
WITH_DVD_DEVICE=/dev/dvd
WITH_OPTIMIZED_CFLAGS=yes
WITHOUT_RUNTIME_CPUDETECTION=yes
CFLAGS+= -O2 -pipe -ffast-math

You can specify the =yes as an equivalent to setting [X]
in the "make config" screen, and you can also define
variables with strings (like WITH_DVD_DEVICE or the
alteration of CFLAGS in the example).

Reason: Changes to Makefile will be removed within the
process of "make update", but Makefile.local will be
ignored, so it will still be present after the update
of the ports tree.

Still, using a centralized configuration file for ports
options as provided by port management tools (such as
portupgrade or portmaster) often is the better solution
if you use those tools anyway.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list