Bug 217318

Summary: www/piwigo build error with php70
Product: Ports & Packages Reporter: Marko Cupać <marko.cupac>
Component: Individual Port(s)Assignee: Torsten Zuehlsdorff <tz>
Status: Closed FIXED    
Severity: Affects Some People CC: tremere, tz
Priority: --- Flags: tremere: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
piwigo poudriere log
none
Patch proposal for PHP 7 fix none

Description Marko Cupać 2017-02-24 09:15:57 UTC
Created attachment 180255 [details]
piwigo poudriere log

Hi,

I am trying to build piwigo in poudriere with default version of php changed to php70, but I get an error (poudriere log attached).

Regards,
Comment 1 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-02-24 09:23:10 UTC
Created attachment 180256 [details]
Patch proposal for PHP 7 fix

Hello Marko,

after a short look at the Makefile, i noticed that there is a dependency to "mysql" AND "mysqli".
The "mysql" module was dropped in PHP 7 so therefore the build-error. Since "mysql" was already deprecated in PHP 5.6 and the user is advised to choose between "mysql" and "mysqli" i think its save to remove "mysql". 

I attached a patch. Please check if it builds now and if it still works with PHP 5.6

Greetings,
Torsten
Comment 2 Marko Cupać 2017-02-24 10:28:09 UTC
(In reply to Torsten Zuehlsdorff from comment #1)
Hi Torsten,

thank you for the tip, after removing 'mysql' from USE_PHP (ie. applying your patch), I have successfully built and installed piwigo.

Unfortunately I don't have php56 environment at the moment so I can't test whether this broke things for php56.

Best regards,
Comment 3 Ralf van der Enden 2017-02-27 13:12:47 UTC
Looks good.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-03-14 11:43:30 UTC
A commit references this bug:

Author: tz
Date: Tue Mar 14 11:43:01 UTC 2017
New revision: 436148
URL: https://svnweb.freebsd.org/changeset/ports/436148

Log:
  www/piwigo: Fix build error with php70

  This is done by removing the obsoleted mysql module from USE_PHP,
  especially since its replacement mysqli is already in it.

  PR:           217318
  Submitted by: tz
  Reported by:  Marko Cupa? <marko.cupac@mimar.rs>
  Reviewed by:  Marko Cupa? <marko.cupac@mimar.rs>
  Approved by:  Ralf van der Enden (maintainer)

Changes:
  head/www/piwigo/Makefile
Comment 5 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-03-14 11:44:03 UTC
Committed, thanks! :)