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/flac-image/, media-sound/flac-image/files/
Date: Sat, 03 Jun 2017 20:52:51
Message-Id: 1496523126.0a8189aa0fac03f213c968ba973bbe21ee178dbc.soap@gentoo
1 commit: 0a8189aa0fac03f213c968ba973bbe21ee178dbc
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 3 20:12:04 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 3 20:52:06 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a8189aa
7
8 media-sound/flac-image: [QA] Various fixes
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 ...lac-image-1.00-add-missing-string-include.patch | 10 +++++++
13 .../files/flac-image-1.00-fix-build-system.patch | 18 ++++++++++++
14 media-sound/flac-image/flac-image-1.00.ebuild | 33 +++++++++-------------
15 3 files changed, 42 insertions(+), 19 deletions(-)
16
17 diff --git a/media-sound/flac-image/files/flac-image-1.00-add-missing-string-include.patch b/media-sound/flac-image/files/flac-image-1.00-add-missing-string-include.patch
18 new file mode 100644
19 index 00000000000..0ba842c7ee0
20 --- /dev/null
21 +++ b/media-sound/flac-image/files/flac-image-1.00-add-missing-string-include.patch
22 @@ -0,0 +1,10 @@
23 +--- a/flac-image.c
24 ++++ b/flac-image.c
25 +@@ -15,6 +15,7 @@
26 + */
27 +
28 + #include <stdio.h>
29 ++#include <string.h>
30 + #include <unistd.h>
31 + #include <sys/stat.h>
32 + #include <fcntl.h>
33
34 diff --git a/media-sound/flac-image/files/flac-image-1.00-fix-build-system.patch b/media-sound/flac-image/files/flac-image-1.00-fix-build-system.patch
35 new file mode 100644
36 index 00000000000..2cd8c538b47
37 --- /dev/null
38 +++ b/media-sound/flac-image/files/flac-image-1.00-fix-build-system.patch
39 @@ -0,0 +1,18 @@
40 +Fix Makefile to respect user variables
41 +
42 +--- a/Makefile
43 ++++ b/Makefile
44 +@@ -3,9 +3,8 @@
45 + # by default, you probably need to add -I/usr/whereever/flac to CFLAGS and
46 + # -L/usr/lib/whereever to the link step.
47 +
48 +-CFLAGS="-Wall -g"
49 +-
50 + flac-image: flac-image.o
51 +- gcc -o flac-image -lFLAC flac-image.o
52 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lFLAC
53 +
54 +-flac-image: flac-image.c flac-image.h
55 +\ No newline at end of file
56 ++flac-image.o: flac-image.c flac-image.h
57 ++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
58
59 diff --git a/media-sound/flac-image/flac-image-1.00.ebuild b/media-sound/flac-image/flac-image-1.00.ebuild
60 index 916e238fbae..78ea6acddc7 100644
61 --- a/media-sound/flac-image/flac-image-1.00.ebuild
62 +++ b/media-sound/flac-image/flac-image-1.00.ebuild
63 @@ -1,16 +1,16 @@
64 -# Copyright 1999-2012 Gentoo Foundation
65 +# Copyright 1999-2017 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67
68 -EAPI=4
69 +EAPI=6
70
71 -inherit eutils
72 +inherit toolchain-funcs
73
74 -DESCRIPTION="Utility for stuffing image files (e.g. album cover art) into metadata blocks in FLAC files"
75 +DESCRIPTION="Utility for adding image files (e.g. album cover art) to metadata of FLAC files"
76 HOMEPAGE="http://www.singingtree.com/software/"
77 SRC_URI="http://www.singingtree.com/software/${PN}.tar.gz -> ${P}.tar.gz"
78 # FIXME: no version in tarball, but also no updates for a long time. So it's ok.
79 -LICENSE="BSD"
80
81 +LICENSE="BSD"
82 SLOT="0"
83 KEYWORDS="~amd64 ~x86"
84 IUSE=""
85 @@ -18,23 +18,18 @@ IUSE=""
86 DEPEND="media-libs/flac"
87 RDEPEND="${DEPEND}"
88
89 -S="${WORKDIR}"
90 +S=${WORKDIR}
91
92 -# compile helper
93 -_compile() {
94 - local CC="$(tc-getCC)"
95 - echo "${CC} ${@}" && "${CC}" "${@}"
96 -}
97 +PATCHES=(
98 + "${FILESDIR}"/${PN}-1.00-add-missing-string-include.patch
99 + "${FILESDIR}"/${PN}-1.00-fix-build-system.patch
100 +)
101
102 -src_prepare() {
103 - sed -i -e "s:^\(#include <stdio.h>\):\1\n#include <string.h>:g" "${PN}.c"
104 - rm -f -- "${PN}" # remove pre-compiled binary
105 -}
106 +src_configure() {
107 + # remove pre-compiled binary
108 + rm -f "${PN}" || die
109
110 -src_compile() {
111 - # Makefile is both simple and broken, so we compile the binary ourself.
112 - _compile ${CFLAGS} ${LDFLAGS} -o "${PN}" "${PN}.c" -lFLAC \
113 - || die "compile failed"
114 + tc-export CC
115 }
116
117 src_install() {