Hi,
yet another patch from Ole in a bid to rid the php eclasses from some
long forgotten code. The patches should be self-explanatory - just rip
out everything related to dev-php4 :)
Comments welcome.
All the work will go into our overlay (slotting branch:
http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=tree;h=refs/heads/slotting;hb=slotting)
before migration to the tree.
diff --git a/eclass/depend.php.eclass b/eclass/depend.php.eclass
index 681e6dd..c194449 100644
--- a/eclass/depend.php.eclass
+++ b/eclass/depend.php.eclass
@@ -18,57 +18,6 @@
inherit eutils phpconfutils
-# PHP4-only depend functions
-
-# @FUNCTION: need_php4_cli
-# @DESCRIPTION:
-# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP4
-# with cli SAPI.
-need_php4_cli() {
- DEPEND=${DEPEND} =dev-lang/php-4*[cli]
- RDEPEND=${RDEPEND} =dev-lang//php-4*[cli]
- PHP_VERSION=4
-}
-
-# @FUNCTION: need_php4_httpd
-# @DESCRIPTION:
-# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP4
-# with either cgi or apache2 SAPI.
-need_php4_httpd() {
- DEPEND=${DEPEND} =virtual/httpd-php-4*
- RDEPEND=${RDEPEND} =virtual/httpd-php-4*
- PHP_VERSION=4
-}
-
-# @FUNCTION: need_php4
-# @DESCRIPTION:
-# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP4
-# (with any SAPI).
-need_php4() {
- DEPEND=${DEPEND} =dev-lang/php-4*
- RDEPEND=${RDEPEND} =dev-lang/php-4*
- PHP_VERSION=4
- PHP_SHARED_CAT=php4
-}
-
-# common settings go in here
-uses_php4() {
- # cache this
- libdir=$(get_libdir)
-
- PHPIZE=/usr/${libdir}/php4/bin/phpize
- PHPCONFIG=/usr/${libdir}/php4/bin/php-config
- PHPCLI=/usr/${libdir}/php4/bin/php
- PHPCGI=/usr/${libdir}/php4/bin/php-cgi
- PHP_PKG=$(best_version =dev-lang/php-4*)
- PHPPREFIX=/usr/${libdir}/php4
- EXT_DIR=$(${PHPCONFIG} --extension-dir 2/dev/null)
-
- einfo
- einfo Using ${PHP_PKG}
- einfo
-}
-
# PHP5-only depend functions
# @FUNCTION: need_php5_cli
@@ -158,7 +107,6 @@ need_php() {
need_php_by_category() {
case ${CATEGORY} in
dev-php) need_php ;;
- dev-php4) need_php4 ;;
dev-php5) need_php5 ;;
*) die Version of PHP required by packages in category ${CATEGORY} unknown
esac
@@ -174,8 +122,6 @@ has_php() {
# Detect which PHP version we have installed
if has_version '=dev-lang/php-5*' ; then
PHP_VERSION=5
- elif has_version '=dev-lang/php-4*' ; then
- PHP_VERSION=4
else
die Unable to find an installed dev-lang/php package
fi
@@ -396,17 +342,6 @@ has_concurrentmodphp() {
require_pdo() {
has_php
- # Do we have PHP5 installed?
- if [[ ${PHP_VERSION} == 4 ]] ; then
- eerror
- eerror This package requires PDO.
- eerror PDO is only available for PHP 5.
- eerror You must install =dev-lang/php-5.1 with USE=\pdo\.
- eerror pdo USE flags turned on.
- eerror
- die PHP 5 not installed
- fi
-
# Was PHP5 compiled with internal PDO support?
if built_with_use =${PHP_PKG} pdo || phpconfutils_built_with_use =${PHP_PKG} pdo ; then
return
@@ -436,15 +371,6 @@ require_php_cli() {
local PHP_PACKAGE_FOUND=
- # Detect which PHP version we have installed
- if has_version '=dev-lang/php-4*' ; then
- PHP_PACKAGE_FOUND=1
- pkg=$(best_version '=dev-lang/php-4*')
- if built_with_use =${pkg} cli || phpconfutils_built_with_use =${pkg} cli ; then
- PHP_VERSION=4
- fi
- fi
-
if has_version '=dev-lang/php-5*' ; then
PHP_PACKAGE_FOUND=1
pkg=$(best_version '=dev-lang/php-5*')
@@ -480,15 +406,6 @@ require_php_cgi() {
local PHP_PACKAGE_FOUND=
- # Detect which PHP version we have installed
- if has_version '=dev-lang/php-4*' ; then
- PHP_PACKAGE_FOUND=1
- pkg=$(best_version '=dev-lang/php-4*')
- if built_with_use =${pkg} cgi || phpconfutils_built_with_use =${pkg} cgi ; then
- PHP_VERSION=4
- fi
- fi
-
if has_version '=dev-lang/php-5*' ; then
PHP_PACKAGE_FOUND=1
pkg=$(best_version '=dev-lang/php-5*')
@@ -522,13 +439,6 @@ require_sqlite() {
return
fi
- # Do we have pecl-sqlite installed for PHP4?
- if [[ ${PHP_VERSION} == 4 ]] ; then
- if has_version 'dev-php4/pecl-sqlite' ; then
- return
- fi
- fi
-
# If we get here, then we don't have any SQLite support for PHP installed
eerror
eerror No SQLite extension for PHP found.
diff --git a/eclass/php-pear-lib-r1.eclass b/eclass/php-pear-lib-r1.eclass
index 5c58dce..f5fdd7f 100644
--- a/eclass/php-pear-lib-r1.eclass
+++ b/eclass/php-pear-lib-r1.eclass
@@ -33,17 +33,7 @@ php-pear-lib-r1_src_install() {
addpredict /var/lib/net-snmp/
addpredict /session_mm_cli0.sem
- case ${CATEGORY} in
- dev-php)
- if has_version '=dev-lang/php-5*' ; then
-PHP_BIN=/usr/$(get_libdir)/php5/bin/php
- else
-PHP_BIN=/usr/$(get_libdir)/php4/bin/php
- fi ;;
- dev-php4) PHP_BIN=/usr/$(get_libdir)/php4/bin/php ;;
- dev-php5) PHP_BIN=/usr/$(get_libdir)/php5/bin/php ;;
- *) die Version of PHP required by packages in category ${CATEGORY} unknown
- esac
+ PHP_BIN=/usr/$(get_libdir)/php5/bin/php
cd ${S}
diff --git