mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-perl/Net-FreeDB: C99 fix, use gnudb
freedb.freedb.org -> gnudb.gnudb.org, as freedb is gone. Closes: https://bugs.gentoo.org/883603 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -19,14 +19,19 @@ RDEPEND="
|
||||
dev-perl/Moo
|
||||
>=virtual/perl-libnet-2.120.0
|
||||
"
|
||||
|
||||
BDEPEND="${RDEPEND}
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
virtual/perl-ExtUtils-MakeMaker
|
||||
test? (
|
||||
dev-perl/Test-Most
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.100.0-c99.patch
|
||||
"${FILESDIR}"/${PN}-0.100.0-gnudb.patch
|
||||
)
|
||||
|
||||
src_test() {
|
||||
local my_test_control;
|
||||
my_test_control=${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}
|
||||
69
dev-perl/Net-FreeDB/files/Net-FreeDB-0.100.0-c99.patch
Normal file
69
dev-perl/Net-FreeDB/files/Net-FreeDB-0.100.0-c99.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
https://bugs.gentoo.org/883603
|
||||
https://rt.cpan.org/Public/Bug/Display.html?id=152242
|
||||
|
||||
Description: define read_toc() before using it in discdata get_disc_id()
|
||||
otherwise the build fails with -Werror=implicit-function-declaration
|
||||
Origin: vendor
|
||||
Bug-Debian: https://bugs.debian.org/1065999
|
||||
Author: gregor herrmann <gregoa@debian.org>
|
||||
Last-Update: 2024-03-10
|
||||
|
||||
--- a/lib/linux.h
|
||||
+++ b/lib/linux.h
|
||||
@@ -46,28 +46,6 @@
|
||||
return ((n % 0xff) << 24 | t << 8 | tot_trks);
|
||||
}
|
||||
|
||||
-struct discdata get_disc_id(char* dev)
|
||||
-{
|
||||
- struct discdata data;
|
||||
- int i;
|
||||
-
|
||||
- data.num_of_trks = read_toc(dev);
|
||||
-
|
||||
- if (data.num_of_trks == -1) {
|
||||
- return data;
|
||||
- }
|
||||
-
|
||||
- data.discid = cddb_discid(data.num_of_trks);
|
||||
-
|
||||
- for (i = 0; i < data.num_of_trks; i++) {
|
||||
- data.track_offsets[i] = (cdtoc[i].frame);
|
||||
- }
|
||||
-
|
||||
- data.seconds = (cdtoc[data.num_of_trks].frame)/75;
|
||||
-
|
||||
- return data;
|
||||
-}
|
||||
-
|
||||
int read_toc(char* dev)
|
||||
{
|
||||
int drive, i, status;
|
||||
@@ -151,4 +129,26 @@
|
||||
return tochdr.cdth_trk1;
|
||||
}
|
||||
|
||||
+struct discdata get_disc_id(char* dev)
|
||||
+{
|
||||
+ struct discdata data;
|
||||
+ int i;
|
||||
+
|
||||
+ data.num_of_trks = read_toc(dev);
|
||||
+
|
||||
+ if (data.num_of_trks == -1) {
|
||||
+ return data;
|
||||
+ }
|
||||
+
|
||||
+ data.discid = cddb_discid(data.num_of_trks);
|
||||
+
|
||||
+ for (i = 0; i < data.num_of_trks; i++) {
|
||||
+ data.track_offsets[i] = (cdtoc[i].frame);
|
||||
+ }
|
||||
+
|
||||
+ data.seconds = (cdtoc[data.num_of_trks].frame)/75;
|
||||
+
|
||||
+ return data;
|
||||
+}
|
||||
+
|
||||
#endif //LINUX_H
|
||||
|
||||
52
dev-perl/Net-FreeDB/files/Net-FreeDB-0.100.0-gnudb.patch
Normal file
52
dev-perl/Net-FreeDB/files/Net-FreeDB-0.100.0-gnudb.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
https://rt.cpan.org/Public/Bug/Display.html?id=137752
|
||||
|
||||
Description: replace default host freedb.freedb.org with gnudb.gnudb.org.
|
||||
Also remove reference to inaccessible documentation, and fix the non-online
|
||||
test which checks for the default host.
|
||||
Origin: vendor
|
||||
Bug-Debian: https://bugs.debian.org/991089
|
||||
Author: gregor herrmann <gregoa@debian.org>
|
||||
Last-Update: 2021-07-16
|
||||
|
||||
--- a/FreeDB.pm
|
||||
+++ b/FreeDB.pm
|
||||
@@ -7,7 +7,7 @@
|
||||
use File::Temp;
|
||||
|
||||
has hostname => (is => 'ro', default => $ENV{HOSTNAME} // 'unknown');
|
||||
-has remote_host => (is => 'rw', default => 'freedb.freedb.org');
|
||||
+has remote_host => (is => 'rw', default => 'gnudb.gnudb.org');
|
||||
has remote_port => (is => 'rw', default => 8880);
|
||||
has user => (is => 'rw', default => $ENV{USER} // 'unknown');
|
||||
has timeout => (is => 'rw', default => 120);
|
||||
@@ -449,7 +449,7 @@
|
||||
|
||||
|
||||
new() creates and returns a new Net::FreeDB object that is connected
|
||||
- to either the given host or freedb.freedb.org as default.
|
||||
+ to either the given host or gnudb.gnudb.org as default.
|
||||
|
||||
=item lscat
|
||||
|
||||
@@ -723,10 +723,6 @@
|
||||
giving the correct drive number will return in an
|
||||
accurate return.
|
||||
|
||||
-=head1 Resources
|
||||
- The current version of the CDDB Server Protocol can be
|
||||
- found at: http://ftp.freedb.org/pub/freedb/latest/CDDBPROTO
|
||||
-
|
||||
=head1 AUTHOR
|
||||
David Shultz E<lt>dshultz@cpan.orgE<gt>
|
||||
Peter Pentchev E<lt>roam@ringlet.netE<gt>
|
||||
--- a/t/00-basic.t
|
||||
+++ b/t/00-basic.t
|
||||
@@ -10,7 +10,7 @@
|
||||
ok($freedb->hostname eq 'unknown', 'Error setting hostname');
|
||||
}
|
||||
|
||||
-ok($freedb->remote_host eq 'freedb.freedb.org', 'Error setting default host');
|
||||
+ok($freedb->remote_host eq 'gnudb.gnudb.org', 'Error setting default host');
|
||||
|
||||
ok($freedb->remote_port == 8880, 'Error setting default port');
|
||||
|
||||
Reference in New Issue
Block a user