Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by David Kowis (a7ac774c29882dfd51bdff80e58a3dad1db776c2)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Kowis <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by David Kowis (a7ac774c29882dfd51bdff80e58a3dad1db776c2)
  • Date: Mon, 14 Sep 2009 09:23:29 -0500

GIT changes to master grimoire by David Kowis <dkowis AT Kain.shlrm.org>:

php-pear/php/CONFIGURE | 83 ++++++++++++++++++++---
php-pear/php/DEPENDS | 172
+++++++++++++++++++++----------------------------
php-pear/php/INSTALL | 6 +
3 files changed, 151 insertions(+), 110 deletions(-)

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" &&

@@ -13,7 +23,7 @@ config_query_option PHP5_OPTS "Enable FTP support?" y \
config_query_option PHP5_OPTS "Enable calendar support?" y \
"--enable-calendar" "--disable-calendar" &&

-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 multibyte support?" n \
"--enable-mbstring --enable-mbregex" \
"--disable-mbstring --disable-mbregex" &&

-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" &&

@@ -63,4 +114,12 @@ config_query_list PHP5_APACHE "Which Apache module to
build?" \
none handler filter &&

config_query_list PHP5_GD "Which GD library to use?" \
- none internal external
+ none internal external &&
+
+if [[ "$PHP5_PEAR" == "y" ]]; then
+ config_query_list PHP5_PCRE "Which PCRE library to use (internal
reccomended)?" \
+ internal external
+else
+ config_query_list PHP5_PCRE "Which PCRE library to use (internal
reccomended)?" \
+ internal external none
+fi
diff --git a/php-pear/php/DEPENDS b/php-pear/php/DEPENDS
index b967707..bcc89af 100755
--- a/php-pear/php/DEPENDS
+++ b/php-pear/php/DEPENDS
@@ -1,7 +1,19 @@
. ${GRIMOIRE}/FUNCTIONS &&

-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

optional_depends libxslt \
"--with-xsl" "--without-xsl" \
@@ -22,14 +38,9 @@ optional_depends libxslt \

if is_depends_enabled $SPELL libxml2 ; then
config_query_option PHP5_OPTS "Enable SOAP support?" n \
- "--enable-soap" "--disable-soap" &&
- if list_find "${PHP5_OPTS}" "--enable-cli"; then
- config_query_option PHP5_OPTS "Enable PEAR support?" y \
- "--enable-pear=${INSTALL_ROOT}/usr/share/pear" \
- "--without-pear"
- fi
+ "--enable-soap" "--disable-soap"
else
- PHP5_OPTS="${PHP5_OPTS} --disable-soap --without-pear"
+ PHP5_OPTS="${PHP5_OPTS} --disable-soap"
fi &&

optional_depends pth \
@@ -41,18 +52,27 @@ case "${PHP5_APACHE}" in
filter) depends APACHE2;;
esac &&

-optional_depends pcre \
- "--with-pcre-regex=${INSTALL_ROOT}/usr
--with-pcre=${INSTALL_ROOT}/usr" \
- "--without-pcre-regex --without-pcre" \
- "for perl regular expressions support (required for PEAR)"
&&
+if [[ "$PHP5_PCRE" == "none" ]]; then
+ PHP5_OPTS="$PHP5_OPTS --without-pcre-regex --without-pcre"
+elif [[ "$PHP5_PCRE" == "external" ]]; then
+ depends pcre "--with-pcre-regex=${INSTALL_ROOT}/usr
--with-pcre=${INSTALL_ROOT}/usr"
+fi &&

optional_depends C-CLIENT \
"--with-imap=${INSTALL_ROOT}/usr" "--without-imap" \
"for IMAP support" &&

+optional_depends openssl \
+ "--with-openssl" "--without-openssl" \
+ "for OpenSSL support" &&
+
if list_find "${OPTS}" "--with-imap"; then
- optional_depends openssl "--with-imap-ssl" "--without-imap-ssl" \
- "for SSL support with IMAP"
+ if is_depends_enabled $SPELL openssl; then
+ OPTS="$OPTS --with-imap-ssl"
+ else
+ optional_depends openssl "--with-imap-ssl"
"--without-imap-ssl" \
+ "for SSL
support with IMAP (but not elsewhere)"
+ fi
fi &&

optional_depends MAIL-TRANSPORT-AGENT \
@@ -93,10 +113,6 @@ optional_depends gmp \
"--with-gmp" "--without-gmp" \
"GNU multi-precision library support" &&

-optional_depends openssl \
- "--with-openssl" "--without-openssl" \
- "for OpenSSL support" &&
-
optional_depends krb5 \
"--with-kerberos" "--without-kerberos" \
"for Kerberos support" &&
@@ -110,85 +126,47 @@ optional_depends icu \
"--without-icu-dir" \
"for ICU unicode support" &&

-optional_depends ODBC-MGR "" "" "for ODBC support" &&
-
-case $(get_spell_provider $SPELL ODBC-MGR) in
- unixodbc) OPTS="${OPTS} --with-unixODBC=${INSTALL_ROOT}/usr
--without-iodbc" ;;
- libiodbc) OPTS="${--with-iodbc=${INSTALL_ROOT}}/usr --without-unixODBC" ;;
-esac &&
-
-optional_depends mysql "" "--without-mysql" "for MySQL support" &&
-if is_depends_enabled $SPELL mysql && [[ "${VERSION:0:3}" == "5.3" ]]; then
- config_query PHP5_MYSQLND "Do you want to use the MySQL Native Driver
[mysqlnd]? (experimental)" y &&
-
- if [[ "${PHP5_MYSQLND}" == "y" ]]; then
- PHP5_OPTS="${PHP5_OPTS} --with-mysql=mysqlnd"
- else
- PHP5_OPTS="${PHP5_OPTS} --with-mysql"
- fi
- config_query_option PHP5_OPTS "Do you want to build the MySQLi
extension?" n \
- "--with-mysqli" "--without-mysqli"
-elif is_depends_enabled $SPELL mysql && [[ "${VERSION:0:3}" != "5.3" ]]; then
- PHP5_OPTS="${PHP5_OPTS} --with-mysql"
+# new database madness
+# DB_DRIVERS="mysql mysqli pgsql sqlite sqlite3 firebird unixODBC iODBC"
+# PDO_DRIVERS="mysql pgsql firebird unixODBC iODBC"
+if list_find "$PHP5_DATABASE_DRIVERS" "mysql" || list_find
"$PHP5_DATABASE_DRIVERS" "all"; then
+ depends mysql "" &&
+ if [[ "${VERSION:0:3}" == "5.3" ]]; then
+ config_query PHP5_MYSQLND "Do you want to use the MySQL
Native Driver [mysqlnd]? (expiremental)" n &&
+ if [[ "${PHP5_MYSQLND}" == "y" ]]; then
+ PHP5_OPTS="$PHP5_OPTS --with-mysql=mysqlnd"
+ else
+ PHP5_OPTS="$PHP5_OPTS --with-mysql"
+ fi
+ fi
+else
+ OPTS="$OPTS --without-mysql"
fi &&
-
-optional_depends postgresql \
- "--with-pgsql" "--without-pgsql" \
- "for native Postgresql support" &&
-
-optional_depends sqlite \
- "--with-sqlite3=${INSTALL_ROOT}/usr --enable-sqlite-utf8"
"--without-sqlite" \
- "for SQLite support" &&
-
-if list_find "${PHP5_OPTS}" "--enable-pdo"; then
-
- if is_depends_enabled $SPELL postgresql ; then
- config_query_option PHP5_OPTS "Do you want to build the SQLite PDO
driver?" y \
- "--with-pdo-sqlite=${INSTALL_ROOT}/usr"
"--without-pdo-sqlite"
- fi &&
- optional_depends firebird \
- "--with-pdo-firebird=${INSTALL_ROOT}/opt/firebird"
"--without-pdo-firebird" \
- "for native Firebird support" &&
-
- if is_depends_enabled $SPELL postgresql ; then
- config_query_option PHP5_OPTS "Do you also want to build the PostgreSQL
PDO driver?" n \
- "--with-pdo-pgsql" "--without-pdo-pgsql"
- fi &&
-
- if is_depends_enabled $SPELL mysql ; then
- if [[ "${VERSION:0:3}" == "5.3" ]] && [[ "${PHP5_MYSQLND}" == "y" ]];
then
- config_query_option PHP5_OPTS "Do you also want to build the MySQL
PDO driver?" n \
- "--with-pdo-mysql=mysqlnd" "--without-pdo-mysql"
- else
- config_query_option PHP5_OPTS "Do you also want to build the MySQL
PDO driver?" n \
- "--with-pdo-mysql" "--without-pdo-mysql"
- fi
- fi &&
-
- case $(get_spell_provider $SPELL ODBC-MGR) in
- unixodbc) config_query_option PHP5_OPTS \
- "Do you also want to build the unixODBC PDO driver?"
n \
- "--with-pdo-odbc=unixODBC,${INSTALL_ROOT}/usr" \
- "--without-pdo-odbc" ;;
- libiodbc) config_query_option PHP5_OPTS \
- "Do you also want to build the iODBC PDO driver?" n \
- "--with-pdo-odbc=iODBC,${INSTALL_ROOT}/usr" \
- "--without-pdo-odbc" ;;
- esac
+db_driver_depends "mysqli" "mysql" &&
+db_driver_depends "pgsql" "postgresql" &&
+db_driver_depends "sqlite" "sqlite2" &&
+db_driver_depends "sqlite3" "sqlite" &&
+db_driver_depends "firebird" "firebird" &&
+# unixODBC and iODBC are mutually exclusive... first one in wins?
+if list_find "$PHP5_DATABASE_DRIVERS" "unixODBC" || list_find
"$PHP5_DATABASE_DRIVERS" "all"; then
+ depends unixodbc "--with-unixODBC=${INSTALL_ROOT}/usr --without-iodbc"
+elif list_find "$PHP5_DATABASE_DRIVERS" "iODBC"; then
+ depends unixodbc "--with-iodbc=${INSTALL_ROOT}/usr --without-unixODBC"
+else
+ OPTS="$OPTS --without-iodbc --without-unixODBC"
fi &&
+#ND

+#DBA drivers
if list_find "${PHP5_OPTS}" "--enable-dba"; then
- optional_depends qdbm \
- "--with-qdbm" "--without-qdbm" \
- "qdbm database routines" &&
-
- optional_depends db \
- "--with-db4" "--without-db4" \
- "qdbm database routines" &&
-
- optional_depends gdbm \
- "--with-gdbm" "--without-gdbm" \
- "database routines that use extensive hashing"
+ for foo in $PHP5_DBA_DRIVERS; do
+ # handle the few special cases
+ if [[ "$foo" == "db4" ]]; then
+ depends db "--with-db4"
+ elif [[ "$foo" != "flatfile" ]] && [[ "$foo" != "inifile" ]];
then
+ depends $foo "--with-$foo"
+ fi
+ done
fi &&

optional_depends openldap \
diff --git a/php-pear/php/INSTALL b/php-pear/php/INSTALL
index 58b5fd3..b0a19c9 100755
--- a/php-pear/php/INSTALL
+++ b/php-pear/php/INSTALL
@@ -1,3 +1,7 @@
default_install &&

-install_config_file php.ini-production /etc/php.ini
+if [[ "${VERSION:0:3}" == "5.3" ]]; then
+ install_config_file $SOURCE_DIRECTORY/php.ini-production /etc/php.ini
+else
+ install_config_file $SOURCE_DIRECTORY/php.ini-recommended /etc/php.ini
+fi



  • [SM-Commit] GIT changes to master grimoire by David Kowis (a7ac774c29882dfd51bdff80e58a3dad1db776c2), David Kowis, 09/14/2009

Archive powered by MHonArc 2.6.24.

Top of Page