Bug 102033 - Horde 3.1.2 fails portbuild
Summary: Horde 3.1.2 fails portbuild
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Shaun Amott
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 22:00 UTC by Chris Wasser
Modified: 2006-08-15 02:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Wasser 2006-08-14 22:00:25 UTC
ports/www/horde fails to install correctly due to DB check problem located in the port Makefile.

# php -v
PHP 4.4.3 (cli) (built: Aug  9 2006 14:59:20)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with eAccelerator v0.9.5-rc1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
# php -m
[PHP Modules]
bz2
calendar
ctype
curl
dio
domxml
eAccelerator
fileinfo
ftp
gd
gettext
gmp
iconv
imagick
imap
ldap
mbstring
mcal
mcrypt
mhash
mysql
openssl
overload
pcre
pdf
posix
pspell
session
shmop
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
zlib

[Zend Modules]
eAccelerator



The following error is generated during the build and easily reproduced:

Please configure PHP with a database support.
MySQL, PostgreSQL, SQLite and Sybase (CTLIB or DBLIB)
can be used with PHP AND Horde.

(If everything will run on this machine, do not
 forget to install the database server-side!)

*** Error code 1
Stop in /mnt/disk0/usr.ports/www/horde.
*** Error code 1
Stop in /mnt/disk0/usr.ports/www/horde.



The problem lies in how the build process checks for supported DB's via php and can be easily produced at the commandline:

# php -m | grep -e "mysql"
--snip--
<shows all php modules>
--snip--
Exit 1
# php -m 2>&1 | grep -e "mysql"
mysql

Fix: Below contains a diff correcting the issue. I was able to successfully build the port and install it afterwards. There may be a better way to do this.



pre-install:
 .if !defined(WITHOUT_SUPPORTED_DB) && exists(${LOCALBASE}/bin/php)
-       @if ! php -m | ${GREP} -q -e "mysql" ; then \
-        if ! php -m | ${GREP} -q -e "pgsql" ; then \
-         if ! php -m | ${GREP} -q -e "sybase" ; then \
-          if ! php -m | ${GREP} -q -e "SQLite" ; then \
+       @if ! php -m 2>&1 | ${GREP} -q -e "mysql" ; then \
+        if ! php -m 2>&1 | ${GREP} -q -e "pgsql" ; then \
+         if ! php -m 2>&1 | ${GREP} -q -e "sybase" ; then \
+          if ! php -m 2>&1 | ${GREP} -q -e "SQLite" ; then \
            ${ECHO_MSG} "" ; \
            ${ECHO_MSG} "Please configure PHP with a database support." ; \
            ${ECHO_MSG} "MySQL, PostgreSQL, SQLite and Sybase (CTLIB or DBLIB)" ; \--mfFm9wi4xkn9mM7T48rqjf9TqBHBmRb5xBJPPVnYru7uC3LW
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig Wed Aug  2 22:38:03 2006
+++ Makefile    Mon Aug 14 14:44:59 2006
@@ -312,10 +312,10 @@
How-To-Repeat: Build the port whether by hand or using portupgrade(1)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-08-14 23:38:42 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2006-08-14 23:38:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->shaun

Over to maintainer
Comment 3 Shaun Amott freebsd_committer freebsd_triage 2006-08-15 02:09:38 UTC
State Changed
From-To: open->closed

Fix committed, thanks!