1 |
commit: 0e6d3355a14feecd7037650e248b345c3e772bd4 |
2 |
Author: Pavel Šimerda <pavlix <AT> pavlix <DOT> net> |
3 |
AuthorDate: Sat Sep 10 14:22:12 2016 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 10 16:34:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e6d3355 |
7 |
|
8 |
net-misc/iputils: update 99999999 to match 20160308 |
9 |
|
10 |
The current `net-misc/iputils-99999999` is no longer working. This |
11 |
commit switches upstream to `github.com/iputils/iputils` to match |
12 |
the changes already done in `iputils-20160308.ebuild`. |
13 |
|
14 |
This patch was created using the following command: |
15 |
|
16 |
cp iputils-20160308.ebuild iputils-99999999.ebuild |
17 |
|
18 |
The following changes happened: |
19 |
|
20 |
* Switch upstream to `github.com/iputils/iputils` |
21 |
* Add nettle and openssl use flags |
22 |
* Remove obsolete patches |
23 |
* Adapt `src_configure()` and related functions |
24 |
|
25 |
More changes will come as separate commits to mark the changes |
26 |
clearly. |
27 |
|
28 |
net-misc/iputils/iputils-99999999.ebuild | 73 +++++++++++++++++--------------- |
29 |
1 file changed, 40 insertions(+), 33 deletions(-) |
30 |
|
31 |
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild |
32 |
index aafdc9a..65a2110 100644 |
33 |
--- a/net-misc/iputils/iputils-99999999.ebuild |
34 |
+++ b/net-misc/iputils/iputils-99999999.ebuild |
35 |
@@ -6,15 +6,17 @@ |
36 |
# them in a tarball on our mirrors. This avoids ugly issues while |
37 |
# building stages, and when the jade/sgml packages are broken (which |
38 |
# seems to be more common than would be nice). |
39 |
+# Required packages for doc generation: |
40 |
+# app-text/docbook-sgml-utils |
41 |
|
42 |
EAPI=5 |
43 |
|
44 |
inherit flag-o-matic eutils toolchain-funcs fcaps |
45 |
if [[ ${PV} == "99999999" ]] ; then |
46 |
- EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils" |
47 |
- inherit git-2 |
48 |
+ EGIT_REPO_URI="https://github.com/iputils/iputils.git" |
49 |
+ inherit git-r3 |
50 |
else |
51 |
- SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2 |
52 |
+ SRC_URI="https://github.com/iputils/iputils/archive/s${PV}.tar.gz -> ${P}.tar.gz |
53 |
https://dev.gentoo.org/~polynomial-c/iputils-s${PV}-manpages.tar.xz" |
54 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux" |
55 |
fi |
56 |
@@ -24,13 +26,14 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iputils" |
57 |
|
58 |
LICENSE="BSD-4" |
59 |
SLOT="0" |
60 |
-IUSE="arping caps clockdiff doc gcrypt idn ipv6 libressl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute" |
61 |
+IUSE="arping caps clockdiff doc gcrypt idn ipv6 libressl nettle +openssl rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute" |
62 |
|
63 |
LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] ) |
64 |
idn? ( net-dns/libidn[static-libs(+)] ) |
65 |
ipv6? ( ssl? ( |
66 |
gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] ) |
67 |
- !gcrypt? ( |
68 |
+ nettle? ( dev-libs/nettle[static-libs(+)] ) |
69 |
+ openssl? ( |
70 |
!libressl? ( dev-libs/openssl:0[static-libs(+)] ) |
71 |
libressl? ( dev-libs/libressl[static-libs(+)] ) |
72 |
) |
73 |
@@ -51,42 +54,45 @@ if [[ ${PV} == "99999999" ]] ; then |
74 |
" |
75 |
fi |
76 |
|
77 |
+REQUIRED_USE="ipv6? ( ssl? ( ^^ ( gcrypt nettle openssl ) ) )" |
78 |
+ |
79 |
S=${WORKDIR}/${PN}-s${PV} |
80 |
|
81 |
PATCHES=( |
82 |
- "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch |
83 |
- "${FILESDIR}"/${PN}-99999999-openssl.patch #335436 |
84 |
- "${FILESDIR}"/${PN}-99999999-tftpd-syslog.patch |
85 |
- "${FILESDIR}"/${PN}-20121221-makefile.patch |
86 |
- "${FILESDIR}"/${PN}-20121221-parallel-doc.patch |
87 |
- "${FILESDIR}"/${PN}-20121221-strtod.patch #472592 |
88 |
+ "${FILESDIR}/021109-uclibc-no-ether_ntohost.patch" |
89 |
) |
90 |
|
91 |
src_prepare() { |
92 |
- use SECURITY_HAZARD && PATCHES+=( "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch ) |
93 |
- epatch "${PATCHES[@]}" |
94 |
+ epatch ${PATCHES[@]} |
95 |
+ use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20150815-nonroot-floodping.patch |
96 |
} |
97 |
|
98 |
src_configure() { |
99 |
use static && append-ldflags -static |
100 |
|
101 |
- IPV4_TARGETS=( |
102 |
+ TARGETS=( |
103 |
ping |
104 |
$(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done) |
105 |
) |
106 |
- IPV6_TARGETS=( |
107 |
- ping6 |
108 |
- $(usex tracepath 'tracepath6' '') |
109 |
- $(usex traceroute 'traceroute6' '') |
110 |
+ if use ipv6 ; then |
111 |
+ TARGETS+=( |
112 |
+ $(usex tracepath 'tracepath6' '') |
113 |
+ $(usex traceroute 'traceroute6' '') |
114 |
+ ) |
115 |
+ fi |
116 |
+ |
117 |
+ myconf=( |
118 |
+ USE_CRYPTO=no |
119 |
+ USE_GCRYPT=no |
120 |
+ USE_NETTLE=no |
121 |
) |
122 |
- use ipv6 || IPV6_TARGETS=() |
123 |
-} |
124 |
|
125 |
-ldflag_resolv() { |
126 |
- # See if the system includes a libresolv. #584132 |
127 |
- echo "main(){}" > "${T}"/resolv.c |
128 |
- if ${CC} ${CFLAGS} ${LDFLAGS} "${T}"/resolv.c -lresolv -o "${T}"/resolv 2>/dev/null ; then |
129 |
- echo -lresolv |
130 |
+ if use ipv6 && use ssl ; then |
131 |
+ myconf=( |
132 |
+ USE_CRYPTO=$(usex openssl) |
133 |
+ USE_GCRYPT=$(usex gcrypt) |
134 |
+ USE_NETTLE=$(usex nettle) |
135 |
+ ) |
136 |
fi |
137 |
} |
138 |
|
139 |
@@ -95,11 +101,9 @@ src_compile() { |
140 |
emake \ |
141 |
USE_CAP=$(usex caps) \ |
142 |
USE_IDN=$(usex idn) \ |
143 |
- USE_GCRYPT=$(usex gcrypt) \ |
144 |
- USE_CRYPTO=$(usex ssl) \ |
145 |
- LDFLAG_RESOLV=$(ldflag_resolv) \ |
146 |
- IPV4_TARGETS="${IPV4_TARGETS[*]}" \ |
147 |
- IPV6_TARGETS="${IPV6_TARGETS[*]}" |
148 |
+ IPV4_DEFAULT=$(usex ipv6 'no' 'yes') \ |
149 |
+ TARGETS="${TARGETS[*]}" \ |
150 |
+ ${myconf[@]} |
151 |
|
152 |
if [[ ${PV} == "99999999" ]] ; then |
153 |
emake html man |
154 |
@@ -108,8 +112,12 @@ src_compile() { |
155 |
|
156 |
src_install() { |
157 |
into / |
158 |
- dobin ping $(usex ipv6 'ping6' '') |
159 |
- use ipv6 && dosym ping.8 /usr/share/man/man8/ping6.8 |
160 |
+ dobin ping |
161 |
+ dosym ping /bin/ping4 |
162 |
+ if use ipv6 ; then |
163 |
+ dosym ping /bin/ping6 |
164 |
+ dosym ping.8 /usr/share/man/man8/ping6.8 |
165 |
+ fi |
166 |
doman doc/ping.8 |
167 |
|
168 |
if use arping ; then |
169 |
@@ -153,7 +161,6 @@ src_install() { |
170 |
pkg_postinst() { |
171 |
fcaps cap_net_raw \ |
172 |
bin/ping \ |
173 |
- $(usex ipv6 'bin/ping6' '') \ |
174 |
$(usex arping 'bin/arping' '') \ |
175 |
$(usex clockdiff 'usr/bin/clockdiff' '') |
176 |
} |