diff options
author | vs <vs@FreeBSD.org> | 2004-05-08 19:20:46 +0800 |
---|---|---|
committer | vs <vs@FreeBSD.org> | 2004-05-08 19:20:46 +0800 |
commit | 4dc285eecbbc409987d31979eb56558e8cf28393 (patch) | |
tree | 18f26294e532c6f7e290a603a0e94c4fa08e4e3c | |
parent | 948bf91cc529782568c9e8355b0caab9fb37c087 (diff) | |
download | freebsd-ports-gnome-4dc285eecbbc409987d31979eb56558e8cf28393.tar.gz freebsd-ports-gnome-4dc285eecbbc409987d31979eb56558e8cf28393.tar.zst freebsd-ports-gnome-4dc285eecbbc409987d31979eb56558e8cf28393.zip |
- use gethostname() instead of uname(): the latter returns only returns
the first 32 chars of the hostname
- patch helper-script to generate less bogus intermediate output
- NB: This port will still register a wrong dependency on dns/host when
dns/bind is installed
-rw-r--r-- | net/xtraceroute/Makefile | 5 | ||||
-rw-r--r-- | net/xtraceroute/files/patch-main.c | 22 | ||||
-rw-r--r-- | net/xtraceroute/files/patch-share::xtraceroute-resolve-location.sh.in | 11 |
3 files changed, 37 insertions, 1 deletions
diff --git a/net/xtraceroute/Makefile b/net/xtraceroute/Makefile index e2af044e07d0..9bd5d9075edf 100644 --- a/net/xtraceroute/Makefile +++ b/net/xtraceroute/Makefile @@ -7,7 +7,7 @@ PORTNAME= xtraceroute PORTVERSION= 0.9.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= http://www.dtek.chalmers.se/~d3august/xt/dl/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DATAFILES} @@ -34,6 +34,9 @@ DATAFILES= ndg_files.tar.gz MAN1= xtraceroute.1 +post-patch: + @${TOUCH} ${WRKSRC}/po/* + post-install: ${INSTALL_DATA} ${WRKDIR}/hosts.cache ${PREFIX}/share/xtraceroute ${INSTALL_DATA} ${WRKDIR}/networks.cache ${PREFIX}/share/xtraceroute diff --git a/net/xtraceroute/files/patch-main.c b/net/xtraceroute/files/patch-main.c new file mode 100644 index 000000000000..3586cf2cee0a --- /dev/null +++ b/net/xtraceroute/files/patch-main.c @@ -0,0 +1,22 @@ +--- main.c.orig Fri May 7 13:50:04 2004 ++++ main.c Fri May 7 13:50:10 2004 +@@ -1215,15 +1215,14 @@ + { + float tmpquat[4]; + float vect[3] = {0.0, 1.0, 0.0}; +- struct utsname un; +- struct hostent* he; ++ char namebuf[256]; ++ struct hostent* he = NULL; + struct in_addr in; + + memset(&local, 0, sizeof(site)); + +- uname(&un); +- strcpy(local.name, un.nodename); +- he = gethostbyname(un.nodename); ++ if (gethostname(namebuf,256) == 0) ++ he = gethostbyname(namebuf); + if(!he) + { + printf("Error gethostbynaming local hostname"); diff --git a/net/xtraceroute/files/patch-share::xtraceroute-resolve-location.sh.in b/net/xtraceroute/files/patch-share::xtraceroute-resolve-location.sh.in new file mode 100644 index 000000000000..13f4ba00bdf0 --- /dev/null +++ b/net/xtraceroute/files/patch-share::xtraceroute-resolve-location.sh.in @@ -0,0 +1,11 @@ +--- share/xtraceroute-resolve-location.sh.in.orig Fri May 7 15:01:36 2004 ++++ share/xtraceroute-resolve-location.sh.in Fri May 7 15:01:57 2004 +@@ -34,7 +34,7 @@ + BIND) + FIRST=yes + #while target contains a dot. +- while [ `echo $TARGET | cut -s -f1- -d.` ] || [ $FIRST = yes ] ++ while [ -n "$TARGET" ] && [ `echo $TARGET | cut -s -f1- -d.` ] || [ $FIRST = yes ] + do + FIRST=no + #echo $TARGET |