Skip to content

Commit

Permalink
mtr: Fix compile with libcap
Browse files Browse the repository at this point in the history
Selecting libcap in addition to mtr causes it to error with

Package mtr is missing dependencies for the following libraries:
libcap.so.2

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Jul 28, 2018
1 parent fdc8c1b commit b83ab1d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
16 changes: 4 additions & 12 deletions net/mtr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=mtr
PKG_VERSION:=0.92
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Jonathan McCrohan <[email protected]>

Expand All @@ -32,7 +32,7 @@ define Package/mtr
CATEGORY:=Network
DEPENDS:=+libncurses
TITLE:=Full screen ncurses traceroute tool
URL:=http://www.bitwizard.nl/mtr/
URL:=https://www.bitwizard.nl/mtr/
endef

define Package/mtr/description
Expand All @@ -48,25 +48,17 @@ endef

CONFIGURE_ARGS += \
--without-gtk \
--without-glib \
$(call autoconf_bool,CONFIG_IPV6,ipv6)

define Build/Configure
(cd $(PKG_BUILD_DIR); touch \
configure.in \
aclocal.m4 \
Makefile.in \
img/Makefile.in \
stamp-h.in \
config.h.in \
configure \
);
echo $(PKG_VERSION) > .tarball-version
$(call Build/Configure/Default)
endef

define Package/mtr/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr-packet $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,mtr))
15 changes: 15 additions & 0 deletions net/mtr/patches/010-remove-libcap-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/configure.ac b/configure.ac
index a08ce67..83bf094 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,10 +106,6 @@ AS_IF([test "x$with_ncurses" = "xyes"],
])
AM_CONDITIONAL([WITH_CURSES], [test "x$with_ncurses" = xyes])

-AC_CHECK_LIB([cap], [cap_set_proc], [],
- AS_IF([test "$host_os" = linux-gnu],
- AC_MSG_WARN([Capabilities support is strongly recommended for increased security. See SECURITY for more information.])))
-
# Enable ipinfo
AC_ARG_WITH([ipinfo],
[AS_HELP_STRING([--without-ipinfo], [Do not try to use ipinfo lookup at all])],

0 comments on commit b83ab1d

Please sign in to comment.