commit:     65a5ee694c109ad023cd722eae95deddf5c03b90
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  8 16:53:21 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Aug  8 16:53:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65a5ee69

media-sound/chordii: Fix building under -fno-common

Closes: https://bugs.gentoo.org/706460
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-sound/chordii/chordii-4.5.3.ebuild           | 20 +++++++-------
 .../chordii/files/chordii-4.5.3-fno-common.patch   | 31 ++++++++++++++++++++++
 2 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/media-sound/chordii/chordii-4.5.3.ebuild 
b/media-sound/chordii/chordii-4.5.3.ebuild
index 605ec52c35a..1b9c9f3d7f9 100644
--- a/media-sound/chordii/chordii-4.5.3.ebuild
+++ b/media-sound/chordii/chordii-4.5.3.ebuild
@@ -1,26 +1,26 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 DESCRIPTION="A guitar music typesetter"
 HOMEPAGE="http://chordii.sourceforge.net/";
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+SRC_URI="
+       mirror://sourceforge/${PN}/${P}.tar.gz
        doc? ( mirror://sourceforge/${PN}/user_guide-${PV}.pdf )"
 
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="doc examples"
+IUSE="doc"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.5.3-fno-common.patch )
 
 src_install() {
        default
 
-       use doc && dodoc "${DISTDIR}"/user_guide-${PV}.pdf
+       dodoc -r examples
+       docompress -x /usr/share/doc/${PF}/examples
 
-       if use examples ; then
-               docinto examples
-               dodoc examples/*
-               docompress -x /usr/share/doc/${PF}/examples
-       fi
+       use doc && dodoc "${DISTDIR}"/user_guide-${PV}.pdf
 }

diff --git a/media-sound/chordii/files/chordii-4.5.3-fno-common.patch 
b/media-sound/chordii/files/chordii-4.5.3-fno-common.patch
new file mode 100644
index 00000000000..914a532252c
--- /dev/null
+++ b/media-sound/chordii/files/chordii-4.5.3-fno-common.patch
@@ -0,0 +1,31 @@
+--- a/src/chordii.c
++++ b/src/chordii.c
+@@ -19,6 +19,8 @@
+ 
+ static FILE *source_fd;
+ 
++struct kcs dummy_kcs;
++
+ char
+       text_line[MAXLINE],     /* Lyrics Buffer */
+       chord[MAXTOKEN],        /* Buffer for the name of the chord */
+--- a/src/chordii.h
++++ b/src/chordii.h
+@@ -67,7 +67,7 @@
+ #define CHORD_EASY    0
+ #define CHORD_HARD    1
+ 
+-struct kcs {
++extern struct kcs {
+       struct  kcs *next;
+       char    chord_name[CHORD_NAME_SZ];
+       int     displ;
+@@ -76,7 +76,7 @@
+       int     difficult;
+       } dummy_kcs;
+ 
+-struct chord_struct {
++typedef struct chord_struct {
+       struct chord_struct *next;
+       struct kcs *chord;
+       } dummy_chord_struct;

Reply via email to