summaryrefslogtreecommitdiff
blob: 157bb239defbe8341453f70529f522dfda2f8edd (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 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit linux-mod

DESCRIPTION="Aquantia AQC multigigabit NIC linux driver (atlantic) - development preview"
HOMEPAGE="https://github.com/Aquantia/AQtion"

COMMIT_ID="e024a859ea828ced78db310328db90dbedea837a"
SRC_URI="https://github.com/Aquantia/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="lro"

DEPEND="virtual/linux-sources"

S="${WORKDIR}/${PN}-${COMMIT_ID}"

MODULE_NAMES="atlantic(drivers/net/ethernet/aquantia/atlantic:${S})"
BUILD_TARGETS="all"
CONFIG_CHECK="~!AQTION ~PTP_1588_CLOCK ~CRC_ITU_T"

DOCS=(
	README.md
	README.txt
)

pkg_setup() {
	use lro && CONFIG_CHECK+=" ~!CONFIG_BRIDGE"
	linux-mod_pkg_setup
}

src_prepare() {
	default

	if ! use lro; then
		sed -r -i -e 's/(#define AQ_CFG_IS_LRO_DEF[[:space:]]+)[[:digit:]]+([[:alpha:]]*)/\10\2/' \
			aq_cfg.h || die
	fi
}

src_install() {
	linux-mod_src_install
	dodoc "${DOCS[@]}"
}