commit: 5b8fb13399e24aca92c35b82de0d94585263d2a4 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Sat Jan 16 16:51:48 2016 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sat Jan 16 16:52:25 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b8fb133
media-sound/gbsplay: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics Gentoo-Bug: 571000 Also bump ebuild to EAPI=6. Fix -Werror=format-security errors. Package-Manager: portage-2.2.26 .../files/gbsplay-0.0.91-fix-buildsystem.patch | 32 ++++++++++++ media-sound/gbsplay/gbsplay-0.0.91-r2.ebuild | 57 ++++++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/media-sound/gbsplay/files/gbsplay-0.0.91-fix-buildsystem.patch b/media-sound/gbsplay/files/gbsplay-0.0.91-fix-buildsystem.patch new file mode 100644 index 0000000..82089f9 --- /dev/null +++ b/media-sound/gbsplay/files/gbsplay-0.0.91-fix-buildsystem.patch @@ -0,0 +1,32 @@ +Fix linking failure due to different GCC5 inline semantics +https://bugs.gentoo.org/show_bug.cgi?id=571000 + +In addition, fix QA warnings caused by passing +an unformatted string to printf(). + +--- gbsplay-0.0.91/Makefile ++++ gbsplay-0.0.91/Makefile +@@ -35,7 +35,7 @@ + -predboolothers \ + -shiftnegative \ + -shiftimplementation +-GBSCFLAGS := -Wall -fsigned-char -D_FORTIFY_SOURCE=2 ++GBSCFLAGS := -Wall -fsigned-char -std=gnu89 + GBSLDFLAGS := -Wl,-O1 -lm + GBSPLAYLDFLAGS := + +--- gbsplay-0.0.91/plugout.c ++++ gbsplay-0.0.91/plugout.c +@@ -55,10 +55,10 @@ + { + long idx; + +- printf(_("Available output plugins:\n\n")); ++ fputs(_("Available output plugins:\n\n"), stdout); + + if (plugouts[0] == NULL) { +- printf(_("No output plugins available.\n\n")); ++ fputs(_("No output plugins available.\n\n"), stdout); + return; + } + diff --git a/media-sound/gbsplay/gbsplay-0.0.91-r2.ebuild b/media-sound/gbsplay/gbsplay-0.0.91-r2.ebuild new file mode 100644 index 0000000..6e9a866 --- /dev/null +++ b/media-sound/gbsplay/gbsplay-0.0.91-r2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PLOCALES="de en" +inherit l10n toolchain-funcs + +DESCRIPTION="Nintendo Gameboy sound player for GBS format" +HOMEPAGE="https://www.cgarbs.de/gbsplay.en.html" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+alsa nas nls oss" + +RDEPEND="alsa? ( media-libs/alsa-lib:0 ) + nas? ( media-libs/nas:0 )" + +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext:0 )" + +PATCHES=( + "${FILESDIR}/${P}-fix-buildsystem.patch" +) + +src_configure() { + tc-export AR CC + + # No econf, because "unknown option '--build=x86_64-pc-linux-gnu'" + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --docdir=/usr/share/doc/${PF} \ + --without-xmmsplugin \ + --without-test \ + $(use_enable nls i18n) \ + $(use_enable oss devdsp) \ + $(use_enable alsa) \ + $(use_enable nas) || die "Configure failed." +} + +src_compile() { + emake CC="$(tc-getCC)" SPLINT="true" +} + +remove_disabled_locale() { + rm -r "${D}"/usr/share/locale/$1 || die +} + +src_install() { + default + + l10n_for_each_disabled_locale_do remove_disabled_locale +}