Subject: pkg/33214: www/horde3 should compile with php5
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <eggert@macvaerk.dtu.dk>
List: pkgsrc-bugs
Date: 04/07/2006 15:00:00
>Number:         33214
>Category:       pkg
>Synopsis:       Should have horde3 compile with both php4 and php5
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 07 15:00:00 +0000 2006
>Originator:     Daniel Eggert <eggert@macvaerk.dtu.dk>
>Release:        NetBSD 3.0
>Organization:
Macvaerk, DTU
>Environment:
System: NetBSD kelvin.macvaerk.dtu.dk 3.0_RC6 NetBSD 3.0_RC6 (MACMINI) #4: Tue Dec 13 16:43:10 UTC 2005 eggert@kelvin.macvaerk.dtu.dk:/usr/obj/sys/arch/macppc/compile/MACMINI macppc
Architecture: powerpc
Machine: macppc
>Description:
www/horde3 currently only build with php4 (not php5) since it has a dependency
towards textproc/php4-domxml but if this dependency was replaced with
textproc/php5-dom is would build with php5 (but not php4).

>How-To-Repeat:

Build lang/php5, then build www/horde3

This will currently build www/horde3 with php4, not php5.

>Fix:

A patch like this would most likely fix this:

--- Makefile.orig       2006-04-07 16:51:51.000000000 +0200
+++ Makefile    2006-04-07 16:56:32.000000000 +0200
@@ -10,6 +10,8 @@
 
 CONFLICTS+=    horde-2.*
 
+.include "../../lang/php/phpversion.mk"
+
 DEPENDS+=      php-gettext>=4.3.3:../../devel/php-gettext
 DEPENDS+=      php-mcrypt>=4.3.3:../../security/php-mcrypt
 DEPENDS+=      php-iconv>=4.3.3:../../converters/php-iconv
@@ -18,7 +20,11 @@
 DEPENDS+=      pear-Mail_Mime-[0-9]*:../../mail/pear-Mail_Mime
 DEPENDS+=      pear-DB-[0-9]*:../../databases/pear-DB
 DEPENDS+=      ap-php>=4.3.3:../../www/ap-php
+.if ${_PHP_VERSION} == "4"
 DEPENDS+=      php-domxml>=4.3.3:../../textproc/php4-domxml
+.elif ${_PHP_VERSION} == "5"
+DEPENDS+=      php-dom>=5:../../textproc/php5-dom
+.endif
 DEPENDS+=      php-zlib>=4.3.3:../../archivers/php-zlib
 
 .include "../../mk/bsd.prefs.mk"