New commits:
commit 1742c9838d7e96d3730510b04a06931acd996df2
Author: Elisamuel Resto <ryuji AT sourcemage.org>
Commit: Elisamuel Resto <ryuji AT sourcemage.org>
php-pear/php: major spell rework from the aparent copy from the old php
spell (now php4)
- CONFLICTS: removed padding
- DETAILS: PATCHLEVEL++
- BUILD, PRE_BUILD, DEPENDS, CONFIGURE, PREPARE: removed padding,
hackish and outdated options and depends, and added more options,
improved and changed logic and ditched the ./configure line for
default_build after integrating the leftover forced switches to $OPTS
- INSTALL, {PRE,POST}_REMOVE: formatting, removed padding
- TRIGGERS: as per Jaka's suggestion, use show_up_depends
-#
-# Setup SSL IMAP if wanted
-#
-if echo $OPTS | grep -q -- --with-imap; then
- if spell_ok openssl; then
- OPTS="$OPTS --with-imap-ssl"
- fi
-fi &&
+# If the CGI or FastCGI SAPI (or both) are selected, enable
'force-cgi-redirect'
+if list_find "${OPTS}" "--enable-cgi" || list_find "${OPTS}"
"--enable-fastcgi"; then
+ message "${MESSAGE_COLOR}CGI or FastCGI SAPI enabled, enabling
force-cgi-redirect${DEFAULT_COLOR}" &&
+ OPTS="--enable-force-cgi-redirect ${OPTS}"
+fi &&
-case "$PHP4_APACHE" in
- handler)
- if httpd -v | grep -q "Apache/2\."; then
- message "${MESSAGE_COLOR}Configuring for Apache 2.x${DEFAULT_COLOR}"
&&
- OPTS="$OPTS --with-apxs2"
- else
- message "${MESSAGE_COLOR}Configuring for Apache 1.x${DEFAULT_COLOR}"
&&
- OPTS="$OPTS --with-apxs"
+# Setup SSL IMAP if desired
+if list_find "${OPTS}" "--with-imap"; 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
+ message "${MESSAGE_COLOR}Configuring for Apache
2.x${DEFAULT_COLOR}" &&
+ OPTS="--with-apxs2 ${OPTS}"
+ else
+ message "${MESSAGE_COLOR}Configuring for Apache
1.x${DEFAULT_COLOR}" &&
+ OPTS="--with-apxs ${OPTS}"
+ fi
;;
- filter)
- OPTS="$OPTS --with-apxs2filter"
+
+ filter)
+ OPTS="--with-apxs2filter ${OPTS}"
;;
-esac &&
+esac &&
-#Check for xorg or xserver and pass location of xpm
-if [ "$PHP5_X11LIBS" == "y" ]; then
- if check_if_xorg_modular_libs; then
- OPTS="$OPTS --with-xpm-dir=/usr"
- else
- OPTS="$OPTS --with-xpm-dir=/usr/X11R6/lib"
- fi
+# Check for xorg or xserver and pass location of xpm
+if [[ "${PHP5_X11LIBS}" == "y" ]]; then
+ if check_if_xorg_modular_libs; then
+ OPTS="--with-xpm-dir=${INSTALL_ROOT}/usr ${OPTS}"
+ else
+ OPTS="--with-xpm-dir=${INSTALL_ROOT}/usr/X11R6/lib ${OPTS}"
+ fi
fi &&
-#check to see if internal GD requested
-if [ "$PHP5_GD" == "internal" ]; then
- OPTS="--with-gd --enable-gd-native-ttf $OPTS"
+# Check to see if internal GD requested
+if [[ "${PHP5_GD}" == "internal" ]]; then
+ OPTS="--with-gd --enable-gd-native-ttf ${OPTS}"
fi &&
-config_query_option PHP4_PCNTL "Enable experimental pcntl support
(CLI/CGI only)" n \
- "--enable-pcntl" \
- "--disable-pcntl" &&
+config_query_option PHP5_OPTS "Enable perl regular expressions?" y \
+ "--with-pcre-regex" "--without-pcre-regex" &&
-# needs --enable-force-cgi-redirect in BUILD
-config_query_option PHP4_FCGI 'Enable FastCGI module?' y \
- '--enable-fastcgi' \
- '--disable-fastcgi' &&
+config_query_option PHP5_OPTS "Enable pcntl support (CLI/CGI only)" n \
+ "--enable-pcntl" "--disable-pcntl" &&
-config_query_option PHP5_MBSTRING "Enable multibyte support?" n \
- "--enable-mbstring" \
- "--disable-mbstring" &&
+message "${MESSAGE_COLOR}Both FastCGI and CGI can be enabled at the same
time${DEFAULT_COLOR}" &&
-config_query PHP5_X11LIBS "Would you like to use libxpm? (Requires
X11-libs)" n &&
+config_query_option PHP5_OPTS "Enable CGI SAPI?" y \
+ "--enable-cgi" "--disable-cgi" &&
-config_query_list PHP5_GD "Which GD library to use?" \
- none internal external
+config_query_option PHP5_OPTS "Enable multibyte support?" n \
+ "--enable-mbstring" "--disable-mbstring" &&
+
+config_query_option PHP5_OPTS "Enable the PDO driver?" y \
+ "--enable-pdo" "--disable-pdo" &&
+
+config_query_option PHP5_OPTS "Enable shmop support?" n \
+ "--enable-shmop" "--disable-shmop" &&
+
+config_query_option PHP5_OPTS "Enable System V message queues support?" n \
+ "--enable-sysvmsg" "--disable-sysvmsg" &&
+
+config_query_option PHP5_OPTS "Enable System V semaphore support?" n \
+ "--enable-sysvsem" "--disable-sysvsem" &&
+
+config_query_option PHP5_OPTS "Enable System V shared memory support?" n \
+ "--enable-sysvshm" "--disable-sysvshm" &&
+
+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 &&
+
+if [[ "${PHP5_GD}" != "none" ]]; then
+ config_query PHP5_X11LIBS "Would you like to support XPM image files?
(requires: X11-LIBS)" n
+fi
diff --git a/php-pear/php/CONFLICTS b/php-pear/php/CONFLICTS
index 52b56f4..a51827b 100755
--- a/php-pear/php/CONFLICTS
+++ b/php-pear/php/CONFLICTS
@@ -1,2 +1,2 @@
-conflicts php-dev &&
-conflicts php4
+conflicts php-dev &&
+conflicts php4
diff --git a/php-pear/php/DEPENDS b/php-pear/php/DEPENDS
index e013903..735c34f 100755
--- a/php-pear/php/DEPENDS
+++ b/php-pear/php/DEPENDS
@@ -1,159 +1,172 @@
-source $GRIMOIRE/FUNCTIONS &&
+. "${GRIMOIRE}/FUNCTIONS" &&
-# Officially ZLib is optional, but we require it because some other
-# optional extensions depend on it, and it"s omnipresent anyway.
-depends zlib "--with-zlib --with-zlib-dir=/usr" &&
+# 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" &&
+depends zlib "--with-zlib" &&
-# This is required since PHP 5
-depends libxml2 '--enable-xml --with-dom --with-xmlrpc' &&
+# This is required since PHP5
+depends libxml2 "--enable-xml --with-dom --with-xmlrpc" &&
-if [ "$PHP5_GD" == "external" ]; then
- depends gd "--with-gd=/usr --enable-gd-native-ttf"
+if is_depends_enabled $SPELL curl; then
+ config_query_option PHP5_OPTS "Do you want to use cURL for URL streams
in core PHP functions?" n \
+ "--with-curlwrappers" "--without-curlwrappers"
fi &&
SOURCE_HASH=sha512:c9cfb6dc128e7bcbcd16d45b13f8b9145eda03bb112140718d371f5cc8dc667ec80d100d00759035f282586e40502dbd86effddb4bd8b11220072ef60d4620ec
@@ -12,7 +12,8 @@ else
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_URL[0]=http://static.php.net/www.php.net/distributions/$SOURCE
fi
-if [[ $PHP_SUHOSIN == y ]]; then
+
+if [[ "${PHP5_SUHOSIN}" == "y" ]]; then
VERSION2=0.9.6.2
SOURCE2=suhosin-patch-$VERSION-$VERSION2.patch.gz
SOURCE2_URL="http://download.suhosin.org/$SOURCE2"
@@ -20,7 +21,9 @@ if [[ $PHP_SUHOSIN == y ]]; then
SOURCE3_URL="http://download.suhosin.org/$SOURCE3"
SOURCE2_GPG="$SOURCE3:suhosin.gpg:UPSTREAM_KEY"
fi
+
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+ PATCHLEVEL=1
WEB_SITE=http://www.php.net/
ENTERED=20011024
LICENSE[0]=http://www.php.net/license/3_0.txt
diff --git a/php-pear/php/HISTORY b/php-pear/php/HISTORY
index ebad5f1..e13cba6 100644
--- a/php-pear/php/HISTORY
+++ b/php-pear/php/HISTORY
@@ -1,4 +1,14 @@
2008-08-13 Elisamuel Resto <ryuji AT sourcemage.org>
+ * CONFLICTS: removed padding
+ * DETAILS: PATCHLEVEL++
+ * BUILD, PRE_BUILD, DEPENDS, CONFIGURE, PREPARE: removed padding,
+ hackish and outdated options and depends, and added more options,
+ improved and changed logic and ditched the ./configure line for
+ default_build after integrating the leftover forced switches to
$OPTS
+ * INSTALL, {PRE,POST}_REMOVE: formatting, removed padding
+ * TRIGGERS: as per Jaka's suggestion, use show_up_depends
+
+2008-08-13 Elisamuel Resto <ryuji AT sourcemage.org>
* DETAILS: updated the RC to 5.3.0alpha1
2008-05-03 Elisamuel Resto <ryuji AT sourcemage.org>
diff --git a/php-pear/php/INSTALL b/php-pear/php/INSTALL
index 71c8fec..567f8b6 100755
--- a/php-pear/php/INSTALL
+++ b/php-pear/php/INSTALL
@@ -1,3 +1,3 @@
-default_install &&
+default_install &&
install_config_file php.ini-dist /etc/php.ini
diff --git a/php-pear/php/POST_REMOVE b/php-pear/php/POST_REMOVE
index a9a4b6d..9267ad0 100755
--- a/php-pear/php/POST_REMOVE
+++ b/php-pear/php/POST_REMOVE
@@ -1,23 +1,26 @@
-if [ -f /etc/httpd/httpd.conf.sorcerybackup ]
-then
- mv /etc/httpd/httpd.conf.sorcerybackup \
- /etc/httpd/httpd.conf
-fi &&
+## TODO
+# How about we print a warning instead of doing this fugly voodoo?