Re: [gentoo-dev] RFC: remove php4 from depend.php and others

2010-07-10 Thread Petteri Räty
On 07/10/2010 01:22 AM, Matti Bickel wrote:
 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.
 

The standing policy is still not to remove any public functionality from
eclasses. If we decide to start removing functionality the council
should set common rules for it.



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: remove php4 from depend.php and others

2010-07-10 Thread Brian Harring
On Sat, Jul 10, 2010 at 09:30:42AM +0300, Petteri RRRty wrote:
 On 07/10/2010 01:22 AM, Matti Bickel wrote:
  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.
  
 
 The standing policy is still not to remove any public functionality from
 eclasses. If we decide to start removing functionality the council
 should set common rules for it.

Just adding a note on this one- the original technical reason for 
this policy (portage inability to run from just the saved env dump) 
is no longer an issue.

If people want to allow eclasses to have fluid APIs (specifically 
removal of functionality), that's a discussion that needs to start on 
the dev level.

Anyone got strong opinions on this one?
~brian


pgpfuMWOFCFYA.pgp
Description: PGP signature


Re: Allow eclasses to have fluid APIs (was: [gentoo-dev] RFC: remove php4 from depend.php and others)

2010-07-10 Thread Matti Bickel
On 07/10/2010 10:34 AM, Brian Harring wrote:
 If people want to allow eclasses to have fluid APIs (specifically 
 removal of functionality), that's a discussion that needs to start on 
 the dev level.
 
 Anyone got strong opinions on this one?

The argument was presented a long time before: we can't care about
things not in our tree, there might be thousands of twisted ways our
eclasses are used we can't control. If nothing is broken in gentoo-x86,
we as developers should be allowed to make the change. To ensure the
change is indeed not breaking stuff, RFCs to -dev are a requirement.

Everybody who copied and re-used our eclasses should be reading -dev (or
at least -dev-announce), anyway. Not our fault if they run an open
system (as in, I've not nailed all my versions down and use a static
tree) and do not keep up with it.

Now, I'm aware that RFC and implementation periods should depend on the
impact of the change - if I'm proposing to alter eutils, I better wait
some time AFTER a conclusion has been reached, so everybody can adapt.

That 'should' above is intentional - prescribing a fixed time period for
every possible change does not give devs enough flexibility and
implementation time may be a subject during RFC anyway. To continue the
eutils example: if I keep a custom overlay which depends on the removed
functionality, I will speak up and ask you defer the change 14 days so I
can fix my overlay.

Similarly, if somebody still uses the php4 bits in depend.php eclass,
please speak up and allow me to convince you of the php5 ways :-)



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] RFC: remove php4 from depend.php and others

2010-07-09 Thread Matti Bickel
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