« Music Industry Unveils New Piracy-Proof Format | Main | /usr/local/etc/pkgtools.conf »

March 03, 2004

Storing Previous Compilation Options: mod_php4 and make

This drives me nuts. Everytime I upgrade my mod_php4 port, the config screen pops up and I have to remember what compilation options to check off. I want it to have the same options every time, so when I upgrade I don't need to remember how the port is currently configured. Is there some way to accomplish this?

Location: Kamloops, BC, Canada
You can do this using portupgrade. Read through the configuration files in /usr/local/etc/pkg* and related man pages (portupgrade, pkgtools.conf, and the like).

You need to create an entry for PHP in the pkgtools conf file. portupgrade will check that config file and grab the options from there.

if you have global options that you want to use for everything, you can add them to /etc/make.conf.. like NO_X11=yes is what I use on servers.


If you feel you have to avoid portupgrade (it's a wonderful tool, but
it doesn't work on new machines until you have built it), you can
create a /usr/ports/../Makefile.inc and have it include your own
make.conf.

It would seem that using /usr/ports/Makefile.local would be a good way
to do this; but it is only included during the pre-makefile period of
the build and consequently, won't quite work if the flags you want to
set have to be individual for each port
(e.g. ${CONFIGURE_ARGS}). /usr/ports/../Makefile.inc is included
during both the pre-makefile and post-makefile phases.

Caveat: I have no idea why the ports gurus are including
${MASTERDIR}/../Makefile.inc in /usr/ports/Mk/bsd.port.mk; so I can't
intelligently promise that this mechanism will continue to work.


# -*- makefile -*-
# $Id: Makefile.inc,v 1.2 2002/08/28 15:51:12 ericx Exp $
#
# $Log: Makefile.inc,v $
# Revision 1.2 2002/08/28 15:51:12 ericx
# Check-in for ASC
# Also added comments and emacs directive
#
# Revision 1.1 2002/03/19 15:07:59 asc
# Initial revision
#

# file is loaded up via what may be an oddity in the Mk configuration
# files in /usr/ports/Mk/bsd.port.mk AFTER all the variables are set
# in the various Makefiles. Unlike /etc/make.conf, this gives an
# opportunity to override settings in port Makefiles.

# This requires a flag be set in /etc/make.conf
.if defined(VNIAFTERPORTMK) && ${VNIAFTERPORTMK} == YES

.if exists(/etc/make.conf.vni)
# But if the flag is set, and the file exists, pull it in.
.include
.endif

.undef VNIAFTERPORTMK
.endif

# -*- makefile -*-
# File: make.conf.vni
# Author: Charlie Root, ericx at vineyard.net
# Date: Thu Jan 3 00:34:51 2002
# Time-stamp: <2003-05-18 10:44:51 ericx>
# Description: Setting variable in /etc/make.conf is not optimal
# because those variables are read very early in the
# compilation process and anything can be overridden in
# the various Makefiles embedded in the ports
# system. Nor can variables in /etc/make.conf be set on
# a per-port basis, because at the time it is read
# ${PORTNAME} has not been set.
#
# This file is read in at the END of make's parsing phase
# after all other Makefiles have been
# included. Conditional variables can be can be set
# based on ${PORTNAME} and decisions made by the port's
# maintainer can be overridden.
#
# See also: /etc/make.conf, /usr/Makfile.inc, /usr/ports/Mk
#
#
# $Id: make.conf.vni,v 1.11 2003/05/18 14:56:07 ericx Exp $
# $Log: make.conf.vni,v $
# Revision 1.11 2003/05/18 14:56:07 ericx
# Removed redundant php4 entry.
# Adjusted php4 entry to use port's configure mechanism.
# Removed OpenLDAP2 option because it causes httpd to core dump. No
# idea why.
#
# Revision 1.10 2003/05/14 18:50:04 ericx
# Please be careful. This makefile is NOT exclusive to the ports tree;
# but is used system wide by all compiles including buildworld.
#
# Patched conditionals for mod_php4 and imp3 so they won't barf for
# non-ports compiles.
#
# Revision 1.9 2003/04/23 14:56:22 asc
# Added bugzilla entry.
#
# Revision 1.8 2003/04/18 16:04:18 theqblas
# Added imp3 flags
#
# Revision 1.7 2003/04/18 16:02:44 theqblas
# Added mod_php4 configure args.
#


.if defined(VNIAFTERPORTMK)

HOSTNAME?= /bin/hostname

.if defined(PORTNAME) && ${PORTNAME} == perl

# Updating Ports on Production Servers (p3 of 5)
# Per the INSTALL docs this needs to be a colon-separated
# list of paths. If someone else knows how to do that spanning
# multiple lines, please go nuts.

# Note we are only including the site_perl directories to
# try and prevent any weirdness with the core libraries.

# Note also that we are *not* including the ${PERL_ARCH}
# directory which gets automagically included. Dunno.
CONFIGURE_ARGS+= -Dotherlibdirs=${PREFIX}/lib/perl5/site_perl/5.005

.endif
# End of perl port configs

.if defined(PORTNAME) && ${PORTNAME} == bugzilla
# Need to find some way to patch the default
# patch for checksetup.pl to set webservergroup
# as 'http'. I don't know how to do this; there
# is an entry in bugzilla...
.endif
# End of 'bugzilla'

.if defined(PORTNAME) && ${PORTNAME} == apache+mod_ssl
# We disable the use of apache's built-in expat-lite because it makes
# using anything that uses the XML::Parser package in a mod_perl
# context impossible.
CONFIGURE_ARGS+= --disable-rule=EXPAT
.endif
# End of apache+mod_ssl port configs


.if defined(PORTNAME) && ${PORTNAME} == mod_dav
CONFIGURE_ARGS+= --with-expat=/usr/local
.endif
# End of mod_dav


.if defined(PORTNAME) && ${PORTNAME} == mod_php4
# This is to preempt the interactive menu normally used by the php
# port.

# The mod_php4 port uses PHP4_OPTIONS to set a number of compile
# options (including dependencies). Only setting CONFIGURE_ARGS for
# these skips the dependencies and other make linkages; so unless you
# want to look them all up and do them by hand too, just set
# PHP4_OPTIONS above. The code that runs all this is found in
# /usr/ports/www/mod_php4/scripts/configure.php. No, I don't really
# grok the need for the escaped quotes...
SCRIPTS_ENV+= BATCH=yes
# as of mod_php4 4.3.1, the compile with openldap 2.0 builds ok; but
# the resultant httpd won't run (no errors; just a core)
PHP4_OPTIONS= \
\"zlib\" \
\"mcrypt\" \
\"IMAP\" \
\"IMAP-SSL\" \
\"MySQL\" \
\"OpenSSL\" \
\"XML\" \
\"DOMXML\" \
\"FTP\" \
\"gettext\" \
\"MCAL\"
# \"OpenLDAP2\" \

CONFIGURE_ARGS+= \
--enable-memory-limit \
--enable-safe-mode

# mod_php4
.endif

## IMP flags
.if defined(PORTNAME) && ${PORTNAME} == imp3

# Don't require an IMAP server to exist on this machine
WITHOUT_IMAPSERVER=yes

# imp3
.endif


.if defined(PKGNAMEPREFIX) && ${PKGNAMEPREFIX} == p5-
# this is a context for (hopefully) all perl5 modules
MAKE_ARGS+= UNINST=1
#.error the var = ${CONFIGURE_ENV}
.endif
# p5- modules


.endif
# End of VNIAFTERPORTMK

Posted by 0xFF3300 at March 3, 2004 01:13 PM

Trackback Pings

TrackBack URL for this entry:
http://www.dudeforce.net/cgi-bin/mt-tb.cgi/46

Listed below are links to weblogs that reference Storing Previous Compilation Options: mod_php4 and make:

Comments

FORTRAN is the language of Powerful Computers.
-- Steven Feiner
prozac online I WILL STOP PHONING IT IN
I WILL STOP PHONING IT IN
I WILL STOP PHONING IT IN
I WILL STOP PHONING IT IN

Bart Simpson on chalkboard in episode BABF06
prozac

Posted by: Nancy Booth at September 6, 2004 06:30 AM

Never trust anybody whose arm is bigger than your leg.
fioricet for headache As with most fine things, chocolate has its season. There is a simple
memory aid that you can use to determine whether it is the correct time
to order chocolate dishes: any month whose name contains the letter A,
E, or U is the proper time for chocolate.
-- Sandra Boynton, "Chocolate: The Consuming Passion"
fioricet

Posted by: John Linkes at September 7, 2004 03:56 AM

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?