diff options
author | mat <mat@FreeBSD.org> | 2016-06-21 00:23:28 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2016-06-21 00:23:28 +0800 |
commit | bc12b6beb26907f267f34c1f8598d120cabecbae (patch) | |
tree | e83ee6693050a76e305a95a376451aa583df151e /net-mgmt | |
parent | 5616a93eb39854a280bacec86824bbec7824d5b3 (diff) | |
download | freebsd-ports-graphics-bc12b6beb26907f267f34c1f8598d120cabecbae.tar.gz freebsd-ports-graphics-bc12b6beb26907f267f34c1f8598d120cabecbae.tar.zst freebsd-ports-graphics-bc12b6beb26907f267f34c1f8598d120cabecbae.zip |
With the power of USES=dos2unix, get rid of most patches and files
with CRLF.
While there, run make makepatch, rename patches to use the new scheme,
and various fixes.
With hat: portmgr
Sponsored by: Absolight
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/cdpr/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/cdpr/files/patch-cdpr.c | 10 | ||||
-rw-r--r-- | net-mgmt/cdpr/files/patch-conffile.c | 36 |
3 files changed, 25 insertions, 23 deletions
diff --git a/net-mgmt/cdpr/Makefile b/net-mgmt/cdpr/Makefile index 077efaaae6e..0596578becb 100644 --- a/net-mgmt/cdpr/Makefile +++ b/net-mgmt/cdpr/Makefile @@ -9,6 +9,8 @@ MASTER_SITES= SF MAINTAINER= mich@FreeBSD.org COMMENT= Cisco Discovery Protocol Reporter +USES= dos2unix +DOS2UNIX_GLOB= *.c *.h LDFLAGS+= -L${LOCALBASE}/lib -lpcap DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} diff --git a/net-mgmt/cdpr/files/patch-cdpr.c b/net-mgmt/cdpr/files/patch-cdpr.c index 8c591de71e7..3a83c518fad 100644 --- a/net-mgmt/cdpr/files/patch-cdpr.c +++ b/net-mgmt/cdpr/files/patch-cdpr.c @@ -1,6 +1,6 @@ ---- cdpr.c.orig Wed Nov 19 17:53:13 2003 -+++ cdpr.c Wed Nov 19 17:54:06 2003 -@@ -639,7 +639,7 @@ +--- cdpr.c.orig 2016-06-20 14:44:21 UTC ++++ cdpr.c +@@ -641,7 +641,7 @@ main(int argc, char *argv[]) pcap_lookupnet(dev, &net, &mask, errbuf); /* Open the pcap device */ @@ -9,7 +9,7 @@ { printf("Error opening device (%s)\n", errbuf); exit(1); -@@ -656,11 +656,6 @@ +@@ -658,11 +658,6 @@ main(int argc, char *argv[]) pcap_setfilter(handle, &filter); pcap_freecode(&filter); @@ -21,7 +21,7 @@ /* Get the next packet that comes in, we only need one */ printf("Waiting for CDP advertisement:\n"); -@@ -671,11 +666,7 @@ +@@ -673,11 +668,7 @@ main(int argc, char *argv[]) do { packet = pcap_next(handle, &header); diff --git a/net-mgmt/cdpr/files/patch-conffile.c b/net-mgmt/cdpr/files/patch-conffile.c index 0ca7c053adc..ef5a7d1191a 100644 --- a/net-mgmt/cdpr/files/patch-conffile.c +++ b/net-mgmt/cdpr/files/patch-conffile.c @@ -1,19 +1,19 @@ ---- conffile.c.orig +--- conffile.c.orig 2016-06-20 14:44:21 UTC +++ conffile.c -@@ -57,6 +57,7 @@ - struct hostent *h;
- char *addy;
- int port;
-+ char *tport;
-
- if (ip && url)
- {
-@@ -70,7 +71,7 @@ - else
- {
- strtok(ip,":");
-- char *tport = strtok(NULL,":");
-+ tport = strtok(NULL,":");
- port = atoi(tport);
- }
- /*
+@@ -57,6 +57,7 @@ do_something_with (char *ip, char *url) + struct hostent *h; + char *addy; + int port; ++ char *tport; + + if (ip && url) + { +@@ -70,7 +71,7 @@ do_something_with (char *ip, char *url) + else + { + strtok(ip,":"); +- char *tport = strtok(NULL,":"); ++ tport = strtok(NULL,":"); + port = atoi(tport); + } + /* |