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

EAPI=7

inherit flag-o-matic

DESCRIPTION="Near Field Communication (NFC) management daemon"
HOMEPAGE="https://01.org/linux-nfc/"
SRC_URI="https://www.kernel.org/pub/linux/network/nfc/${P}.tar.xz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="tools systemd"

RDEPEND="
	 dev-libs/libnl:3=
	 sys-apps/dbus
	 sys-libs/glibc
	 systemd? ( sys-apps/systemd:0 )
"

DEPEND="${RDEPEND}"

src_configure() {
	 # Workaround for >= GCC-10
	 append-cflags -fcommon

	 local myeconfargs=(
		  --disable-optimization
		  --enable-ese
		  --enable-pie
		  $(use_enable systemd)
		  $(use_enable tools)
	 )
	 econf "${myeconfargs[@]}"
}

src_install() {
	 default

	 # Patch for this has been sent upstream.  Do it manually
	 # to avoid having to rebuild autotools. #580876
	 mv "${ED}"/usr/include/version.h "${ED}"/usr/include/near/ || die

	 newinitd "${FILESDIR}"/neard.rc neard
	 newconfd "${FILESDIR}"/neard.confd neard
}