New commits:
commit bdb2e15fd01913e87c667074271f755ba6799247
Author: Arjan Bouter <abouter AT sourcemage.org>
Commit: Arjan Bouter <abouter AT sourcemage.org>
php: moved optional configure options from BUILD and CONFIGURE to
DEPENDS, and remixed DEPENDS to minimize irrelevant questions.
diff --git a/php-pear/php/BUILD b/php-pear/php/BUILD
index 9a453e8..9f7d7c5 100755
--- a/php-pear/php/BUILD
+++ b/php-pear/php/BUILD
@@ -7,19 +7,6 @@ if list_find "${OPTS}" "--enable-cgi" || list_find "${OPTS}"
"--enable-fastcgi";
OPTS="--enable-force-cgi-redirect ${OPTS}"
fi &&
-# Setup SSL IMAP if desired
-if list_find "${OPTS}" "--with-imap=${INSTALL_ROOT}/usr"; then
- # Setup SSL IMAP if desired
- local CCLIENT=$(get_spell_provider $SPELL C-CLIENT) &&
-
- if [[ ! -z "${CCLIENT}" ]]; then
- if is_depends_enabled $CCLIENT openssl; then
- message "${MESSAGE_COLOR}Enabling SSL for the IMAP
extension${DEFAULT_COLOR}" &&
- OPTS="--with-imap-ssl ${OPTS}"
- fi
- fi
-fi &&
-
case "${PHP5_APACHE}" in
handler)
if httpd -v | grep -q "Apache/2\."; then
@@ -36,11 +23,6 @@ case "${PHP5_APACHE}" in
;;
esac &&
-#Check for xorg or xserver and pass location of xpm
-if [ "$PHP5_X11LIBS" == "y" ]; then
- OPTS="$OPTS --with-xpm-dir=/usr"
-fi &&
-
# Check to see if internal GD requested
if [[ "${PHP5_GD}" == "internal" ]]; then
OPTS="--with-gd --enable-gd-native-ttf ${OPTS}"
@@ -48,8 +30,6 @@ fi &&
-if is_depends_enabled $SPELL unixodbc && list_find "${PHP5_OPTS}"
"--enable-pdo"; then
- 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"
-fi &&
+optional_depends ODBC-MGR "" "" "for ODBC support" &&
-optional_depends libiodbc \
- "--with-iodbc" "--without-iodbc" \
- "for ODBC database support" &&
-
-optional_depends postgresql \
- "--with-pgsql" "--without-pgsql" \
- "for native Postgresql support" &&
-
-if is_depends_enabled $SPELL postgresql && list_find "${PHP5_OPTS}"
"--enable-pdo"; then
- config_query_option PHP5_OPTS "Do you also want to build the PostgreSQL
PDO driver?" n \
- "--with-pdo-pgsql" "--without-pdo-pgsql"
-fi &&
-
-optional_depends mysql \
- "" "" \
- "for MySQL 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 &&
@@ -109,64 +125,90 @@ if is_depends_enabled $SPELL mysql && [[
"${VERSION:0:3}" == "5.3" ]]; then
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"
-else
- PHP5_OPTS="${PHP5_OPTS} --without-mysql"
fi &&
-if is_depends_enabled $SPELL mysql && list_find "${PHP5_OPTS}"
"--enable-pdo"; then
- if [[ "${VERSION:0:3}" == "5.3" ]] && [[ "${PHP5_MYSQLND}" == "y" ]];
then
- config_query_option PHP5_OPTS "Do you want to build the MySQLi
extension?" n \
- "--with-mysqli=mysqlnd" "--without-mysqli" &&
+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" &&
- config_query_option PHP5_OPTS "Do you also want to build the MySQL
PDO driver?" n \
- "--with-pdo-mysql=mysqlnd" "--without-pdo-mysql"
+ 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 want to build the MySQLi
extension?" n \
- "--with-mysqli" "--without-mysqli" &&
- config_query_option PHP5_OPTS "Do you also want to build the MySQL
PDO driver?" n \
- "--with-pdo-mysql" "--without-pdo-mysql"
+ 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
fi &&