new lang/php4

Roman Neuhauser neuhauser at bellavista.cz
Sun Apr 27 06:31:35 PDT 2003


Hi there,

I've been writing new lang/php4 port, and have come across a "problem"
I don't know how to solve: all --{with,enable}-* knobs can be defined
through appropriate WITH_* variables in the Makefile, and it currently
enables all selfcontained (no external dependencies) functionality that
is not specific to the web server environment (the code is below), plus
mysql.

That means that running make with no switches will give you php(1) with
bcmath, ctype, ftp, mime-magic, overload, pcre, posix functions, sockets
interface, tokenizer, and xml, and although every single part of that
can be disabled by WITHOUT_FOO, I'm not sure I like this.

What is the recommended way?


.if defined(PACKAGE_BUILDING)
DEFAULTS=	${WITH} ${ENABLE} mysql40 ncurses-base readline
.else
DEFAULTS=	bcmath ctype ftp mime-magic mysql overload pcre-regex posix \
		sockets tokenizer xml
.endif

WITH=		dbase gmp hyperwave xmlrpc zlib
ENABLE=		bcmath calendar ctype dba dbx filepro ftp mbregex mbstring \
		mime-magic overload pcntl pcre-regex posix shmop sockets \
		sysvsem sysvshm tokenizer wddx yp xml

.for v in ${DEFAULTS}
.  if !defined(WITHOUT_${v:U:S,-,_,g})
WITH_${v:U:S,-,_,g}=yes
.  endif
.endfor

.for g in WITH ENABLE
.  for v in ${${g}}
.    if defined(WITH_${v:U:S,-,_,g})
CONFIGURE_ARGS+=--${g:L}-${v}
.    endif
.  endfor
.endfor

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.    see http://www.eyrie.org./~eagle/faqs/questions.html


More information about the freebsd-ports mailing list