Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/net-tools/
Date: Tue, 24 Nov 2015 22:02:03
Message-Id: 1448402487.733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04.vapier@gentoo
1 commit: 733183e990df8ca3ab8d72a0fc8bf24b6c4b3d04
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 24 21:14:54 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 24 22:01:27 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=733183e9
7
8 sys-apps/net-tools: add USE flags to control arp/hostname/nis/plipconfig/slattach programs #128538
9
10 Default the old crufty stuff to off (parallel port, serial port, and
11 NIS/YP).
12
13 sys-apps/net-tools/metadata.xml | 4 +++
14 .../net-tools-1.60_p20151124144947.ebuild | 36 ++++++++++++++++++++--
15 sys-apps/net-tools/net-tools-9999.ebuild | 36 ++++++++++++++++++++--
16 3 files changed, 70 insertions(+), 6 deletions(-)
17
18 diff --git a/sys-apps/net-tools/metadata.xml b/sys-apps/net-tools/metadata.xml
19 index cd6f227..8ba2926 100644
20 --- a/sys-apps/net-tools/metadata.xml
21 +++ b/sys-apps/net-tools/metadata.xml
22 @@ -3,7 +3,11 @@
23 <pkgmetadata>
24 <herd>base-system</herd>
25 <use>
26 + <flag name='arp'>build the arp and rarp tools (for manipulating the ARP cache)</flag>
27 + <flag name='hostname'>build the hostname and dnsdomainname tools</flag>
28 <flag name='old-output'>use old ifconfig output style (useful for when new output breaks scripts)</flag>
29 + <flag name='plipconfig'>build the plipconfig tool (for working with old PLIP hardware)</flag>
30 + <flag name='slattach'>build the slattach tool (for working with old serial ports)</flag>
31 </use>
32 <upstream>
33 <remote-id type='sourceforge'>net-tools</remote-id>
34
35 diff --git a/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild b/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild
36 index 40970a4..059a1aa 100644
37 --- a/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild
38 +++ b/sys-apps/net-tools/net-tools-1.60_p20151124144947.ebuild
39 @@ -19,16 +19,18 @@ HOMEPAGE="http://net-tools.sourceforge.net/"
40
41 LICENSE="GPL-2"
42 SLOT="0"
43 -IUSE="ipv6 nls selinux static"
44 +IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
45
46 -RDEPEND="!<sys-apps/openrc-0.9.9.3
47 - selinux? ( sys-libs/libselinux )"
48 +RDEPEND="selinux? ( sys-libs/libselinux )"
49 DEPEND="${RDEPEND}
50 selinux? ( virtual/pkgconfig )
51 app-arch/xz-utils"
52 if [[ ${PV} == "9999" ]]; then
53 DEPEND+=" nls? ( sys-devel/gettext )"
54 fi
55 +RDEPEND+="
56 + hostname? ( !sys-apps/coreutils[hostname] )
57 + !<sys-apps/openrc-0.9.9.3"
58
59 maint_pkg_create() {
60 cd /usr/local/src/net-tools
61 @@ -72,3 +74,31 @@ src_configure() {
62 tc-export AR CC
63 yes "" | ./configure.sh config.in || die
64 }
65 +
66 +src_install() {
67 + default
68 +
69 + # TODO: Make these into config knobs upstream.
70 + if ! use arp ; then
71 + rm "${ED}"/sbin/{,r}arp "${ED}"/usr/share/man/man8/{,r}arp.8* || die
72 + fi
73 + if ! use hostname ; then
74 + if use nis ; then
75 + # Since all the tools are symlinks, repoint them.
76 + rm "${ED}"/bin/domainname || die
77 + cp -p "${ED}"/bin/{host,domain}name || die
78 + dosym domainname /bin/nisdomainname
79 + dosym domainname /bin/ypdomainname
80 + fi
81 + rm "${ED}"/bin/{host,dnsdomain}name "${ED}"/usr/share/man/man1/{host,dnsdomain}name.1* || die
82 + fi
83 + if ! use nis ; then
84 + rm "${ED}"/bin/{,nis,yp}domainname "${ED}"/usr/share/man/man1/{,nis,yp}domainname.1* || die
85 + fi
86 + if ! use plipconfig ; then
87 + rm "${ED}"/sbin/plipconfig "${ED}"/usr/share/man/man8/plipconfig.8* || die
88 + fi
89 + if ! use slattach ; then
90 + rm "${ED}"/sbin/slattach "${ED}"/usr/share/man/man8/slattach.8* || die
91 + fi
92 +}
93
94 diff --git a/sys-apps/net-tools/net-tools-9999.ebuild b/sys-apps/net-tools/net-tools-9999.ebuild
95 index 40970a4..059a1aa 100644
96 --- a/sys-apps/net-tools/net-tools-9999.ebuild
97 +++ b/sys-apps/net-tools/net-tools-9999.ebuild
98 @@ -19,16 +19,18 @@ HOMEPAGE="http://net-tools.sourceforge.net/"
99
100 LICENSE="GPL-2"
101 SLOT="0"
102 -IUSE="ipv6 nls selinux static"
103 +IUSE="+arp +hostname ipv6 nis nls plipconfig selinux slattach static"
104
105 -RDEPEND="!<sys-apps/openrc-0.9.9.3
106 - selinux? ( sys-libs/libselinux )"
107 +RDEPEND="selinux? ( sys-libs/libselinux )"
108 DEPEND="${RDEPEND}
109 selinux? ( virtual/pkgconfig )
110 app-arch/xz-utils"
111 if [[ ${PV} == "9999" ]]; then
112 DEPEND+=" nls? ( sys-devel/gettext )"
113 fi
114 +RDEPEND+="
115 + hostname? ( !sys-apps/coreutils[hostname] )
116 + !<sys-apps/openrc-0.9.9.3"
117
118 maint_pkg_create() {
119 cd /usr/local/src/net-tools
120 @@ -72,3 +74,31 @@ src_configure() {
121 tc-export AR CC
122 yes "" | ./configure.sh config.in || die
123 }
124 +
125 +src_install() {
126 + default
127 +
128 + # TODO: Make these into config knobs upstream.
129 + if ! use arp ; then
130 + rm "${ED}"/sbin/{,r}arp "${ED}"/usr/share/man/man8/{,r}arp.8* || die
131 + fi
132 + if ! use hostname ; then
133 + if use nis ; then
134 + # Since all the tools are symlinks, repoint them.
135 + rm "${ED}"/bin/domainname || die
136 + cp -p "${ED}"/bin/{host,domain}name || die
137 + dosym domainname /bin/nisdomainname
138 + dosym domainname /bin/ypdomainname
139 + fi
140 + rm "${ED}"/bin/{host,dnsdomain}name "${ED}"/usr/share/man/man1/{host,dnsdomain}name.1* || die
141 + fi
142 + if ! use nis ; then
143 + rm "${ED}"/bin/{,nis,yp}domainname "${ED}"/usr/share/man/man1/{,nis,yp}domainname.1* || die
144 + fi
145 + if ! use plipconfig ; then
146 + rm "${ED}"/sbin/plipconfig "${ED}"/usr/share/man/man8/plipconfig.8* || die
147 + fi
148 + if ! use slattach ; then
149 + rm "${ED}"/sbin/slattach "${ED}"/usr/share/man/man8/slattach.8* || die
150 + fi
151 +}