port php4 mit "--with-system-regex" kompilieren, Teil II

From: Benjamin Thelen <benjamin.thelen(at)ccgis.de>
Date: Mon, 28 Apr 2003 16:09:37 +0200

Hallo,

Ich habe inzwischen Antwort aus der Mailingliste von umn-mapserver:

------------------------------------------------------------------------
--with-regex=system has no effect when you use --with-apxs. Anyway you
need PHP compiled as a CGI so you should remove the --with-apxs config
option, and then --with-regex=system will also start to work.
------------------------------------------------------------------------

Das wurde mir geschickt, nachdem ich gepostet habe, womit mein php4
kompiliert wurde. Hier auch noch mal zur Info:

------------------------------------------------------------------------
./configure' '--with-apxs=/usr/local/sbin/apxs'
'--with-config-file-path=/usr/local/etc' '--enable-versioning'
'--with-regex=system' '--without-gd' '--without-mysql'
'--with-gd=/usr/local' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-zlib' '--with-pdflib=/usr/local'
'--with-zlib-dir=/usr' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-tiff-dir=/usr/local'
'--with-mysql=/usr/local' '--with-pgsql=/usr/local' '--with-dbase'
'--with-expat-dir=/usr/local' '--with-dom=/usr/local' '--prefix=/usr/local'
'i386-portbld-freebsd4.7'
------------------------------------------------------------------------

Ich habe mir die Optionen noch nicht so genau angesehen, weil ich bisher nur
auf das regex geachtet habe. Aber ist es nicht seltsam, dass bei gd und
mysql zuerst --without... und dann doch wieder --with... steht und
dass --with-png-dir, sowie --with-jpg-dir zwei Mal aufgelistet werden? Ist
das richtig?
Eigentlich kann ich ja bei der Installation von php4 nix falsch gemacht
haben, weil ich es aus der Ports-Collection installiert habe.

Um wieder auf --with-apxs zurück zu kommen (Das php-4 Makefile [aus der
Ports-Collection] findet Ihr unten!):
An welcher Stelle nehme ich es raus? apxs tritt in Varianten ja an mehreren
Stellen auf. Ich würde jetzt am ehesten den --with-apxs Eintrag aus
CONFIGURE_ARGS+ herausnehmen. Aber so überzeugt bin ich davon nicht! Und an
der Stelle möchte ich jetzt etwas vorsichtig sein, um nicht den totalen Mist
zu bauen. Was meint Ihr zu dem --with-apxs?

Was passiert, wenn ich das Makefile geändert habe. "Make install" wird mir
sicher sagen, dass php4 bereits installiert ist und deinstallieren werde ich
php4 nicht können, weil Abhängigkeiten vorhanden sind. Wie geht man an der
Stelle vor?

Ich brauche hier dringend Hilfe. Hier bewege ich mich einfach in Tiefen, das
ist noch bisschen früh für mich. Ich mache ja erst seit gerade mal paar
Wochen Unix!

Vielen Dank!
Benjamin

/usr/ports/www/mod_php4/Makefile:

------------------------------------------------------------------------
# New ports collection makefile for: mod_php4
# Date created: Sun May 28 11:31:54 CEST 2000
# Whom: Dirk Froemberg <dirk(at)FreeBSD.org>
#
# $FreeBSD: ports/www/mod_php4/Makefile,v 1.187 2003/03/07 06:12:44 ade Exp
$
#

PORTNAME= mod_php4
PORTVERSION= 4.3.1
PORTREVISION= 0
CATEGORIES= www
MASTER_SITES= http://us.php.net/${PHP_DISTDIR}/ \
                http://php.he.net/${PHP_DISTDIR}/ \
                http://www.php3.de/${PHP_DISTDIR}/ \
                http://au.php.net/${PHP_DISTDIR}/ \
                http://at.php.net/${PHP_DISTDIR}/ \
                http://br.php.net/${PHP_DISTDIR}/ \
                http://php.easydns.com/${PHP_DISTDIR}/ \
                http://www.php.cz/${PHP_DISTDIR}/ \
                http://php3.globe.de/${PHP_DISTDIR}/
DISTNAME= php-${PORTVERSION}

MAINTAINER= dirk(at)FreeBSD.org
COMMENT= PHP4 module for Apache

BUILD_DEPENDS= ${APXS}:${APACHE_PORT}
RUN_DEPENDS= ${APXS}:${APACHE_PORT}
.if defined(WITH_APACHE2)
LIB_DEPENDS= pth.20:${PORTSDIR}/devel/pth
.endif

PHP_DISTDIR= distributions

USE_BZIP2= yes
USE_SUBMAKE= yes
USE_AUTOCONF_VER=213
.if defined(WITH_APACHE2)
APACHE_PORT?= ${PORTSDIR}/www/apache2
.else
APACHE_PORT?= ${PORTSDIR}/www/apache13
.endif
APXS?= ${LOCALBASE}/sbin/apxs

.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
IS_INTERACTIVE= yes
.endif

.if defined(WITH_APACHE2)
CONFIGURE_ARGS= --with-apxs2=${PREFIX}/sbin/apxs \
                --with-tsrm-pth
PLIST_SUB= MOD_DIR=libexec/apache2
.else
CONFIGURE_ARGS= --with-apxs=${PREFIX}/sbin/apxs
PLIST_SUB= MOD_DIR=libexec/apache
.endif
CONFIGURE_ARGS+=--with-config-file-path=${PREFIX}/etc \
                --enable-versioning \
                --with-regex=system \
                --without-gd \
                --without-mysql

CFLAGS+= -I${PREFIX}/include

SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
                TOUCH="${TOUCH}" \
                MKDIR="${MKDIR}" \
                CAT="${CAT}" \
                PHP4_OPTIONS="${PHP4_OPTIONS}" \
                REALCURDIR="${.CURDIR}"

pre-fetch:
        @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php
.if !defined(WITH_APACHE2)
        @${ECHO_CMD} "Define WITH_APACHE2 to build mod_php4 as an apache2 module."
        @${ECHO_CMD} ""
.endif

post-install:
        @${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/etc

        @${ECHO_CMD}
"***************************************************************************
**"
        @${ECHO_CMD} "Make sure the mime.types are connected to the php module
properly and"
        @${ECHO_CMD} "index.php is part of your DirectoryIndex."
        @${ECHO_CMD} ""
        @${ECHO_CMD} "The following should be in your Apache configuration file:"
        @${ECHO_CMD} "[...]"
        @${ECHO_CMD} "DirectoryIndex index.php index.html"
        @${ECHO_CMD} "[...]"
        @${ECHO_CMD} "AddType application/x-httpd-php .php"
        @${ECHO_CMD} "AddType application/x-httpd-php-source .phps"
        @${ECHO_CMD} "[...]"
        @${ECHO_CMD}
"***************************************************************************
**"

post-clean:
        @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc

.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif

# XXX:
# Has to be kept in sync with the defaults in configure.php
.ifndef(WITHOUT_MYSQL)
.ifmake describe
LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
.endif
.endif

.include <bsd.port.mk>

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Mon 28 Apr 2003 - 16:09:57 CEST

search this site