New commits:
commit 5240950a71cb873a6c15fe1984047b03045ed737
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
php: big changes to the php spell
Reworked it significantly to make it suck less. Database drivers are
grouped in a sane fashion. Usage of PCRE is smarter. All the drivers are
selectable now.
Restructred like a mad man
Oops
Don't include ndbm or dbm, they're deprecated
Fixing some bugs
More oops
BLARGH
Last glitch I hope...
Fixing this I think
Install the right config file
Slightly smarter pear check
commit 7ab63b0df41b5725e31197171cff0e33dac6a967
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Slightly smarter pear check
commit 708caced1a12b8ef507d25fda778563c0a9b8a1f
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Install the right config file
commit f6eed53842509e602784c9671c445c5d764b04d4
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Fixing this I think
commit c6f382a5384026af40af4729305dacdf2c75b0d7
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Last glitch I hope...
commit e1e7a289defe5f7c146e93356a6c957355ed1474
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
BLARGH
commit d8f8d030e4cded362c220255965e68c39b2c28df
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
More oops
commit b830bc2c60c18c1352ca6bbe51bdd5576b10ad0a
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Fixing some bugs
commit 36e83f67c91c93336477383a3be344a62bdbaaa7
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Don't include ndbm or dbm, they're deprecated
commit b76fecfc5576227c03ebcb0ff879d9af699b215a
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Oops
commit 85675886c0837e74b5f5d3722ea224e905dd3b50
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT Kain.shlrm.org>
Restructred like a mad man
diff --git a/php-pear/php/CONFIGURE b/php-pear/php/CONFIGURE
index 87f57c7..b63fcc3 100755
--- a/php-pear/php/CONFIGURE
+++ b/php-pear/php/CONFIGURE
@@ -1,3 +1,13 @@
+. $GRIMOIRE/config_query_multi.function &&
+message "${MESSAGE_COLOR}PEAR support will enable the CLI version and force
depends on libxml2" &&
+message "It will also enable some PCRE support (internal
reccomended)${DEFAULT_COLOR}" &&
+# prior pear enabledness
+if list_find "$PHP5_OPTS" "--enable-pear" ; then
+ PHP5_PEAR="y"
+fi &&
+
+config_query PHP5_PEAR "Do you want PEAR support?" y &&
+
config_query_option PHP5_OPTS "Enable IPv6?" n \
"--enable-ipv6" "--disable-ipv6" &&
-config_query_option PHP5_OPTS "Enable pcntl support (CLI/CGI only)" n \
+config_query_option PHP5_OPTS "Enable pcntl support (Only affects CLI/CGI)"
n \
"--enable-pcntl" "--disable-pcntl" &&
message "${MESSAGE_COLOR}Both FastCGI and CGI can be enabled at the same
time${DEFAULT_COLOR}" &&
@@ -24,26 +34,67 @@ config_query_option PHP5_OPTS "Enable FastCGI SAPI?" n \
config_query_option PHP5_OPTS "Enable CGI SAPI?" y \
"--enable-cgi" "--disable-cgi" &&
-config_query_option PHP5_OPTS "Enable CLI version? (needed for PEAR and
CGI/FastCGI)" y \
- "--enable-cli" "--disable-cli" &&
+if [[ "${PHP5_PEAR}" == "y" ]] || list_find "$PHP5_OPTS" "--enable-cgi" ||
list_find "$PHP5_OPTS" "--enable-fastcgi" ; then
+ message "${MESSAGE_COLOR}Enabling CLI version for PEAR/CGI/FastCGI
support${DEFAULT_COLOR}" &&
+ PHP5_OPTS="$PHP5_OPTS --enable-cli"
+else
+ config_query_option PHP5_OPTS "Enable CLI version?" y \
+ "--enable-cli" "--disable-cli"
+fi &&
-config_query_option PHP5_OPTS "Enable the DBA database drivers?
(qdbm/gdbm/db/flatfile)" n \
- "--enable-dba" "--disable-dba" &&
+message "${MESSAGE_COLOR}See http://us.php.net/dba.installation for more
info${DEFAULT_COLOR}" &&
+message "${MESSAGE_COLOR}Not recommended: dbm, ndbm. NOTE: qdbm conflicts
with dbm and gdbm${DEFAULT_COLOR}" &&
+config_query_multi PHP5_DBA_DRIVERS "Select dbm-style database drivers (if
any)" none gdbm db4 flatfile inifile qdbm &&
+
+if ! list_find "${PHP5_DBA_DRIVERS}" "none"; then
+ if list_find "${PHP5_DBA_DRIVERS}" "flatfile"; then
+ PHP5_OPTS="$PHP5_OPTS --enable-inifile"
+ fi
+ if list_find "${PHP5_DBA_DRIVERS}" "flatfile"; then
+ PHP5_OPTS="$PHP5_OPTS --enable-flatfile"
+ fi
+fi &&
-if list_find "${PHP5_OPTS}" "--enable-dba"; then
- config_query_option PHP5_OPTS "Enable DBA inifile support?" y \
- "--enable-inifile" "--disable-inifile" &&
- config_query_option PHP5_OPTS "Enable DBA flatfile support?" y \
- "--enable-flatfile" "--disable-flatfile"
+# get the native simple drivers
+local DB_DRIVERS="mysql mysqli pgsql sqlite sqlite3 firebird unixODBC iODBC"
+config_query_multi PHP5_DATABASE_DRIVERS "Select vendor specific database
drivers to install (if any)" \
+ none all $DB_DRIVERS &&
+
+if ! list_find "${PHP5_DATABASE_DRIVERS}" "none"; then
+ PHP5_OPTS="$PHP5_OPTS --enable-dba" &&
+ for foo in $DB_DRIVERS; do
+ if list_find "${PHP5_DATABASE_DRIVERS}" "$foo" || list_find
"${PHP5_DATABASE_DRIVERS}" "all"; then
+ PHP5_OPTS="$PHP5_OPTS --with-$foo"
+ else
+ PHP5_OPTS="$PHP5_OPTS --without-$foo"
+ fi
+ done
fi &&
-config_query_option PHP5_OPTS "Enable the PDO database drivers?
(mysql/postgresql/oracle/*odbc)" y \
+#ask if they want the PDO drivers for the drivers they selected
+config_query_option PHP5_OPTS "Enable PHP Data Objects?" y \
"--enable-pdo" "--disable-pdo" &&
+if list_find "$PHP5_OPTS" "--enable-pdo"; then
+ local PDO_DRIVERS="mysql pgsql firebird unixODBC iODBC" &&
+ for foo in $PDO_DRIVERS; do
+ if list_find "${PHP5_DATABASE_DRIVERS}" "$foo" || list_find
"${PHP5_DATABASE_DRIVERS}" "all"; then
+ # odbc special case
+ if [[ "$foo" == "unixODBC" ]]; then
+ config_query_option PHP5_OPTS "Enable PDO
driver for unixodbc?" n "--with-pdo-odbc=unixODBC,${INSTALL_ROOT}/usr" ""
+ elif [[ "$foo" == "iODBC" ]]; then
+ config_query_option PHP5_OPTS "Enable PDO
driver for libiodbc?" n "--with-pdo-odbc=iODBC,${INSTALL_ROOT}/usr" ""
+ else
+ config_query_option PHP5_OPTS "Enable PDO
driver for $foo?" n "--with-pdo-$foo=${INSTALL_ROOT}/usr" "--without-pdo-$foo"
+ fi
+ fi
+ done
+fi &&
+
config_query_option PHP5_OPTS "Enable shmop support?" n \
"--enable-shmop" "--disable-shmop" &&
-depends flex &&
+# takes two params
+# $1 is the driver name
+# $2 is the spell name (for depending)
+function db_driver_depends() {
+ local db_driver="$1"
+ local db_spell="$2"
+ if list_find "$PHP5_DATABASE_DRIVERS" "$db_driver" || list_find
"$PHP5_DATABASE_DRIVERS" "all"; then
+ depends $db_spell "--with-$db_driver"
+ else
+ OPTS="$OPTS --without-$db_driver"
+ fi
+}
+depends flex &&
# Officially these are optional, but we require them because some other
# optional extensions depend on it, and they're omnipresent anyway
depends readline "--with-readline" &&
@@ -11,10 +23,14 @@ optional_depends bzip2 \
"--with-bz2" "--without-bz2" \
"for compression support" &&
-optional_depends libxml2 \
- '--enable-xml --enable-dom --with-xmlrpc' \
- '--disable-xml --disable-dom --without-xmlrpc
--disable-xmlreader --disable-xmlwriter --disable-simplexml' \
- 'For XML support (required for SOAP and PEAR)' &&
+if [[ "$PHP5_PEAR" == "y" ]]; then
+ depends libxml2 '--enable-xml --enable-dom --with-xmlrpc'
+else
+ optional_depends libxml2 \
+ '--enable-xml --enable-dom
--with-xmlrpc' \
+ '--disable-xml --disable-dom
--without-xmlrpc --disable-xmlreader --disable-xmlwriter --disable-simplexml'
\
+ 'For XML support (required for SOAP)'
+fi