summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-06-21 15:19:43 +0200
committerDavid Seifert <soap@gentoo.org>2020-06-21 15:19:43 +0200
commit37ce435093e0bd6f2c5a11661360d1c461d0eaf9 (patch)
treef475b812bde0ad59acde4f270932469eba2c3947 /media-sound/erec
parentmedia-sound/splay: [QA] Add AM_PROG_AR (diff)
downloadgentoo-37ce435093e0bd6f2c5a11661360d1c461d0eaf9.tar.gz
gentoo-37ce435093e0bd6f2c5a11661360d1c461d0eaf9.tar.bz2
gentoo-37ce435093e0bd6f2c5a11661360d1c461d0eaf9.zip
media-sound/erec: [QA] Fix build system
Closes: https://bugs.gentoo.org/724738 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'media-sound/erec')
-rw-r--r--media-sound/erec/erec-2.2.0.1-r1.ebuild30
-rw-r--r--media-sound/erec/files/erec-2.2.0.1-fix-makefile.patch113
2 files changed, 124 insertions, 19 deletions
diff --git a/media-sound/erec/erec-2.2.0.1-r1.ebuild b/media-sound/erec/erec-2.2.0.1-r1.ebuild
index 764393565e5c..69ec64516124 100644
--- a/media-sound/erec/erec-2.2.0.1-r1.ebuild
+++ b/media-sound/erec/erec-2.2.0.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,35 +9,27 @@ DESCRIPTION="Shared audio recording server"
HOMEPAGE="https://bisqwit.iki.fi/source/erec.html"
SRC_URI="https://bisqwit.iki.fi/src/arch/${P}.tar.bz2"
-KEYWORDS="amd64 ~ppc sparc x86"
LICENSE="GPL-2+"
SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
-PATCHES=( "${FILESDIR}/${P}-gcc43.patch" )
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc43.patch
+ "${FILESDIR}"/${P}-fix-makefile.patch
+)
DOCS=( README )
HTML_DOCS=( README.html )
src_prepare() {
- sed -i \
- -e "s:BINDIR=/usr/local/bin:BINDIR=${D}/usr/bin:" \
- -e "s:^\\(ARGHLINK.*-L.*\\):#\\1:" \
- -e "s:^#\\(ARGHLINK=.*a\\)$:\\1:" \
- -e "s:\$(CXX):\$(CXX) \$(CXXFLAGS) -I\"${S}\"/argh:g" \
- Makefile || die
-
- sed -i \
- -e "s:CPPFLAGS=:CPPFLAGS=-I\"${S}\"/argh :" \
- Makefile.sets || die
-
- echo "" > .depend || die
- echo "" > argh/.depend || die
default
+
+ # prevent buildsystem from generating header dependencies
+ touch .depend argh/.depend || die
}
-src_compile() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
- CXXFLAGS="${CXXFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" -j1
+src_configure() {
+ tc-export AR CC CXX
}
src_install() {
diff --git a/media-sound/erec/files/erec-2.2.0.1-fix-makefile.patch b/media-sound/erec/files/erec-2.2.0.1-fix-makefile.patch
new file mode 100644
index 000000000000..31c90354b7e7
--- /dev/null
+++ b/media-sound/erec/files/erec-2.2.0.1-fix-makefile.patch
@@ -0,0 +1,113 @@
+--- a/argh/Makefile
++++ b/argh/Makefile
+@@ -16,12 +16,12 @@
+ all: libargh.so libargh.a
+
+ libargh.so: argh.lo
+- $(CXX) -g -shared -Wl,-soname=$@ -o $@ $^
++ $(CXX) -shared -Wl,-soname=$@ -o $@ $^
+ argh.lo: argh.cc
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -fpic -o $@ -c $<
+
+ libargh.a: argh.o
+- ar -rc $@ $^
++ $(AR) -rc $@ $^
+
+ include depfun.mak
+
+--- a/argh/Makefile.sets
++++ b/argh/Makefile.sets
+@@ -1,21 +1,18 @@
+-CC=gcc
+-CPP=g++
+ #CXX=g++-2.95
+-CXX=g++
+ #CXX=remotegcc -soktober -- g++
+
+ # Options for compiling, generally.
+-CPPFLAGS=-DVERSION=\"$(VERSION)\" -pipe -g
++CPPFLAGS+=-DVERSION=\"$(VERSION)\"
+ # -fmessage-length=0
+
+ WARNINGS=-Wall -W -pedantic \
+- -Wundef -Wcast-qual -Wpointer-arith -Wstrict-prototypes \
+- -Wconversion -Wmissing-prototypes -Wwrite-strings \
++ -Wundef -Wcast-qual -Wpointer-arith \
++ -Wconversion -Wwrite-strings \
+ -Wsign-compare -Wredundant-decls
+ # -Wtraditional -Wcast-align
+
+ # C specific warnings
+-CCOPTS=$(WARNINGS) -Waggregate-return -Wshadow -Winline
++CCOPTS=$(WARNINGS) -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wshadow -Winline
+
+ # C++ specific warnings
+ CXXOPTS=$(WARNINGS)
+@@ -25,9 +22,8 @@
+ #-march=pentiumpro
+
+ # Flags.
+-CFLAGS=$(OPTIM) $(CCOPTS)
+-CXXFLAGS=$(OPTIM) $(CXXOPTS) -fno-default-inline
++CFLAGS+=$(CCOPTS)
++CXXFLAGS+=$(CXXOPTS) -fno-default-inline
+ #-fno-rtti
+
+ #LDFLAGS=-pg -ax
+-LDFLAGS=-g
+--- a/Makefile
++++ b/Makefile
+@@ -19,9 +19,9 @@
+ SUBDIRS=argh
+
+ # For DYNAMIC argh-linking, use:
+-ARGHLINK=-Largh -largh
++#ARGHLINK=-Largh -largh
+ # For STATIC argh-linking, use:
+-#ARGHLINK=argh/libargh.a
++ARGHLINK=argh/libargh.a
+
+ all: subdirs ${PROG}
+
+@@ -29,8 +29,8 @@
+ $(SUBDIRS):
+ @$(MAKE) -C $@
+
+-${PROG}: $(OBJS)
+- $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(ARGHLINK)
++${PROG}: $(OBJS) subdirs
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Iargh -o $@ $< $(LDLIBS) $(ARGHLINK)
+
+ include depfun.mak
+
+--- 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+=-Wmissing-prototypes -Wstrict-prototypes $(CWARNINGS)
+
+-CPPFLAGS=-DVERSION=\"$(VERSION)\" \
++CPPFLAGS+=-Iargh -DVERSION=\"$(VERSION)\" \
+ -DCONFIG=\"$(CFGDIR)/$(CFGFILE)\" \
+ -DBINDIR=\"$(BINDIR)\" $(DEFS)
+