commit:     576cc123384851c15a02d99bd9a964bc81ee226f
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sat Jun 20 18:27:55 2015 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Sat Jun 20 18:27:55 2015 +0000
URL:        https://gitweb.gentoo.org/proj/perl-overlay.git/commit/?id=576cc123

[bump] Audio-MPD-2.0.0, remove old

Package-Manager: portage-2.2.17

 dev-perl/Audio-MPD/Audio-MPD-1.120.610-r1.ebuild | 76 ------------------------
 dev-perl/Audio-MPD/Audio-MPD-2.0.0.ebuild        | 50 ++++++++++++++++
 dev-perl/Audio-MPD/files/2.000/mpd_019.patch     | 32 ++++++++++
 3 files changed, 82 insertions(+), 76 deletions(-)

diff --git a/dev-perl/Audio-MPD/Audio-MPD-1.120.610-r1.ebuild 
b/dev-perl/Audio-MPD/Audio-MPD-1.120.610-r1.ebuild
deleted file mode 100644
index 214032f..0000000
--- a/dev-perl/Audio-MPD/Audio-MPD-1.120.610-r1.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-EAPI=5
-MODULE_AUTHOR=JQUELIN
-MODULE_VERSION=1.120610
-inherit perl-module
-
-DESCRIPTION='class to talk to MPD (Music Player Daemon) servers'
-RESTRICT=test
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-perl_meta_configure() {
-       # Module::Build 0.3601 ( 0.360.100 )
-       echo \>=dev-perl/Module-Build-0.36.01
-}
-perl_meta_build() {
-       # Module::Build 0.3601 ( 0.360.100 )
-       echo \>=dev-perl/Module-Build-0.36.01
-}
-perl_meta_runtime() {
-       # Audio::MPD::Common::Item
-       echo dev-perl/Audio-MPD-Common
-       # Audio::MPD::Common::Output
-       echo dev-perl/Audio-MPD-Common
-       # Audio::MPD::Common::Stats
-       echo dev-perl/Audio-MPD-Common
-       # Audio::MPD::Common::Status
-       echo dev-perl/Audio-MPD-Common
-       # DB_File
-       echo virtual/perl-DB_File
-       # Encode
-       echo virtual/perl-Encode
-       # Getopt::Euclid
-       echo dev-perl/Getopt-Euclid
-       # IO::Socket::IP
-       echo virtual/perl-IO-Socket-IP
-       # Moose
-       echo dev-perl/Moose
-       # Moose::Util::TypeConstraints
-       echo dev-perl/Moose
-       # MooseX::Has::Sugar
-       echo dev-perl/MooseX-Has-Sugar
-       # MooseX::SemiAffordanceAccessor
-       echo dev-perl/MooseX-SemiAffordanceAccessor
-       # Proc::Daemon
-       echo dev-perl/Proc-Daemon
-       # Time::HiRes
-       echo virtual/perl-Time-HiRes
-       # perl 5.010 ( 5.10.0 )
-       echo \>=dev-lang/perl-5.10.0
-       # strict
-       echo dev-lang/perl
-       # warnings
-       echo dev-lang/perl
-}
-perl_meta_test() {
-       # File::Find
-       echo dev-lang/perl
-       # File::Temp
-       echo virtual/perl-File-Temp
-       # Test::Corpus::Audio::MPD 1.113282 ( 1.113.282 )
-       echo \>=dev-perl/Test-Corpus-Audio-MPD-1.113.282
-       # Test::More 0.88 ( 0.880.0 )
-       echo \>=virtual/perl-Test-Simple-0.88
-}
-DEPEND="
-       $(perl_meta_configure)
-       $(perl_meta_build)
-       $(perl_meta_runtime)
-       test? ( $(perl_meta_test) )
-"
-RDEPEND="
-       $(perl_meta_runtime)
-"

diff --git a/dev-perl/Audio-MPD/Audio-MPD-2.0.0.ebuild 
b/dev-perl/Audio-MPD/Audio-MPD-2.0.0.ebuild
new file mode 100644
index 0000000..b79259f
--- /dev/null
+++ b/dev-perl/Audio-MPD/Audio-MPD-2.0.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+EAPI=5
+MODULE_AUTHOR=JQUELIN
+MODULE_VERSION=2.000
+inherit perl-module
+
+DESCRIPTION='class to talk to MPD (Music Player Daemon) servers'
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+PERL_RESTRICT="parallel-test"
+PATCHES=(
+       "${FILESDIR}/${MODULE_VERSION}/mpd_019.patch"
+)
+RDEPEND="
+       dev-perl/Audio-MPD-Common
+       virtual/perl-DB_File
+       virtual/perl-Encode
+       dev-perl/Getopt-Euclid
+       virtual/perl-IO-Socket-IP
+       dev-perl/Moose
+       dev-perl/MooseX-Has-Sugar
+       dev-perl/MooseX-SemiAffordanceAccessor
+       dev-perl/Proc-Daemon
+       virtual/perl-Time-HiRes
+"
+DEPEND="
+       ${RDEPEND}
+       >=dev-perl/Module-Build-0.36.01
+       test? (
+               virtual/perl-File-Spec
+               virtual/perl-IO
+               dev-perl/List-AllUtils
+               >=dev-perl/Test-Corpus-Audio-MPD-1.113.282
+               >=virtual/perl-Test-Simple-0.880.0
+               >=media-sound/mpd-0.19.0
+       )
+"
+src_test() {
+       if has_version "media-sound/mpd[tcpd]"; then
+               ewarn "media-sound/mpd built with USE=tcpd can be expected to 
cause tests" \
+                         "to fail due to the client not being able to access 
the test server."
+               ewarn "Tests are subsequently skipped."
+               ewarn "See 
https://rt.cpan.org/Ticket/Display.html?id=73035#txn-1510053";
+               return;
+       fi
+       perl-module_src_test
+}

diff --git a/dev-perl/Audio-MPD/files/2.000/mpd_019.patch 
b/dev-perl/Audio-MPD/files/2.000/mpd_019.patch
new file mode 100644
index 0000000..bcb2597
--- /dev/null
+++ b/dev-perl/Audio-MPD/files/2.000/mpd_019.patch
@@ -0,0 +1,32 @@
+Description: Adjust test to mpd >= 0.19
+ Test::Corpus::Audio::MPD contains 5 tracks just over 1.8 seconds each.
+ mpd < 0.19 rounded each track up to 2 seconds then added the lengths
+ in seconds to get 10s, but mpd >= 0.19 adds up the lengths in ms and then
+ rounds it down to 9s.
+Bug-Debian: https://bugs.debian.org/768692
+Origin: vendor
+Author: Simon McVittie <[email protected]>
+Reviewed-by: gregor herrmann <[email protected]>
+Last-Update: 2014-11-12
+
+--- a/t/24-info.t
++++ b/t/24-info.t
+@@ -18,7 +18,7 @@
+ eval 'use Test::Corpus::Audio::MPD';
+ plan skip_all => $@ if $@ =~ s/\n+Compilation failed.*//s;
+ 
+-plan tests => 16;
++plan tests => 17;
+ my $mpd = Audio::MPD->new;
+ my $song;
+ 
+@@ -34,7 +34,8 @@
+ is( $stats->albums,       1, 'one album in the database' );
+ is( $stats->songs,        5, '5 songs in the database' );
+ is( $stats->playtime,     0, 'already played 0 seconds' );
+-is( $stats->db_playtime, 10, '10 seconds worth of music in the db' );
++cmp_ok( $stats->db_playtime, '>=', 9, '>= 9 seconds worth of music in the db' 
);
++cmp_ok( $stats->db_playtime, '<=', 10, '<= 10 seconds worth of music in the 
db' );
+ isnt( $stats->uptime, undef, 'uptime is defined' );
+ isnt( $stats->db_update,  0, 'database has been updated' );
+ 

Reply via email to