From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 18 13:30:02 2009 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 A11E91065672 for ; Wed, 18 Nov 2009 13:30:02 +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 635D78FC0A for ; Wed, 18 Nov 2009 13:30:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAIDU2L5095049 for ; Wed, 18 Nov 2009 13:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nAIDU25L095042; Wed, 18 Nov 2009 13:30:02 GMT (envelope-from gnats) Resent-Date: Wed, 18 Nov 2009 13:30:02 GMT Resent-Message-Id: <200911181330.nAIDU25L095042@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, Christopher Key Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C088E1065676 for ; Wed, 18 Nov 2009 13:28:14 +0000 (UTC) (envelope-from cjk32@cam.ac.uk) Received: from chacal.cjkey.org.uk (chacal.cjkey.org.uk [88.97.163.217]) by mx1.freebsd.org (Postfix) with ESMTP id 2DD118FC1B for ; Wed, 18 Nov 2009 13:28:13 +0000 (UTC) Received: from chacal.wzl33 (localhost [127.0.0.1]) by chacal.cjkey.org.uk (8.14.3/8.14.3) with ESMTP id nAIDSBvd026888 for ; Wed, 18 Nov 2009 13:28:11 GMT (envelope-from chris@chacal.wzl33) Received: (from chris@localhost) by chacal.wzl33 (8.14.3/8.14.3/Submit) id nAIDSB2S026887; Wed, 18 Nov 2009 13:28:11 GMT (envelope-from chris) Message-Id: <200911181328.nAIDSB2S026887@chacal.wzl33> Date: Wed, 18 Nov 2009 13:28:11 GMT From: Christopher Key To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/140662: Changes in p5-Class-XSAccessor-1.05, 1 break squeezeboxserver X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christopher Key List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 13:30:02 -0000 >Number: 140662 >Category: ports >Synopsis: Changes in p5-Class-XSAccessor-1.05,1 break squeezeboxserver >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: Wed Nov 18 13:30:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Christopher Key >Release: FreeBSD 7.2-RELEASE amd64 >Organization: >Environment: System: FreeBSD chacal.wzl33 7.2-RELEASE FreeBSD 7.2-RELEASE #7: Thu May 7 20:03:07 BST 2009 root@chacal.wzl33:/usr/obj/usr/src/sys/CHACAL amd64 >Description: SqueezeboxServer server makes use of Class::XSAccessor::Array if version >= 1.04 is found. Recently, p5-Class-XSAccessor was updated to 1.05,1, meaning that SqueezeboxServer now attempts to use it. However, the internals have changed between versions 1.04 and 1.05, which breaks squeezeboxserver. The attached patch detects which version of Class::XSAccessor is used, and proceeds appropriately. It is possibly overkill, as version 1.04 has never been available via the ports tree, and thus assuming 1.05 semantics would probably be safe. However, some people may have version 1.04 installed from somewhere else, e.g. direct from CPAN, so probably best to be safe. >How-To-Repeat: Update to p5-Class-XSAccessor-1.05,1, then attempt to start squeezeboxserver >Fix: --- patch-class-xsaccessor-1.05 begins here --- Index: Slim/Utils/Accessor.pm =================================================================== --- Slim/Utils/Accessor.pm (revision 29102) +++ Slim/Utils/Accessor.pm (working copy) @@ -98,9 +98,15 @@ if ($type eq 'rw') { if ( hasXS() ) { - Class::XSAccessor::Array::_generate_method( - $class, $field, $n, 0, 0, 'accessor', - ); + if ($Class::XSAccessor::Array::VERSION ge '1.05') { + Class::XSAccessor::Array::_generate_method( + $class, $field, $n, {}, 'accessor', + ); + } else { + Class::XSAccessor::Array::_generate_method( + $class, $field, $n, 0, 0, 'accessor', + ); + } } else { $accessor = sub { @@ -112,9 +118,15 @@ } elsif ($type eq 'ro') { if ( hasXS() ) { - Class::XSAccessor::Array::_generate_method( - $class, $field, $n, 0, 0, 'getter', - ); + if ($Class::XSAccessor::Array::VERSION ge '1.05') { + Class::XSAccessor::Array::_generate_method( + $class, $field, $n, {}, 'getter', + ); + } else { + Class::XSAccessor::Array::_generate_method( + $class, $field, $n, 0, 0, 'getter', + ); + } } else { $accessor = sub { --- patch-class-xsaccessor-1.05 ends here --- >Release-Note: >Audit-Trail: >Unformatted: