Update p5-POE-Component-Client-MPD to 2.001

Changelog:
https://metacpan.org/changes/distribution/POE-Component-Client-MPD

OK landry@
This commit is contained in:
cwen 2019-02-28 17:45:26 +00:00
parent df8b6f7479
commit 477a21ff34
5 changed files with 64 additions and 11 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.15 2016/03/20 19:56:06 naddy Exp $
# $OpenBSD: Makefile,v 1.16 2019/02/28 17:45:26 cwen Exp $
COMMENT= complete MPD client library
DISTNAME= POE-Component-Client-MPD-0.9.2
REVISION= 2
DISTNAME= POE-Component-Client-MPD-2.001
CATEGORIES= audio
# perl
@ -12,16 +11,29 @@ PERMIT_PACKAGE_CDROM= Yes
MODULES= cpan
PKG_ARCH= *
MODCPAN_EXAMPLES= Yes
MODCPAN_EXAMPLES_DIST= bin
MODCPAN_EXAMPLES_DIST= examples
RUN_DEPENDS= audio/p5-Audio-MPD-Common>=0.1.4 \
devel/p5-Class-Accessor \
devel/p5-List-MoreUtils \
RUN_DEPENDS= audio/p5-Audio-MPD-Common \
devel/p5-List-AllUtils \
devel/p5-Moose>=0.92 \
devel/p5-MooseX-Has-Sugar \
devel/p5-MooseX-POE \
devel/p5-MooseX-SemiAffordanceAccessor \
devel/p5-MooseX-Types \
devel/p5-POE \
devel/p5-Readonly
devel/p5-Readonly \
devel/p5-Sub-Exporter \
devel/p5-Test-Corpus-Audio-MPD>=1.120990
PORTHOME= ${WRKDIR}
# It would require Pod::Coverage::TrustPod that we don't ship
TEST_ENV += AUTHOR_TESTING=
CONFIGURE_STYLE= modbuild
# Tests need to find mpd.
pre-test:
@ln -sf ${LOCALBASE}/sbin/mpd ${WRKDIR}/bin/mpd
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (POE-Component-Client-MPD-0.9.2.tar.gz) = DSQuIEbyEj0mHiAT/076vWluT7bz4xATmWeN4X1o83c=
SIZE (POE-Component-Client-MPD-0.9.2.tar.gz) = 48482
SHA256 (POE-Component-Client-MPD-2.001.tar.gz) = It51LPe2W8oZrleKPnBXMDbcsn3DphSnmPF74AUQhRY=
SIZE (POE-Component-Client-MPD-2.001.tar.gz) = 40747

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-lib_POE_Component_Client_MPD_Connection_pm,v 1.1 2019/02/28 17:45:26 cwen Exp $
Accounting a change in the MPD protocol
see https://rt.cpan.org/Public/Bug/Display.html?id=122469
Index: lib/POE/Component/Client/MPD/Connection.pm
--- lib/POE/Component/Client/MPD/Connection.pm.orig
+++ lib/POE/Component/Client/MPD/Connection.pm
@@ -217,6 +217,10 @@ sub _got_data {
my ($k,$v) = split /:\s+/, $input, 2;
$k = lc $k;
$k =~ s/-/_/;
+ if ( $k eq 'duration' ) {
+ $k = 'time';
+ $v = int($v + 0.5);
+ }
if ( $k eq 'file' || $k eq 'directory' || $k eq 'playlist' ) {
# build a new amc-item

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-t_40-cmds-kill_t,v 1.1 2019/02/28 17:45:26 cwen Exp $
Hunk #1: Fix "ps: unknown option -- f" by using pgrep(1) instead
Hunk #2: restart test MPD before exiting, see RT#126902
Index: t/40-cmds-kill.t
--- t/40-cmds-kill.t.orig
+++ t/40-cmds-kill.t
@@ -22,8 +22,7 @@ use warnings;
POE::Kernel->delay_set( kill => 0.5 ); # FIXME: use connected event to start tests in pococm-test
}
event check => sub {
- my @procs = grep { /\smpd\s/ } grep { !/grep/ } qx{ ps -ef };
- is( scalar @procs, 0, 'kill shuts down mpd' );
+ isnt( system( "pgrep mpd" ), 0 );
};
event kill => sub {
POE::Kernel->delay_set( check => 1 );
@@ -47,4 +46,5 @@ plan tests => 1;
POE::Component::Client::MPD->spawn;
My::Session->new;
POE::Kernel->run;
+start_test_mpd();
exit;

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/07/13 11:40:25 jasper Exp $
@comment $OpenBSD: PLIST,v 1.2 2019/02/28 17:45:26 cwen Exp $
${P5SITE}/POE/Component/Client/MPD/
${P5SITE}/POE/Component/Client/MPD.pm
${P5SITE}/POE/Component/Client/MPD/Collection.pm
@ -7,6 +7,7 @@ ${P5SITE}/POE/Component/Client/MPD/Connection.pm
${P5SITE}/POE/Component/Client/MPD/Message.pm
${P5SITE}/POE/Component/Client/MPD/Playlist.pm
${P5SITE}/POE/Component/Client/MPD/Test.pm
${P5SITE}/POE/Component/Client/MPD/Types.pm
@man man/man3p/POE::Component::Client::MPD.3p
@man man/man3p/POE::Component::Client::MPD::Collection.3p
@man man/man3p/POE::Component::Client::MPD::Commands.3p
@ -14,5 +15,6 @@ ${P5SITE}/POE/Component/Client/MPD/Test.pm
@man man/man3p/POE::Component::Client::MPD::Message.3p
@man man/man3p/POE::Component::Client::MPD::Playlist.3p
@man man/man3p/POE::Component::Client::MPD::Test.3p
@man man/man3p/POE::Component::Client::MPD::Types.3p
share/examples/p5-POE-Component-Client-MPD/
share/examples/p5-POE-Component-Client-MPD/client.pl