From 771c37fe46564409c7b41d56dcb1f2bb45dd6837 Mon Sep 17 00:00:00 2001 From: jbu Date: Mon, 29 Jun 2015 22:01:06 +0200 Subject: [PATCH] net-tools: unbreak musl --- srcpkgs/net-tools/template | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/srcpkgs/net-tools/template b/srcpkgs/net-tools/template index 767ca4608f7..b54c3f0f4f1 100644 --- a/srcpkgs/net-tools/template +++ b/srcpkgs/net-tools/template @@ -1,11 +1,11 @@ # Template file for 'net-tools' pkgname=net-tools -version=1.60.20140221git -revision=2 +version=1.60.20150526git +revision=1 hostmakedepends="git" short_desc="Basic networking tools" maintainer="Juan RP " -homepage="http://www.tazenda.demon.co.uk/phil/$pkgname" +homepage="http://sourceforge.net/projects/$pkgname/" license="GPL-2" do_fetch() { @@ -14,6 +14,29 @@ do_fetch() { pre_build() { sed -i "s#/sbin#/bin#" Makefile sed -i "s#/usr##" man/Makefile + case "$XBPS_TARGET_MACHINE" in + *-musl) + + # Include file is + sed -i ${wrksrc}/lib/inet6_gr.c \ + -e "s#netinet6/#linux/#" + sed -i ${wrksrc}/lib/inet6_sr.c \ + -e "s#netinet6/#linux/#" + + # HZ is defined in + sed -i ${wrksrc}/lib/inet_sr.c \ + -e "/#include /a #include " + sed -i ${wrksrc}/netstat.c \ + -e "/#include /a #include " + + # Need for tty constants and structure + sed -i ${wrksrc}/slattach.c \ + -e "/#include /a #include " + + # Disable obsolete non-glibc includes + sed -i ${wrksrc}/mii-tool.c \ + -e "s/#ifndef __GLIBC__/#if 0/" + esac } do_build() { replace_interpreter bash configure.sh