*/*: Bump copyright on files touched this year
[gentoo.git] / dev-libs / libnl / libnl-1.1.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils multilib toolchain-funcs
6
7 DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
8 HOMEPAGE="http://www.infradead.org/~tgr/libnl/"
9 SRC_URI="http://www.infradead.org/~tgr/libnl/files/${P}.tar.gz"
10 LICENSE="LGPL-2.1"
11 SLOT="1.1"
12 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
13 IUSE="doc static-libs"
14
15 DEPEND="doc? ( app-doc/doxygen )"
16 DOCS=( ChangeLog )
17
18 src_prepare() {
19         epatch \
20                 "${FILESDIR}"/${PN}-1.1-vlan-header.patch \
21                 "${FILESDIR}"/${PN}-1.1-flags.patch \
22                 "${FILESDIR}"/${PN}-1.1.3-offsetof.patch
23         sed -i \
24                 -e '/@echo/d' \
25                 Makefile.rules {lib,src,tests}/Makefile || die
26         sed -i \
27                 -e 's|-g ||g' \
28                 Makefile.opts.in || die
29
30         if ! use static-libs; then
31                 sed -i lib/Makefile -e '/OUT_AR/d' || die
32         fi
33
34         rm -f lib/libnl.a
35 }
36
37 src_compile() {
38         emake AR=$(tc-getAR)
39
40         if use doc ; then
41                 cd "${S}/doc"
42                 emake gendoc
43         fi
44 }
45
46 src_install() {
47         default
48
49         if use doc ; then
50                 cd "${S}/doc"
51                 dohtml -r html/*
52         fi
53 }