summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-06-21 15:19:52 +0200
committerDavid Seifert <soap@gentoo.org>2020-06-21 15:19:52 +0200
commitd4d718e8991e2d0a08c16bc87b3efcc997893482 (patch)
tree89f4e8387ff436c57145c26de5ae8ce92e4ae25e
parentmedia-sound/flake: [QA] Pass AR/RANLIB to build system (diff)
downloadgentoo-d4d718e8991e2d0a08c16bc87b3efcc997893482.tar.gz
gentoo-d4d718e8991e2d0a08c16bc87b3efcc997893482.tar.bz2
gentoo-d4d718e8991e2d0a08c16bc87b3efcc997893482.zip
media-sound/fmdrv: [QA] Fix build system
Closes: https://bugs.gentoo.org/724684 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--media-sound/fmdrv/files/fmdrv-1.0.7-fix-makefile.patch42
-rw-r--r--media-sound/fmdrv/fmdrv-1.0.7.ebuild27
2 files changed, 55 insertions, 14 deletions
diff --git a/media-sound/fmdrv/files/fmdrv-1.0.7-fix-makefile.patch b/media-sound/fmdrv/files/fmdrv-1.0.7-fix-makefile.patch
new file mode 100644
index 00000000000..a222752716c
--- /dev/null
+++ b/media-sound/fmdrv/files/fmdrv-1.0.7-fix-makefile.patch
@@ -0,0 +1,42 @@
+--- a/Makefile
++++ b/Makefile
+@@ -59,7 +59,7 @@
+ #ELF (works):
+ # $(CC) -Wl,-r -nostdlib -o $@ $^
+ #a.out (works):
+- ar -rc $@ $^
++ $(AR) -rc $@ $^
+
+ install: installbin
+ chown root $(BINDIR)/fmdrv
+--- a/Makefile.sets
++++ b/Makefile.sets
+@@ -1,22 +1,18 @@
+ INSTALL=install
+-CC=gcc
+-CXX=g++
+
+-CPP=$(CC)
+-LDFLAGS=-g
+ #LDLIBS=-lstdc++
+
+-CWARNINGS=-Wall -W -pipe -g \
++CWARNINGS=-Wall -W \
+ -Wundef \
+- -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes \
+- -Wmissing-prototypes -Winline
++ -Wcast-qual -Wcast-align -Wwrite-strings \
++ -Winline
+ # -Wtraditional -fmessage-length=128
+
+-CXXFLAGS=-pedantic -ffast-math $(CWARNINGS)
++CXXFLAGS+=-pedantic $(CWARNINGS)
+ #CFLAGS=-O3 -fomit-frame-pointer -ffast-math $(CWARNINGS)
+-CFLAGS=-O -g $(CWARNINGS)
++CFLAGS+=$(CWARNINGS) -Wstrict-prototypes -Wmissing-prototypes
+
+-CPPFLAGS=-DVERSION=\"$(VERSION)\" \
++CPPFLAGS+=-DVERSION=\"$(VERSION)\" \
+ -DCONFIG=\"$(CFGDIR)/$(CFGFILE)\" \
+ -DBINDIR=\"$(BINDIR)\" $(DEFS)
+
diff --git a/media-sound/fmdrv/fmdrv-1.0.7.ebuild b/media-sound/fmdrv/fmdrv-1.0.7.ebuild
index e4701c3430f..9cb17380f29 100644
--- a/media-sound/fmdrv/fmdrv-1.0.7.ebuild
+++ b/media-sound/fmdrv/fmdrv-1.0.7.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils toolchain-funcs
+EAPI=7
+
+inherit toolchain-funcs
DESCRIPTION="Console mode MIDI player with builtin userland OPL2 driver"
HOMEPAGE="https://bisqwit.iki.fi/source/fmdrv.html"
@@ -12,23 +13,21 @@ LICENSE="fmdrv GPL-2" # GPL-2 only
SLOT="0"
KEYWORDS="amd64 x86"
-src_prepare() {
- epatch "${FILESDIR}"/${P}-ioperm.patch
-}
+PATCHES=(
+ "${FILESDIR}"/${P}-ioperm.patch
+ "${FILESDIR}"/${P}-fix-makefile.patch
+)
-src_configure() { :; } # it is a fake
+DOCS=( README )
+HTML_DOCS=( README.html )
-src_compile() {
- emake fmdrv \
- CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
- CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
+src_configure() {
+ tc-export AR CC CXX
}
src_install() {
dobin fmdrv
- dodoc README
- dohtml README.html
+ einstalldocs
}
pkg_postinst() {