1 |
commit: b2f6635d7773958a92d502d57fabd9edfa185d59 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 1 08:38:00 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 1 08:40:38 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f6635d |
7 |
|
8 |
net-analyzer/net-snmp: add 5.9.2 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/855500 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/net-snmp/Manifest | 1 + |
14 |
.../files/net-snmp-5.9.2-fix-LDFLAGS.patch | 18 ++++++++++++++ |
15 |
...-snmp-99999999.ebuild => net-snmp-5.9.2.ebuild} | 29 +++++++++++++++------- |
16 |
...t-snmp-99999999.ebuild => net-snmp-9999.ebuild} | 29 +++++++++++++++------- |
17 |
4 files changed, 59 insertions(+), 18 deletions(-) |
18 |
|
19 |
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest |
20 |
index b4a54d47a08d..ebce48029c46 100644 |
21 |
--- a/net-analyzer/net-snmp/Manifest |
22 |
+++ b/net-analyzer/net-snmp/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c411af62b0f36acd3bb9251804893ed12f462a0c5bab828e309eeec7824def2dca8fa866350b90a62ec4f0df1141b51ecae SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636 |
25 |
DIST net-snmp-5.9.1.tar.gz 6781346 BLAKE2B 4242ca77372005f995dfd228bec51d35b6b0f8c0ab0e44ed40cdb3cc0578b64e97444ffcb074dceca30739deadb46e68f1c75e87d3f1768d81b5e084b0fc0f5f SHA512 ae158ab41961ee2064d85187337979e6ff6ba90f3136b8a960e9ae46ee1408d9d2f0c5c4dfc3a3302e6dbb357cddf1221489435288c4f52182a03e94a9e450c3 |
26 |
+DIST net-snmp-5.9.2.tar.gz 6646200 BLAKE2B 95af69d530d3f5267bb75165cc2cf72128547a14fe4148d20610a45d42298475fb4c553c1e4eff1ffb4a368b609868b0ca36530c0f3a98800cf6290707bb3fb7 SHA512 d67810b15c4956a28ccb4d9a3870604bc94e71247d9a8d3a9959041268122b3500cf68a7912cfb01a6cff27f3f4364cbd106629ab80c12974f694b6c548bde59 |
27 |
|
28 |
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.9.2-fix-LDFLAGS.patch b/net-analyzer/net-snmp/files/net-snmp-5.9.2-fix-LDFLAGS.patch |
29 |
new file mode 100644 |
30 |
index 000000000000..158d8f1b5bee |
31 |
--- /dev/null |
32 |
+++ b/net-analyzer/net-snmp/files/net-snmp-5.9.2-fix-LDFLAGS.patch |
33 |
@@ -0,0 +1,18 @@ |
34 |
+diff --git a/Makefile.top b/Makefile.top |
35 |
+index d6394ca..f5119b5 100644 |
36 |
+--- a/Makefile.top |
37 |
++++ b/Makefile.top |
38 |
+@@ -86,11 +86,11 @@ LIBCURRENT = 41 |
39 |
+ LIBAGE = 2 |
40 |
+ LIBREVISION = 0 |
41 |
+ |
42 |
+-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o |
43 |
++LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) $(LDFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o |
44 |
+ LIB_EXTENSION = la |
45 |
+ LIB_VERSION = |
46 |
+ LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir) |
47 |
+-LINK = $(LIBTOOL) --mode=link $(LINKCC) |
48 |
++LINK = $(LIBTOOL) --mode=link $(LINKCC) $(LDFLAGS) |
49 |
+ # RANLIB = @RANLIB@ |
50 |
+ RANLIB = : |
51 |
+ |
52 |
|
53 |
diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-5.9.2.ebuild |
54 |
similarity index 86% |
55 |
copy from net-analyzer/net-snmp/net-snmp-99999999.ebuild |
56 |
copy to net-analyzer/net-snmp/net-snmp-5.9.2.ebuild |
57 |
index 80a7944c40df..ca95665fcf9a 100644 |
58 |
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild |
59 |
+++ b/net-analyzer/net-snmp/net-snmp-5.9.2.ebuild |
60 |
@@ -1,7 +1,7 @@ |
61 |
-# Copyright 1999-2021 Gentoo Authors |
62 |
+# Copyright 1999-2022 Gentoo Authors |
63 |
# Distributed under the terms of the GNU General Public License v2 |
64 |
|
65 |
-EAPI=7 |
66 |
+EAPI=8 |
67 |
|
68 |
DISTUTILS_OPTIONAL=yes |
69 |
DISTUTILS_SINGLE_IMPL=yes |
70 |
@@ -9,12 +9,21 @@ GENTOO_DEPEND_ON_PERL=no |
71 |
PYTHON_COMPAT=( python3_{8..10} ) |
72 |
WANT_AUTOMAKE=none |
73 |
|
74 |
-inherit autotools distutils-r1 git-r3 perl-module systemd |
75 |
+inherit autotools distutils-r1 perl-module systemd |
76 |
|
77 |
DESCRIPTION="Software for generating and retrieving SNMP data" |
78 |
-HOMEPAGE="http://www.net-snmp.org/" |
79 |
-EGIT_REPO_URI="https://github.com/net-snmp/net-snmp" |
80 |
-SRC_URI="https://dev.gentoo.org/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz" |
81 |
+HOMEPAGE="https://www.net-snmp.org/" |
82 |
+if [[ ${PV} == 9999 ]] ; then |
83 |
+ EGIT_REPO_URI="https://github.com/net-snmp/net-snmp" |
84 |
+ inherit git-r3 |
85 |
+else |
86 |
+ # https://github.com/net-snmp/net-snmp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz |
87 |
+ SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" |
88 |
+ |
89 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
90 |
+fi |
91 |
+ |
92 |
+SRC_URI+=" https://dev.gentoo.org/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz" |
93 |
|
94 |
# GPL-2 for the init scripts |
95 |
LICENSE="HPND BSD GPL-2" |
96 |
@@ -67,13 +76,13 @@ RDEPEND=" |
97 |
" |
98 |
|
99 |
PATCHES=( |
100 |
- "${FILESDIR}"/${PN}-5.7.3-include-limits.patch |
101 |
"${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch |
102 |
"${FILESDIR}"/${PN}-5.8-pcap.patch |
103 |
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch |
104 |
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch |
105 |
"${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch |
106 |
"${FILESDIR}"/${PN}-5.9-MakeMaker.patch |
107 |
+ "${FILESDIR}"/${PN}-5.9.2-fix-LDFLAGS.patch |
108 |
"${FILESDIR}"/${PN}-99999999-tinfo.patch |
109 |
) |
110 |
|
111 |
@@ -83,15 +92,18 @@ pkg_setup() { |
112 |
|
113 |
src_unpack() { |
114 |
default |
115 |
- git-r3_src_unpack |
116 |
+ |
117 |
+ [[ ${PV} == 9999 ]] && git-r3_src_unpack |
118 |
} |
119 |
|
120 |
src_prepare() { |
121 |
# snmpconf generates config files with proper selinux context |
122 |
use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch |
123 |
|
124 |
+ mv "${WORKDIR}"/patches/0001-Fix-toolchain-quadruplet-detection-Gentoo-bug-432004.patch{,.disabled} || die |
125 |
mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die |
126 |
mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die |
127 |
+ mv "${WORKDIR}"/patches/0005-Respect-LDFLAGS-properly.patch{,.disabled} || die |
128 |
eapply "${WORKDIR}"/patches/*.patch |
129 |
|
130 |
default |
131 |
@@ -127,7 +139,6 @@ src_configure() { |
132 |
$(use_with ssl openssl) \ |
133 |
$(use_with tcpd libwrap) \ |
134 |
$(use_with zlib) \ |
135 |
- --disable-static \ |
136 |
--enable-shared \ |
137 |
--with-default-snmp-version="3" \ |
138 |
--with-ldflags="${LDFLAGS}" \ |
139 |
|
140 |
diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-9999.ebuild |
141 |
similarity index 86% |
142 |
rename from net-analyzer/net-snmp/net-snmp-99999999.ebuild |
143 |
rename to net-analyzer/net-snmp/net-snmp-9999.ebuild |
144 |
index 80a7944c40df..ca95665fcf9a 100644 |
145 |
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild |
146 |
+++ b/net-analyzer/net-snmp/net-snmp-9999.ebuild |
147 |
@@ -1,7 +1,7 @@ |
148 |
-# Copyright 1999-2021 Gentoo Authors |
149 |
+# Copyright 1999-2022 Gentoo Authors |
150 |
# Distributed under the terms of the GNU General Public License v2 |
151 |
|
152 |
-EAPI=7 |
153 |
+EAPI=8 |
154 |
|
155 |
DISTUTILS_OPTIONAL=yes |
156 |
DISTUTILS_SINGLE_IMPL=yes |
157 |
@@ -9,12 +9,21 @@ GENTOO_DEPEND_ON_PERL=no |
158 |
PYTHON_COMPAT=( python3_{8..10} ) |
159 |
WANT_AUTOMAKE=none |
160 |
|
161 |
-inherit autotools distutils-r1 git-r3 perl-module systemd |
162 |
+inherit autotools distutils-r1 perl-module systemd |
163 |
|
164 |
DESCRIPTION="Software for generating and retrieving SNMP data" |
165 |
-HOMEPAGE="http://www.net-snmp.org/" |
166 |
-EGIT_REPO_URI="https://github.com/net-snmp/net-snmp" |
167 |
-SRC_URI="https://dev.gentoo.org/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz" |
168 |
+HOMEPAGE="https://www.net-snmp.org/" |
169 |
+if [[ ${PV} == 9999 ]] ; then |
170 |
+ EGIT_REPO_URI="https://github.com/net-snmp/net-snmp" |
171 |
+ inherit git-r3 |
172 |
+else |
173 |
+ # https://github.com/net-snmp/net-snmp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz |
174 |
+ SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" |
175 |
+ |
176 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
177 |
+fi |
178 |
+ |
179 |
+SRC_URI+=" https://dev.gentoo.org/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz" |
180 |
|
181 |
# GPL-2 for the init scripts |
182 |
LICENSE="HPND BSD GPL-2" |
183 |
@@ -67,13 +76,13 @@ RDEPEND=" |
184 |
" |
185 |
|
186 |
PATCHES=( |
187 |
- "${FILESDIR}"/${PN}-5.7.3-include-limits.patch |
188 |
"${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch |
189 |
"${FILESDIR}"/${PN}-5.8-pcap.patch |
190 |
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch |
191 |
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch |
192 |
"${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch |
193 |
"${FILESDIR}"/${PN}-5.9-MakeMaker.patch |
194 |
+ "${FILESDIR}"/${PN}-5.9.2-fix-LDFLAGS.patch |
195 |
"${FILESDIR}"/${PN}-99999999-tinfo.patch |
196 |
) |
197 |
|
198 |
@@ -83,15 +92,18 @@ pkg_setup() { |
199 |
|
200 |
src_unpack() { |
201 |
default |
202 |
- git-r3_src_unpack |
203 |
+ |
204 |
+ [[ ${PV} == 9999 ]] && git-r3_src_unpack |
205 |
} |
206 |
|
207 |
src_prepare() { |
208 |
# snmpconf generates config files with proper selinux context |
209 |
use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch |
210 |
|
211 |
+ mv "${WORKDIR}"/patches/0001-Fix-toolchain-quadruplet-detection-Gentoo-bug-432004.patch{,.disabled} || die |
212 |
mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die |
213 |
mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die |
214 |
+ mv "${WORKDIR}"/patches/0005-Respect-LDFLAGS-properly.patch{,.disabled} || die |
215 |
eapply "${WORKDIR}"/patches/*.patch |
216 |
|
217 |
default |
218 |
@@ -127,7 +139,6 @@ src_configure() { |
219 |
$(use_with ssl openssl) \ |
220 |
$(use_with tcpd libwrap) \ |
221 |
$(use_with zlib) \ |
222 |
- --disable-static \ |
223 |
--enable-shared \ |
224 |
--with-default-snmp-version="3" \ |
225 |
--with-ldflags="${LDFLAGS}" \ |