summaryrefslogtreecommitdiff
blob: 1a45d58f97c5ba544da0fe3b057bdd48894416e3 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit multilib multilib-minimal toolchain-funcs

DESCRIPTION="Wrapper around libudev.so.1 for packages needing the old libudev.so.0"
HOMEPAGE="http://gentoo.org/"
SRC_URI=""

LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="virtual/libudev:0/1[${MULTILIB_USEDEP}]"
RDEPEND="${DEPEND}"

src_unpack() {
	mkdir "${S}" || die
	cp "${FILESDIR}"/udev_old.c "${S}" || die
}

multilib_src_configure() { :; }

echo_and_run() {
	echo "$@"
	"$@"
}

multilib_src_compile() {
	# Note: --no-as-needed is used explictly here to ensure that libudev.so.1
	# is pulled in, even though nothing in udev_old.c otherwise requires it
	echo_and_run $(tc-getCC) \
		${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \
		-fpic -shared \
		-Wl,-soname,libudev.so.0 \
		-o libudev.so.0 \
		"${S}"/udev_old.c \
		-Wl,--no-as-needed \
		-ludev || die
}

multilib_src_install() {
	dolib.so libudev.so.0
}