diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2016-05-21 03:14:59 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2016-05-21 03:14:59 +0200 |
commit | bbb99092d27c92491db9f84b3ea34933a5bff2f1 (patch) | |
tree | b4e4fbe1dc27736906a8f8cd0bce489f4c23614f /net-analyzer | |
parent | package.mask: add my name to dev-perl/Archive-Rar mask (diff) | |
download | gentoo-bbb99092d27c92491db9f84b3ea34933a5bff2f1.tar.gz gentoo-bbb99092d27c92491db9f84b3ea34933a5bff2f1.tar.bz2 gentoo-bbb99092d27c92491db9f84b3ea34933a5bff2f1.zip |
net-analyzer/net-snmp: Add revbump with fixes for Perl 5.24, bug 582368
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/net-snmp/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild | 192 |
2 files changed, 194 insertions, 0 deletions
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest index f261269351d8..021996c9aabb 100644 --- a/net-analyzer/net-snmp/Manifest +++ b/net-analyzer/net-snmp/Manifest @@ -1,2 +1,4 @@ DIST net-snmp-5.7.3-patches-2.tar.xz 3312 SHA256 a72732f9e40988ef1d79b6750c7ef7f56accbf5a32543dd15c000e58b1e9054c SHA512 22ca6cc4dd1fd58a8cff53881d248155dbfdab765e9a3664320c8c4a5cfa35e741adfb0304bb38be7719ba1c7418f9b0f9178719951b82d70257c3c944c450ad WHIRLPOOL 509da418db4c380f431af1d2d342bea4bd18caad99f2fb8120466ffcbbe8d2e09702a28b43b59d2a633ae3566d599a82a221eae4e9ac601a545445c614d3459f +DIST net-snmp-5.7.3-perl524-2.patch.gz 523 SHA256 237e34a5de032c2173de836ef694583d144717b3441903a7c52f409c0038ca08 SHA512 bede47234b809d67f33c46654f3d09d0b255d835fb97eea23bfa888922dfb80ad287c305596a6b041ed03ec91dc7c647ecd54c3c79e0b4ce08978332de3cc007 WHIRLPOOL c81e8dd2234b090c48e1adfa075d5817263364ade0e39e59c2ecf99e1a3862e6eac70cbfc7eef592de12ecc02d66baf9ae651e2f085936dde4d38f975aef0aed +DIST net-snmp-5.7.3-perl524.patch.gz 9072 SHA256 e8dfa8546aafc4afa03f8e26d330b92f22ded0674c68a4083bd3c8fb9ad5a418 SHA512 2d3184ac7c96f75af5bf8c8d23f33d5636c701e052a638e5403a8d5aa34985abc38f6a366ba09a1d8499a05fd71d939a7ed4d530661e56a726386603b6f6e6a4 WHIRLPOOL de180f600feeb94ae1cfd6b2e74f96c59618bc0696938e96d93163cd3b0a33c5426bbc2e6523b75cdaadf10018c07806cc8bd79f9c94593633915b33a2d6278a DIST net-snmp-5.7.3.tar.gz 6382428 SHA256 12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0 SHA512 0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b25679a6bd0f049bb WHIRLPOOL ee741c1278206dd8dae00e085629e7c13ce518ad1911af804872ccaba576ab4d234f7801dbb447ae1ddba8196d43d1dbcd46c4bd8f69aa9dc9eb1662ce5e718a diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild new file mode 100644 index 000000000000..e3f672ebe1e6 --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=2 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 eutils perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://net-snmp.sourceforge.net/" +SRC_URI=" + mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz + https://dev.gentoo.org/~dilfridge/distfiles/${P}-perl524.patch.gz + https://dev.gentoo.org/~dilfridge/distfiles/${P}-perl524-2.patch.gz +" + +S=${WORKDIR}/${P/_/.} + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="X bzip2 doc elf ipv6 libressl lm_sensors mfd-rewrites minimal mysql netlink pci perl python rpm selinux smux ssl tcpd ucd-compat zlib" + +COMMON_DEPEND=" + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0 ) + libressl? ( dev-libs/libressl ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + bzip2? ( app-arch/bzip2 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) + elf? ( dev-libs/elfutils ) + python? ( + dev-python/setuptools[${PYTHON_USEDEP}] + ${PYTHON_DEPS} + ) + pci? ( sys-apps/pciutils ) + lm_sensors? ( sys-apps/lm_sensors ) + netlink? ( dev-libs/libnl:3 ) + mysql? ( virtual/mysql ) + perl? ( dev-lang/perl:= ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" + +RESTRICT=test + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + epatch "${WORKDIR}"/${P}-perl524.patch + epatch "${WORKDIR}"/${P}-perl524-2.patch + + epatch "${WORKDIR}"/patches/*.patch + + epatch_user + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + emake \ + OTHERLDFLAGS="${LDFLAGS}" \ + sedscript all + + use doc && emake docsdox +} + +src_install () { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + use doc && dohtml docs/html/* + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi +} |