summaryrefslogtreecommitdiff
blob: df38adb84279fb6e00dc8ec4151b671630cde43e (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit autotools multilib-minimal

DESCRIPTION="GNU VCDimager"
HOMEPAGE="https://www.gnu.org/software/vcdimager/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
IUSE="static-libs +xml"

RDEPEND="
	>=dev-libs/libcdio-2.0.0:0=[-minimal,${MULTILIB_USEDEP}]
	dev-libs/popt
	xml? ( dev-libs/libxml2:2 )
"
DEPEND="${RDEPEND}
	virtual/pkgconfig
"

DOCS=( AUTHORS BUGS ChangeLog FAQ HACKING NEWS README THANKS TODO )

PATCHES=("${FILESDIR}/${P}-pkg-config.patch")

src_prepare() {
	default

	# Avoid building useless programs. Bug #226249
	sed -i \
		-e 's/check_PROGRAMS =/check_PROGRAMS +=/' \
		-e 's/noinst_PROGRAMS =/check_PROGRAMS =/' \
		test/Makefile.am || die
	sed -i \
		-e 's/noinst_PROGRAMS =/check_PROGRAMS =/' \
		example/Makefile.am || die

	eautoreconf
}

multilib_src_configure() {
	local myeconfargs=(
		$(use_enable static-libs static)
	)
	multilib_is_native_abi || myeconfargs+=( --without-cli-frontend )
	if ! use xml || ! multilib_is_native_abi ; then
		myeconfargs+=( --without-xml-frontend )
	fi

	ECONF_SOURCE="${S}" \
		econf ${myeconfargs[@]}
}

multilib_src_install_all() {
	find "${D}" -name '*.la' -delete || die
	einstalldocs
}