summaryrefslogtreecommitdiffstats
path: root/media-libs/taglib/taglib-1.9.1-r4.ebuild
blob: c41e0adcc3fed8987647532c0a4b153daa8ef8d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/taglib/taglib-1.9.1-r2.ebuild,v 1.11 2014/08/27 09:05:26 ssuominen Exp $

EAPI=6

inherit cmake-multilib

DESCRIPTION="A library for reading and editing audio meta data"
HOMEPAGE="http://developer.kde.org/~wheeler/taglib.html"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-2.1 MPL-1.1"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
SLOT="0"

#SDS
IUSE="+asf debug examples +mp4 test rcc"

RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
	test? ( >=dev-util/cppunit-1.13.2[${MULTILIB_USEDEP}] )
	rcc? ( app-i18n/librcc )
"
#EDS

RDEPEND="${RDEPEND}
	abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r2
		!app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"

PATCHES=(
	"${FILESDIR}"/${PN}-1.6.1-install-examples.patch
	"${FILESDIR}"/${P}-missing-deletes.patch
	"${FILESDIR}"/${P}-order-big-endian.patch
	"${FILESDIR}"/${P}-abi-breakage.patch
	"${FILESDIR}"/${P}-bytevector-simpler.patch
)


DOCS=( AUTHORS NEWS )

MULTILIB_CHOST_TOOLS=(
	/usr/bin/taglib-config
)

src_unpack() {
	unpack ${A}
	cd "${S}"

	use rcc && (
            epatch "${FILESDIR}"/taglib-1.9.1-ds-rusxmms.patch || die
            epatch "${FILESDIR}"/taglib-1.9.1-ds-rusxmms-enforce.patch || die
	)
}


multilib_src_configure() {
	mycmakeargs=(
		$(multilib_is_native_abi && cmake-utils_use_build examples)
		$(cmake-utils_use_build test TESTS)
		$(cmake-utils_use_with asf)
		$(cmake-utils_use_with mp4)
	)

	cmake-utils_src_configure
}

multilib_src_test() {
	# ctest does not work
	emake -C "${BUILD_DIR}" check
}

pkg_postinst() {
	if ! use asf; then
		elog "You've chosen to disable the asf use flag, thus taglib won't include"
		elog "support for Microsoft's 'advanced systems format' media container"
	fi
	if ! use mp4; then
		elog "You've chosen to disable the mp4 use flag, thus taglib won't include"
		elog "support for the MPEG-4 part 14 / MP4 media container"
	fi
}