From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 22 13:30:11 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B6B9106566C for ; Fri, 22 Apr 2011 13:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 505118FC1B for ; Fri, 22 Apr 2011 13:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p3MDUB18088801 for ; Fri, 22 Apr 2011 13:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p3MDUBkh088796; Fri, 22 Apr 2011 13:30:11 GMT (envelope-from gnats) Resent-Date: Fri, 22 Apr 2011 13:30:11 GMT Resent-Message-Id: <201104221330.p3MDUBkh088796@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Rees Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 332CA1065675 for ; Fri, 22 Apr 2011 13:28:03 +0000 (UTC) (envelope-from chris@zeus.bayofrum.net) Received: from mail.skyusermail.com (mail.skyusermail.com [77.240.11.49]) by mx1.freebsd.org (Postfix) with ESMTP id B86D38FC16 for ; Fri, 22 Apr 2011 13:28:02 +0000 (UTC) Received: from Spooler by mail.skyusermail.com (Mercury/32 v4.52) ID MO02F460; 22 Apr 2011 14:28:01 +0100 Received: from spooler by mail.skyusermail.com (Mercury/32 v4.52); 22 Apr 2011 14:27:47 +0100 Received: from zeus.bayofrum.net (90.221.7.100) by mail.skyusermail.com (Mercury/32 v4.52) with ESMTP ID MG02F45F (Using SSL/TLS, 3DES, CBC mode, keysize 192 bits) ; 22 Apr 2011 14:27:44 +0100 Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1]) by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p3MDRAT8027521 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO) for ; Fri, 22 Apr 2011 14:27:10 +0100 (BST) (envelope-from chris@zeus.bayofrum.net) Received: (from crees@localhost) by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p3MDRA61027520; Fri, 22 Apr 2011 14:27:10 +0100 (BST) (envelope-from chris) Message-Id: <201104221327.p3MDRA61027520@zeus.bayofrum.net> Date: Fri, 22 Apr 2011 14:27:10 +0100 (BST) From: Chris Rees To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/156574: [PATCH] Fix port: www/phpmp Remove deprecated PHP clauses & fix for fastcgi X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chris Rees List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 13:30:11 -0000 >Number: 156574 >Category: ports >Synopsis: [PATCH] Fix port: www/phpmp Remove deprecated PHP clauses & fix for fastcgi >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 22 13:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 8.2-RELEASE i386 >Organization: >Environment: System: FreeBSD zeus.bayofrum.net 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Sun Feb 27 22:19:51 UTC 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 >Description: musicpd no longer supports incremental volume, so recent versions give an error when one uses phpmp to change the volume. Also, the use of deprecated variables HTTP_*_VARS plays havoc with fastcgi & lighttpd. Config file should not be clobbered on upgrades etc. >How-To-Repeat: Change the volume using phpmp on recent mpd Try to use phpmp with lighttpd and fastcgi Reinstall with a customised config file >Fix: - Stop clobbering config.php - Fix use of deprecated PHP variables - Disable volume control by default Submitted by: Chris Rees (utisoft_at_gmail.com) --- phpmp-fix-fastcgi.diff begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/www/phpmp/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile 10 Jun 2008 01:23:30 -0000 1.2 +++ Makefile 22 Apr 2011 13:02:23 -0000 @@ -7,7 +7,7 @@ PORTNAME= phpmp PORTVERSION= 0.11.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= http://mercury.chem.pitt.edu/~shank/ DISTNAME= phpMp-${PORTVERSION} @@ -21,10 +21,27 @@ PHPMP?= www/phpmp PLIST_SUB+= PHPMP=${PHPMP} +post-patch: +# Replace deprecated HTTP_(GET|POST)_VARS with _(GET|POST) + @${REINPLACE_CMD} -e 's#HTTP\(_[^_]*\)_VARS#\1#' \ + ${WRKSRC}/playlist.php ${WRKSRC}/main_body.php +# Stop clobbering config.php & disable volume control by default; +# incremental volume changes no longer supported by musicpd + @${MV} ${WRKSRC}/config.php ${WRKSRC}/config.php.sample + @${REINPLACE_CMD} -e 's/^\(.display_volume[^"]*"\)yes/\1no/' \ + ${WRKSRC}/config.php.sample + @${RM} ${WRKSRC}/*.bak + do-install: @${MKDIR} ${PREFIX}/${PHPMP} @${CP} -R ${WRKSRC}/ ${PREFIX}/${PHPMP} @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPMP} @${CHMOD} -R 755 ${PREFIX}/${PHPMP} +post-install: + @if [ ! -f ${PREFIX}/${PHPMP}/config.php ]; then \ + ${CP} -p ${PREFIX}/${PHPMP}/config.php.sample \ + ${PREFIX}/${PHPMP}/config.php ; \ + fi + .include Index: pkg-plist =================================================================== RCS file: /exports/cvsroot-freebsd/ports/www/phpmp/pkg-plist,v retrieving revision 1.1 diff -u -r1.1 pkg-plist --- pkg-plist 27 Feb 2007 03:45:35 -0000 1.1 +++ pkg-plist 22 Apr 2011 13:02:23 -0000 @@ -3,7 +3,9 @@ %%PHPMP%%/INSTALL %%PHPMP%%/README %%PHPMP%%/TODO -%%PHPMP%%/config.php +@unexec if cmp -s %D/%%PHPMP%%/config.php.sample %D/%%PHPMP%%/config.php; then rm -f %D/%%PHPMP%%/config.php; fi +%%PHPMP%%/config.php.sample +@exec if [ ! -f %D/%%PHPMP%%/config.php ] ; then cp -p %D/%F %B/config.php; fi %%PHPMP%%/find.php %%PHPMP%%/find_body.php %%PHPMP%%/index.php --- phpmp-fix-fastcgi.diff ends here --- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. >Release-Note: >Audit-Trail: >Unformatted: