summaryrefslogtreecommitdiff
path: root/net-libs/liboping
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-libs/liboping
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/liboping')
-rw-r--r--net-libs/liboping/Manifest9
-rw-r--r--net-libs/liboping/files/liboping-1.6.2-nouidmagic.patch19
-rw-r--r--net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch94
-rw-r--r--net-libs/liboping/liboping-1.10.0.ebuild73
-rw-r--r--net-libs/liboping/liboping-1.9.0.ebuild74
-rw-r--r--net-libs/liboping/metadata.xml19
6 files changed, 288 insertions, 0 deletions
diff --git a/net-libs/liboping/Manifest b/net-libs/liboping/Manifest
new file mode 100644
index 000000000000..cd75d802db7f
--- /dev/null
+++ b/net-libs/liboping/Manifest
@@ -0,0 +1,9 @@
+AUX liboping-1.6.2-nouidmagic.patch 741 SHA256 7219f14fc27afa1712cdc2c65ca0d9b0266382d0b40c174d0f8ac2cac71e532f SHA512 d991b2871091c3e92d6b194bfdaa77db34455aec3c32087fff0a02ccee0e1f6fa0e0453a61d28a0fc9549644359f91425efef0b94e37c033d4d43b12bbd7b07d WHIRLPOOL 81fefddd0c3a7390b2d82d45b875e5878df1ef315b02c1af01a0d1f7bab2f7c8e82135fd4a2bf19fe69e5c2e788a04c92232a4e9939fe5f61f7ea1f647cb198f
+AUX liboping-1.8.0-remove-ncurses-automagic.patch 3192 SHA256 494c2a681d5cbc548cc3fbb97b50140b18173150eda2517a53db7b499f658331 SHA512 6bed10c7963f0ae3442e4ff4523985c61b8b8acca8bb39b511fb30b25133d50d31c642d181157216d903c647e585989e08892c4f61ffd9ee9964050769a8a656 WHIRLPOOL 1afe5d4ee0aa555b2ce6f7da97c06a229a3cdfb8e3e891ee7ec20fd0f57f92d9c28db7e31ddd0d1c817bb10f24a27e9bd6e2960aee19da216282ed5ff51a2b45
+DIST liboping-1.10.0.tar.bz2 318150 SHA256 eb38aa93f93e8ab282d97e2582fbaea88b3f889a08cbc9dbf20059c3779d5cd8 SHA512 f1e9984cf0c1df89b29f7bc657c19a5439019db7643680744d8f353664b6a53070581f40b51e72f896c7df88799c6868257f6308e1a9d84b4d2a0666491214d8 WHIRLPOOL 59562503d30b1e05d0052e28d5d93cc3379e03528376a056f7d64d588154d9ab75cb9a2f2c3725f8968900db3b731bbeca7e93d565f641bda2393b14c411f7c1
+DIST liboping-1.9.0.tar.bz2 313884 SHA256 44bb1d88b56b88fda5533edb3aa005c69b3cd396f20453a157d7e31e536f3530 SHA512 dcbadeea5154d4f4c31f806cae4ee5b8d5a8dfe243a9de4dad4b81b5b227538e1bb0c20afef121bd8ad841346da39fd5fb4710db981b89c11acc573c4f401c85 WHIRLPOOL 11421367b3e5128a0158ab76305bde2431dd3e2e2e0f8665cc5fbf9871a0a60fab6e1887d4a3537cc5d1e56dbf1431d6b51885b0c93e25b21e93c9e0b678834d
+EBUILD liboping-1.10.0.ebuild 1318 SHA256 80408d9159acf456f190a5a80c6d048ee62e0fd959b0ed83520adac840a32022 SHA512 02c9caa3d48f8d0a9d4fec7fd49bdc2692ff5131d2f3b12a3d9d0b87077131ff757f1ad211da534dae6de5097fc32f015b2cc1b3394ea8ebe5ca5999d67b69da WHIRLPOOL 0fe8c9ba6ec6c0e8b23f3b44f69cc4be1a307ae34b7145d58b1c07a2fd2e69316ea04766ddb5eeb20b2ef67e83845aa3a27109d140bf8b5eae8cbc4309eab457
+EBUILD liboping-1.9.0.ebuild 1376 SHA256 2baff908b6017843d45f82e6509689af3c464114300289ce9d9567a4bb1c6916 SHA512 e05c4fef6b9ec848e8e0deafa3026944dcf9840420ac47c11d20f6579da9c0fcf61d568807a60ed3b9068373df1df95df79002a70547688f4bf69a5407c0a97a WHIRLPOOL a7ccac2fbe492ffaec733f01c3d7a5f24c1075591877a2879aec725a3b4243ad8490728d4abbb989b29342277e5e78358c3252202cff886dcf39bceb64b63763
+MISC ChangeLog 2847 SHA256 2b30332a54b2e487853cabfc5f43dce8151469b016f770a9068713d2861261ab SHA512 cf19e2542282ef9c1b8a4d12e4c10d10a42d8f086b8357cc28d80c9815de8802f6a7694a79c7cfb777cb16d7fbad94a2a489626ede7bb667d1f8b181711b475b WHIRLPOOL 8cd2992d50192d03ec18aedb2cb6a9637ef25a54c80cd140cc5bd3536378ff47bde9ab58795577f32cf59785cfd45a343090e1c4dcb3948e407cc1958888dc39
+MISC ChangeLog-2015 2918 SHA256 f5e56429f89d845a04e7881cb6295869d10d224e7cef9473aed9865c8d09f690 SHA512 1f09b1ae06ee6aaba6154bb7461b500095ea15dc92120989e97dfb97c029f04c744c1238d03a82b4be3d01e681c4733dd737334f527fdee61f20e9512a74cead WHIRLPOOL d88f3fa9fdc1483cecfe219841a62d9318e2d53ee03ecafcf534f9cf2c692ef2323296478fb706c527577261e63cca2d67435e65ac7d7c81c446c97b401a7dfe
+MISC metadata.xml 717 SHA256 0dc99c08be3618017e22365f4810b253c0fea0f4d9a227764b3369c0af84d417 SHA512 ef68e308920311969fc83de9e82e6e97648b5376819a5a122e1aa4c68ef3f6ae0bad6dc95a28eb4629f8915c4658facbeabc7740df090cff2598b5ebbd049edd WHIRLPOOL e479c0d67ca76967427d79fb29cf52ae4b5bedd7fd0553fc4c9deb6fa47b63728f815b31a18995d6baf9d6880c214881c26bbd6c90b2f21d3487c43ec445a31e
diff --git a/net-libs/liboping/files/liboping-1.6.2-nouidmagic.patch b/net-libs/liboping/files/liboping-1.6.2-nouidmagic.patch
new file mode 100644
index 000000000000..2cb1b25e12e0
--- /dev/null
+++ b/net-libs/liboping/files/liboping-1.6.2-nouidmagic.patch
@@ -0,0 +1,19 @@
+diff -ruN liboping-1.6.2.orig/src/Makefile.am liboping-1.6.2/src/Makefile.am
+--- liboping-1.6.2.orig/src/Makefile.am 2012-01-31 17:20:44.000000000 +0100
++++ liboping-1.6.2/src/Makefile.am 2012-06-11 21:21:08.000000000 +0200
+@@ -52,15 +52,3 @@
+ endif
+ endif # BUILD_WITH_LIBNCURSES
+
+-install-exec-hook:
+- @if test "x0" = "x$$UID"; then \
+- if test "xLinux" = "x`uname -s`"; then \
+- echo "Setting CAP_NET_RAW capability on binaries."; \
+- setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping || true; \
+- setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping || true; \
+- else \
+- echo "Setting set-UID bit on binaries."; \
+- chmod u+s $(DESTDIR)$(bindir)/oping || true; \
+- chmod u+s $(DESTDIR)$(bindir)/noping || true; \
+- fi; \
+- fi
diff --git a/net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch b/net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch
new file mode 100644
index 000000000000..67e389ff139c
--- /dev/null
+++ b/net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch
@@ -0,0 +1,94 @@
+configure: Make use of ncurses configurable
+
+https://github.com/octo/liboping/pull/15
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -206,27 +206,30 @@ AC_CHECK_FUNCS(nanosleep, [],
+ AC_MSG_ERROR(cannot find nanosleep)))
+ AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
+
+-with_ncurses="no"
+-AC_CHECK_HEADERS(ncursesw/ncurses.h ncurses.h, [with_ncurses="yes"], [])
+-if test "x$with_ncurses" = "xyes"
+-then
+- have_ncursesw="no"
+- have_ncurses="no"
+- NCURSES_LIB=""
++AC_ARG_WITH(ncurses, AS_HELP_STRING([--with-ncurses], [Build oping CLI tool with ncurses support]))
++AS_IF([test "x$with_ncurses" != "xno"], [
++ can_build_with_ncurses="no"
++ PKG_CHECK_MODULES([NCURSES], [ncursesw], [can_build_with_ncurses=yes], [
++ PKG_CHECK_MODULES([NCURSES], [ncurses], [can_build_with_ncurses=yes], [
++ AC_CHECK_LIB(ncursesw, mvwprintw, [NCURSES_LIBS="-lncursesw"; can_build_with_ncurses=yes], [
++ AC_CHECK_LIB(ncurses, mvwprintw, [NCURSES_LIBS="-lncurses"; can_build_with_ncurses=yes])
++ ])
++ ])
++ ])
+
+- AC_CHECK_LIB(ncursesw, mvwprintw, [have_ncursesw="yes"], [have_ncursesw="no"])
+- AC_CHECK_LIB(ncurses, mvwprintw, [have_ncurses="yes"], [have_ncurses="no"])
++ AS_IF([test "x$can_build_with_ncurses" = "xyes"], [
++ AC_CHECK_HEADERS([ncursesw/curses.h ncursesw.h ncurses/curses.h ncurses.h], [can_build_with_ncurses=yes; break;], [can_build_with_ncurses=no])
++ ])
+
+- if test "x$have_ncursesw" = "xyes"; then
+- NCURSES_LIB="-lncursesw"
+- else if test "x$have_ncurses" = "xyes"; then
+- NCURSES_LIB="-lncurses"
+- else
+- with_ncurses="no"
+- fi; fi
+- AC_SUBST(NCURSES_LIB)
+-fi
+-AM_CONDITIONAL(BUILD_WITH_LIBNCURSES, test "x$with_ncurses" = "xyes")
++ AS_IF([test "x$can_build_with_ncurses" = "xno" && test "x$with_ncurses" = "xyes"], [
++ AC_MSG_ERROR([ncurses not found but explicit enabled])
++ ],
++ [test "x$can_build_with_ncurses" = "xno"], [
++ AC_MSG_WARN([Will not build oping with ncurses support -- no suiteable ncurses installation found])
++ ])
++])
++
++AM_CONDITIONAL(BUILD_WITH_LIBNCURSES, test "x$with_ncurses" != "xno" && test "x$can_build_with_ncurses" = "xyes")
+
+ AC_FUNC_STRERROR_R
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -43,8 +43,8 @@ if BUILD_WITH_LIBNCURSES
+ bin_PROGRAMS += noping
+
+ noping_SOURCES = oping.c
+-noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1
+-noping_LDADD = liboping.la -lm $(NCURSES_LIB)
++noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1 $(NCURSES_CFLAGS)
++noping_LDADD = liboping.la -lm $(NCURSES_LIBS)
+ if BUILD_WITH_LIBRT
+ noping_LDADD += -lrt
+ endif
+--- a/src/oping.c
++++ b/src/oping.c
+@@ -82,11 +82,17 @@
+ /* http://newsgroups.derkeiler.com/Archive/Rec/rec.games.roguelike.development/2010-09/msg00050.html */
+ # define _X_OPEN_SOURCE_EXTENDED
+
+-# if HAVE_NCURSESW_NCURSES_H
+-# include <ncursesw/ncurses.h>
+-# elif HAVE_NCURSES_H
++#if defined HAVE_NCURSESW_CURSES_H
++# include <ncursesw/curses.h>
++#elif defined HAVE_NCURSESW_H
++# include <ncursesw.h>
++#elif defined HAVE_NCURSES_CURSES_H
++# include <ncurses/curses.h>
++#elif defined HAVE_NCURSES_H
+ # include <ncurses.h>
+-# endif
++#else
++# error "SysV or X/Open-compatible Curses header file required"
++#endif
+
+ # define OPING_GREEN 1
+ # define OPING_YELLOW 2
+--
diff --git a/net-libs/liboping/liboping-1.10.0.ebuild b/net-libs/liboping/liboping-1.10.0.ebuild
new file mode 100644
index 000000000000..b88e223a1751
--- /dev/null
+++ b/net-libs/liboping/liboping-1.10.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools fcaps perl-module
+
+DESCRIPTION="Protocol independent ANSI-C ping library and command line utility"
+HOMEPAGE="https://noping.cc/"
+SRC_URI="https://noping.cc/files/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/0.3"
+KEYWORDS="amd64 arm x86"
+IUSE="+filecaps ncurses perl"
+
+DEPEND="ncurses? ( sys-libs/ncurses:0= )"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.6.2-nouidmagic.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with perl perl-bindings INSTALLDIRS=vendor) \
+ $(use_with ncurses)
+}
+
+src_test() {
+ if use perl; then
+ pushd bindings/perl >/dev/null || die
+ perl-module_src_test
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ find "${ED}"usr/lib* -name '*.la' -o -name '*.a' -delete || die
+}
+
+pkg_postinst() {
+ if use filecaps; then
+ local _caps_str="CAP_NET_RAW"
+ _files=( "${EROOT%/}/usr/bin/oping")
+
+ if use ncurses; then
+ _files+=( "${EROOT%/}/usr/bin/noping")
+ fi
+
+ fcaps "${_caps_str}" "${_files[@]}"
+
+ elog "Capabilities for"
+ elog ""
+
+ local _file=
+ for _file in "${_files[@]}"; do
+ elog " ${_file}"
+ done
+
+ elog ""
+ elog "set to ${_caps_str}+EP due to set 'filecaps' USE flag."
+ elog
+ fi
+}
diff --git a/net-libs/liboping/liboping-1.9.0.ebuild b/net-libs/liboping/liboping-1.9.0.ebuild
new file mode 100644
index 000000000000..38199e61630e
--- /dev/null
+++ b/net-libs/liboping/liboping-1.9.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools fcaps perl-module
+
+DESCRIPTION="Protocol independent ANSI-C ping library and command line utility"
+HOMEPAGE="https://noping.cc/"
+SRC_URI="https://noping.cc/files/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/0.2"
+KEYWORDS="amd64 arm x86"
+IUSE="+filecaps ncurses perl"
+
+DEPEND="ncurses? ( sys-libs/ncurses:0= )"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.6.2-nouidmagic.patch"
+ "${FILESDIR}/${PN}-1.8.0-remove-ncurses-automagic.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with perl perl-bindings INSTALLDIRS=vendor) \
+ $(use_with ncurses)
+}
+
+src_test() {
+ if use perl; then
+ pushd bindings/perl >/dev/null || die
+ perl-module_src_test
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ find "${ED}"usr/lib* -name '*.la' -o -name '*.a' -delete || die
+}
+
+pkg_postinst() {
+ if use filecaps; then
+ local _caps_str="CAP_NET_RAW"
+ _files=( "${EROOT%/}/usr/bin/oping")
+
+ if use ncurses; then
+ _files+=( "${EROOT%/}/usr/bin/noping")
+ fi
+
+ fcaps "${_caps_str}" "${_files[@]}"
+
+ elog "Capabilities for"
+ elog ""
+
+ local _file=
+ for _file in "${_files[@]}"; do
+ elog " ${_file}"
+ done
+
+ elog ""
+ elog "set to ${_caps_str}+EP due to set 'filecaps' USE flag."
+ elog
+ fi
+}
diff --git a/net-libs/liboping/metadata.xml b/net-libs/liboping/metadata.xml
new file mode 100644
index 000000000000..521d84da2fe3
--- /dev/null
+++ b/net-libs/liboping/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>whissi@gentoo.org</email>
+ <name>Thomas Deutschmann</name>
+ </maintainer>
+ <slots>
+ <subslots>Reflect major ABI version (=upstream's LIBOPING_CURRENT value) of liboping.so.</subslots>
+ </slots>
+ <upstream>
+ <bugs-to>https://github.com/octo/liboping/issues</bugs-to>
+ <remote-id type="github">octo/liboping</remote-id>
+ </upstream>
+ <use>
+ <flag name="filecaps">Allow non-root users to use [n]oping utility.</flag>
+ <flag name="ncurses">Build ncurses-based version of oping utility (requires <pkg>sys-libs/ncurses</pkg>)</flag>
+ </use>
+</pkgmetadata>