ports/50811: make building mod_php4 without MySQL more consistent
Dmitry Morozovsky
marck at rinet.ru
Fri Apr 11 08:50:18 UTC 2003
>Number: 50811
>Category: ports
>Synopsis: make building mod_php4 without MySQL more consistent
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 11 01:50:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Morozovsky
>Release: FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 4-STABLE
>Description:
This PR consists of two patchsets. The first one makes building mod_php4
without MySQL support more consistent, and allows automated (BATCH=yes) nomysql
builds. It also reflects absense of mysql support in package name.
The second pathset (patch+shar) utilises the newly announced behaviour and
defines lightweight PHP4 package.
>How-To-Repeat:
cd /usr/ports/www/mod_php4
make BATCH=yes WITHOUT_MYSQL=yes
see incorrectly compiled in MySQL support
>Fix:
***** Patchset 1 *****
Index: www/mod_php4/Makefile
===================================================================
RCS file: /home/ncvs/ports/www/mod_php4/Makefile,v
retrieving revision 1.187
diff -u -r1.187 Makefile
--- www/mod_php4/Makefile 7 Mar 2003 06:12:44 -0000 1.187
+++ www/mod_php4/Makefile 11 Apr 2003 08:26:26 -0000
@@ -68,6 +68,10 @@
PHP4_OPTIONS="${PHP4_OPTIONS}" \
REALCURDIR="${.CURDIR}"
+.if defined(WITHOUT_MYSQL)
+SCRIPTS_ENV+= WITHOUT_MYSQL=yes
+.endif
+
pre-fetch:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php
.if !defined(WITH_APACHE2)
@@ -104,6 +108,8 @@
.ifmake describe
LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
.endif
+.else
+PKGNAMESUFFIX= -nomysql
.endif
.include <bsd.port.mk>
Index: www/mod_php4/scripts/configure.php
===================================================================
RCS file: /home/ncvs/ports/www/mod_php4/scripts/configure.php,v
retrieving revision 1.186
diff -u -r1.186 configure.php
--- www/mod_php4/scripts/configure.php 23 Mar 2003 08:23:10 -0000 1.186
+++ www/mod_php4/scripts/configure.php 11 Apr 2003 08:26:26 -0000
@@ -11,9 +11,18 @@
if [ "${PHP4_OPTIONS}" ]; then
set ${PHP4_OPTIONS}
else
- set \"zlib\" \"MySQL\"
+ if [ "${WITHOUT_MYSQL}" ]; then
+ set \"zlib\"
+ else
+ set \"zlib\" \"MySQL\"
+ fi
fi
else
+ if [ "${WITHOUT_MYSQL}" ]; then
+ MYSQL_SUPPORT=OFF
+ else
+ MYSQL_SUPPORT=ON
+ fi
/usr/bin/dialog --title "configuration options" --clear \
--checklist "\n\
Please select desired options:" -1 -1 16 \
@@ -27,7 +36,7 @@
pdflib "pdflib support" OFF \
IMAP "IMAP support" OFF \
IMAP-SSL "IMAP-SSL support (implies IMAP)" OFF \
-MySQL "MySQL database support" ON \
+MySQL "MySQL database support" ${MYSQL_SUPPORT} \
PostgreSQL "PostgreSQL database support" OFF \
SybaseDB "Sybase/MS-SQL database support (DB-lib)" OFF \
SybaseCT "Sybase/MS-SQL database support (CT-lib)" OFF \
***** Patchset 2 *****
Index: www/Makefile
===================================================================
RCS file: /home/ncvs/ports/www/Makefile,v
retrieving revision 1.630
diff -u -r1.630 Makefile
--- www/Makefile 6 Apr 2003 00:30:58 -0000 1.630
+++ www/Makefile 11 Apr 2003 08:30:06 -0000
@@ -201,6 +201,7 @@
SUBDIR += mod_perl2
SUBDIR += mod_php3
SUBDIR += mod_php4
+ SUBDIR += mod_php4-nomysql
SUBDIR += mod_proxy_add_forward
SUBDIR += mod_put
SUBDIR += mod_python
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# www/mod_php4-nomysql
# www/mod_php4-nomysql/Makefile
#
echo c - www/mod_php4-nomysql
mkdir -p www/mod_php4-nomysql > /dev/null 2>&1
echo x - www/mod_php4-nomysql/Makefile
sed 's/^X//' >www/mod_php4-nomysql/Makefile << 'END-of-www/mod_php4-nomysql/Makefile'
X# Ports collection makefile for: mod_php4-nomysql
X# Date created: 09 Apr 2003
X# Whom: Dmitry Morozovsky <marck at rinet.ru>
X#
X# $FreeBSD$
X#
X
XWITHOUT_MYSQL= yes
X
XMASTERDIR= ${.CURDIR}/../mod_php4
X
X.include "${MASTERDIR}/Makefile"
END-of-www/mod_php4-nomysql/Makefile
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list