Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/cdstatus/, media-sound/cdstatus/files/
Date: Sat, 08 Aug 2020 16:55:44
Message-Id: 1596905607.ce04ab9734ce79dc4d360450a91ed6c6a15b4ba1.soap@gentoo
1 commit: ce04ab9734ce79dc4d360450a91ed6c6a15b4ba1
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 8 16:53:27 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 8 16:53:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce04ab97
7
8 media-sound/cdstatus: Fix building under -fno-common
9
10 Closes: https://bugs.gentoo.org/706718
11 Package-Manager: Portage-3.0.1, Repoman-2.3.23
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 media-sound/cdstatus/cdstatus-0.97.03.ebuild | 8 ++-
15 .../files/cdstatus-0.97.03-fno-common.patch | 73 ++++++++++++++++++++++
16 .../cdstatus-0.97.03-respect-user-CFLAGS.patch | 11 ++++
17 3 files changed, 90 insertions(+), 2 deletions(-)
18
19 diff --git a/media-sound/cdstatus/cdstatus-0.97.03.ebuild b/media-sound/cdstatus/cdstatus-0.97.03.ebuild
20 index e4ae820f71f..5d7d361d54a 100644
21 --- a/media-sound/cdstatus/cdstatus-0.97.03.ebuild
22 +++ b/media-sound/cdstatus/cdstatus-0.97.03.ebuild
23 @@ -1,4 +1,4 @@
24 -# Copyright 1999-2019 Gentoo Authors
25 +# Copyright 1999-2020 Gentoo Authors
26 # Distributed under the terms of the GNU General Public License v2
27
28 EAPI=7
29 @@ -10,7 +10,11 @@ SRC_URI="mirror://sourceforge/cdstatus/${P}.tar.gz"
30 LICENSE="GPL-2"
31 SLOT="0"
32 KEYWORDS="~amd64 ~ppc ppc64 x86"
33 -IUSE=""
34 +
35 +PATCHES=(
36 + "${FILESDIR}"/${PN}-0.97.03-respect-user-CFLAGS.patch
37 + "${FILESDIR}"/${PN}-0.97.03-fno-common.patch
38 +)
39
40 pkg_postinst() {
41 elog "Copy cdstatus.cfg from /usr/share/cdstatus.cfg"
42
43 diff --git a/media-sound/cdstatus/files/cdstatus-0.97.03-fno-common.patch b/media-sound/cdstatus/files/cdstatus-0.97.03-fno-common.patch
44 new file mode 100644
45 index 00000000000..588a0e33384
46 --- /dev/null
47 +++ b/media-sound/cdstatus/files/cdstatus-0.97.03-fno-common.patch
48 @@ -0,0 +1,73 @@
49 +--- a/src/cdstatus_cddb.c
50 ++++ b/src/cdstatus_cddb.c
51 +@@ -31,6 +31,12 @@
52 + #define DIE_CLEAN if(buffer) { free(buffer); } if(scratchbuffer) { free(scratchbuffer); } exit(EXIT_FAILURE);
53 + #endif
54 +
55 ++char album_name[256];
56 ++int album_year;
57 ++char artist_name[256];
58 ++char album_genre[128];
59 ++track_listing trackinfo[100];
60 ++unsigned int cddb_tracks;
61 +
62 + /** The system-provided error return code for system calls */
63 + extern int errno;
64 +--- a/src/cdstatus_cddb.h
65 ++++ b/src/cdstatus_cddb.h
66 +@@ -24,21 +24,21 @@
67 +
68 + /* Exported Globals (I hate globals, need to find another way to do this... */
69 + /** Holds album name for cd */
70 +-char album_name[256];
71 ++extern char album_name[256];
72 +
73 + /** Holds album year for cd */
74 +-int album_year;
75 ++extern int album_year;
76 +
77 + /** Holds artist name for cd */
78 +-char artist_name[256];
79 ++extern char artist_name[256];
80 +
81 + /** Holds album genre for cd */
82 +-char album_genre[128];
83 ++extern char album_genre[128];
84 +
85 + /** Holds cddb info for each track */
86 +-track_listing trackinfo[100];
87 ++extern track_listing trackinfo[100];
88 +
89 + /** Number of tracks for which we have info */
90 +-unsigned int cddb_tracks;
91 ++extern unsigned int cddb_tracks;
92 +
93 + #endif
94 +--- a/src/cdstatus_output.c
95 ++++ b/src/cdstatus_output.c
96 +@@ -4,6 +4,10 @@
97 +
98 + #include "cdstatus_output.h"
99 +
100 ++enum OUTPUT_PRIORITY current_priority;
101 ++
102 ++char output_buffer[OUTPUT_BUFFSIZE];
103 ++
104 + void conditional_puts(enum OUTPUT_PRIORITY pri, const char * message)
105 + {
106 + if(pri >= current_priority)
107 +--- a/src/cdstatus_output.h
108 ++++ b/src/cdstatus_output.h
109 +@@ -3,10 +3,10 @@
110 + #define CDSTATUS_OUTPUT_H
111 +
112 + enum OUTPUT_PRIORITY { VERBOSE_DEBUG, DEBUG, NORMAL, WARNING, CRITICAL };
113 +-enum OUTPUT_PRIORITY current_priority;
114 ++extern enum OUTPUT_PRIORITY current_priority;
115 +
116 + #define OUTPUT_BUFFSIZE 512
117 +-char output_buffer[OUTPUT_BUFFSIZE];
118 ++extern char output_buffer[OUTPUT_BUFFSIZE];
119 +
120 + void conditional_puts(enum OUTPUT_PRIORITY, const char *);
121 + void conditional_perror(enum OUTPUT_PRIORITY, const char *);
122
123 diff --git a/media-sound/cdstatus/files/cdstatus-0.97.03-respect-user-CFLAGS.patch b/media-sound/cdstatus/files/cdstatus-0.97.03-respect-user-CFLAGS.patch
124 new file mode 100644
125 index 00000000000..d8fdb62d479
126 --- /dev/null
127 +++ b/media-sound/cdstatus/files/cdstatus-0.97.03-respect-user-CFLAGS.patch
128 @@ -0,0 +1,11 @@
129 +--- a/src/Makefile.in
130 ++++ b/src/Makefile.in
131 +@@ -154,7 +154,7 @@
132 + top_build_prefix = @top_build_prefix@
133 + top_builddir = @top_builddir@
134 + top_srcdir = @top_srcdir@
135 +-AM_CFLAGS = -O2 -funroll-loops -finline-functions
136 ++AM_CFLAGS =
137 + cdstatus_SOURCES = \
138 + args.h \
139 + basic_info.c \