| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-sound/flac-image/flac-image-1.00.ebuild,v 1.1 2011/10/23 17:36:16 sbriesen Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit eutils
|
| 8 |
|
| 9 |
DESCRIPTION="Utility for stuffing image files (e.g. album cover art) into metadata blocks in FLAC files"
|
| 10 |
HOMEPAGE="http://www.singingtree.com/software/"
|
| 11 |
SRC_URI="http://www.singingtree.com/software/${PN}.tar.gz -> ${P}.tar.gz"
|
| 12 |
# FIXME: no version in tarball, but also no updates for a long time. So it's ok.
|
| 13 |
LICENSE="BSD"
|
| 14 |
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="~amd64 ~x86"
|
| 17 |
IUSE=""
|
| 18 |
|
| 19 |
DEPEND="media-libs/flac"
|
| 20 |
RDEPEND="${DEPEND}"
|
| 21 |
|
| 22 |
S="${WORKDIR}"
|
| 23 |
|
| 24 |
# compile helper
|
| 25 |
_compile() {
|
| 26 |
local CC="$(tc-getCC)"
|
| 27 |
echo "${CC} ${@}" && "${CC}" "${@}"
|
| 28 |
}
|
| 29 |
|
| 30 |
src_prepare() {
|
| 31 |
sed -i -e "s:^\(#include <stdio.h>\):\1\n#include <string.h>:g" "${PN}.c"
|
| 32 |
rm -f -- "${PN}" # remove pre-compiled binary
|
| 33 |
}
|
| 34 |
|
| 35 |
src_compile() {
|
| 36 |
# Makefile is both simple and broken, so we compile the binary ourself.
|
| 37 |
_compile ${CFLAGS} ${LDFLAGS} -o "${PN}" "${PN}.c" -lFLAC \
|
| 38 |
|| die "compile failed"
|
| 39 |
}
|
| 40 |
|
| 41 |
src_install() {
|
| 42 |
dobin "${PN}"
|
| 43 |
}
|