freebsd-ports/www/mod_php3/Makefile
Andreas Klemm 202baee5f6 Upgraded to last php version 3.0.2
Included freetype support for php
Why freetype support ?

If you compile PHP with gd and freetype[it's already a port], and grab
some free truetype fonts from microsoft in self-install.exe format you
can generate really nice on the fly gif's with text in them.  Buttons,
banners etc.

William told me: I had to install the free microsoft fonts on my pc
and then ftp them. I can't think of a way to extract the files from
the .exe archive. I don't think it's a zip type.

I got the fonts microsoft link by digging around in
http://www.freetype.org

Submitted by:	William Lloyd <wlloyd@mpd.ca>
1998-07-25 06:51:26 +00:00

109 lines
3.8 KiB
Makefile

# New ports collection makefile for: apache HTTPD / php
# Version required: 1.2.6 / 3.0
# Date created: Wed Sep 3 18:28:20 CEST 1997
# Whom: Andreas Klemm <andreas@klemm.gtn.com>
#
# $Id: Makefile,v 1.47 1998/07/11 20:52:36 andreas Exp $
#
DISTNAME= apache_1.2.6
PKGNAME= apache-1.2.6-php3.0.2
CATEGORIES= www
MASTER_SITES= ftp://www.apache.org/apache/dist/ \
http://ca.php.net/distributions/
DISTFILES= apache_1.2.6.tar.gz php-3.0.2.tar.gz
MAINTAINER= andreas@FreeBSD.ORG
BUILD_DEPENDS= ${PREFIX}/lib/libgd.a:${PORTSDIR}/graphics/gd \
gmake:${PORTSDIR}/devel/gmake \
${PREFIX}/include/freetype.h:${PORTSDIR}/print/freetype
NO_PACKAGE= "Support for different databases via make-variable"
MAN1= htpasswd.1
MAN8= httpd.8
DOCDIR= ${PREFIX}/share/doc/apache
.if defined(PATCH_DEBUG)
PATCH_DIST_ARGS= -d ${WRKSRC}/src -E ${PATCH_DIST_STRIP}
.else
PATCH_DIST_ARGS= -d ${WRKSRC}/src --forward --quiet -E ${PATCH_DIST_STRIP}
.endif
# Set it for local-supplied patch, f.e.
VERS_ID = PHP-3.0.2
PHP3_CONF_ARGS= --prefix=${PREFIX} --with-gd=${PREFIX} \
--with-system-regex --with-apache=${WRKSRC} \
--with-config-file-path=${PREFIX}/lib --disable-debug \
--libdir=${PREFIX}/lib --includedir=${PREFIX}/include
.if !defined(PHP3_DBTYPE) || ${PHP3_DBTYPE} != msql && ${PHP3_DBTYPE} != mysql && ${PHP3_DBTYPE} != pgsql && ${PHP3_DBTYPE} != dbase
pre-fetch:
@ ${ECHO}
@ ${ECHO} "You must set variable PHP3_DBTYPE to msql, mysql or pgsql by typing"
@ ${ECHO} "make PHP3_DBTYPE=[ dbase | msql | mysql | pgsql ]"
@ ${FALSE}
.elif defined(PHP3_DBTYPE)
.if ${PHP3_DBTYPE} == msql
BUILD_DEPENDS+= msql:${PORTSDIR}/databases/msql
PHP3_CONF_ARGS+= --with-msql=${PREFIX}
.elif ${PHP3_DBTYPE} == mysql
BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql
PHP3_CONF_ARGS+= --with-mysql=${PREFIX}
.elif ${PHP3_DBTYPE} == pgsql
BUILD_DEPENDS+= ${PREFIX}/pgsql/bin/psql:${PORTSDIR}/databases/postgresql
PHP3_CONF_ARGS+= --with-pgsql=${PREFIX}/pgsql
.elif ${PHP3_DBTYPE} == dbase
PHP3_CONF_ARGS+= --with-dbase
.endif
.endif
.if defined(VERS_ID)
post-patch:
@cd ${WRKSRC}/src && \
${MV} Configuration Configuration.old && \
${SED} 's;^#*OPTIM=.*;OPTIM= -DSERVER_SUBVERSION=\\"${VERS_ID}\\";' \
< Configuration.old > Configuration
.endif
pre-configure:
( cd ${WRKDIR}/php-3.0.2 \
&& CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS=-I${PREFIX}/include ./configure ${PHP3_CONF_ARGS} \
&& ${GMAKE} install )
${ECHO} "Module php3_module mod_php3.o" >> ${WRKSRC}/src/Configuration
.if defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == msql
${ECHO} "EXTRA_LIBS=-lmd libphp3.a -L${PREFIX}/lib -lmsql -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
.elif defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == mysql
${ECHO} "EXTRA_LIBS=-lmd libphp3.a -L${PREFIX}/lib/mysql -lmysqlclient -L${PREFIX}/lib -I${PREFIX}/include/gd -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
.elif defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == pgsql
${ECHO} "EXTRA_LIBS=-lmd libphp3.a -L${PREFIX}/pgsql/lib -lpq -L${PREFIX}/lib -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
.elif defined(PHP3_DBTYPE) && ${PHP3_DBTYPE} == dbase
${ECHO} "EXTRA_LIBS=-lmd libphp3.a libdbf.a -L${PREFIX}/lib -lgd -lm -lttf" >> ${WRKSRC}/src/Configuration
.endif
post-install:
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
${SED} 's;PREFIX;${PREFIX};' < ${FILESDIR}/apache.sh.tmpl > \
${PREFIX}/etc/rc.d/apache.sh; \
chmod 751 ${PREFIX}/etc/rc.d/apache.sh; \
fi
.for i in ${MAN1}
${INSTALL_MAN} ${WRKSRC}/support/$i ${PREFIX}/man/man1
.endfor
.for i in ${MAN8}
${INSTALL_MAN} ${WRKSRC}/support/$i ${PREFIX}/man/man8
.endfor
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCDIR}
.for i in README LICENSE ABOUT_APACHE
${INSTALL_DATA} ${WRKSRC}/$i ${DOCDIR}
.endfor
@cd ${WRKSRC}/htdocs; tar cf - . | (cd ${DOCDIR}; tar xf -)
.endif
.include <bsd.port.mk>