aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/pchar/Makefile15
-rw-r--r--net/pchar/files/patch-Pctest.h11
-rw-r--r--net/pchar/files/patch-PctestIpv4.h11
-rw-r--r--net/pchar/files/patch-PctestIpv6.h11
-rw-r--r--net/pchar/files/patch-main.cc20
-rw-r--r--net/pchar/pkg-plist6
6 files changed, 63 insertions, 11 deletions
diff --git a/net/pchar/Makefile b/net/pchar/Makefile
index 20e93cb2172a..d0986747d9dd 100644
--- a/net/pchar/Makefile
+++ b/net/pchar/Makefile
@@ -14,14 +14,19 @@ COMMENT= Sandia Internet path characterization tool
GNU_CONFIGURE= yes
MAN8= pchar.8
-.include <bsd.port.pre.mk>
-
CONFIGURE_ARGS= --with-pcap
+CONFIGURE_ENV+= ac_cv_sizeof_bool=1
+
+PLIST_FILES= sbin/pchar
+
+PORTDOCS= README CHANGES FAQ
+
+.include <bsd.port.options.mk>
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
post-install:
@${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} ; ${INSTALL_DATA} README CHANGES FAQ ${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/pchar/files/patch-Pctest.h b/net/pchar/files/patch-Pctest.h
new file mode 100644
index 000000000000..6260cf35a082
--- /dev/null
+++ b/net/pchar/files/patch-Pctest.h
@@ -0,0 +1,11 @@
+--- Pctest.h.orig 2005-02-13 05:32:18.000000000 +0900
++++ Pctest.h 2013-05-06 00:39:43.413338781 +0900
+@@ -86,7 +86,7 @@
+ virtual char *GetPrintableAddress() = 0;
+ virtual char *GetPrintableAddress(void *a) = 0;
+ virtual char *GetName(void *a) = 0;
+- virtual char *GetAddressFamilyString() = 0;
++ virtual const char *GetAddressFamilyString() = 0;
+ virtual int GetAddressFamily() = 0;
+
+ // Get input and output sockets needed
diff --git a/net/pchar/files/patch-PctestIpv4.h b/net/pchar/files/patch-PctestIpv4.h
new file mode 100644
index 000000000000..2e255a171fd4
--- /dev/null
+++ b/net/pchar/files/patch-PctestIpv4.h
@@ -0,0 +1,11 @@
+--- PctestIpv4.h.orig 2005-02-13 05:32:18.000000000 +0900
++++ PctestIpv4.h 2013-05-06 00:36:17.432762986 +0900
+@@ -77,7 +77,7 @@
+ virtual char *GetPrintableAddress();
+ virtual char *GetPrintableAddress(void *a);
+ virtual char *GetName(void *a);
+- virtual char *GetAddressFamilyString() { return "AF_INET"; };
++ virtual const char *GetAddressFamilyString() { return "AF_INET"; };
+ virtual int GetAddressFamily() { return (AF_INET); };
+
+ protected:
diff --git a/net/pchar/files/patch-PctestIpv6.h b/net/pchar/files/patch-PctestIpv6.h
new file mode 100644
index 000000000000..9f5d8d3cb10a
--- /dev/null
+++ b/net/pchar/files/patch-PctestIpv6.h
@@ -0,0 +1,11 @@
+--- PctestIpv6.h.orig 2005-02-13 05:32:18.000000000 +0900
++++ PctestIpv6.h 2013-05-06 00:36:41.683117194 +0900
+@@ -82,7 +82,7 @@
+ virtual char *GetPrintableAddress();
+ virtual char *GetPrintableAddress(void *a);
+ virtual char *GetName(void *a);
+- virtual char *GetAddressFamilyString() { return "AF_INET6"; }
++ virtual const char *GetAddressFamilyString() { return "AF_INET6"; }
+ virtual int GetAddressFamily() { return (AF_INET6); }
+
+ protected:
diff --git a/net/pchar/files/patch-main.cc b/net/pchar/files/patch-main.cc
new file mode 100644
index 000000000000..2076a5d07d3e
--- /dev/null
+++ b/net/pchar/files/patch-main.cc
@@ -0,0 +1,20 @@
+--- main.cc.orig 2005-02-13 05:32:18.000000000 +0900
++++ main.cc 2013-05-06 00:41:42.842653383 +0900
+@@ -292,7 +292,7 @@
+ //
+ // Output: ASCII representation of network protocol name.
+ //
+-char *GetPrintableNetworkProtocol(NetworkProtocolType np)
++const char *GetPrintableNetworkProtocol(NetworkProtocolType np)
+ {
+ switch (np) {
+ case (NetworkProtocolIpv4Udp):
+@@ -371,7 +371,7 @@
+ case 'b': {
+ Burst = atoi(optarg);
+ if (Burst < 1) {
+- fprintf(stderr, "Warning: burst size %d too small; resetting to 1\n");
++ fprintf(stderr, "Warning: burst size %u too small; resetting to 1\n", Burst);
+ Burst = 1;
+ }
+ break;
diff --git a/net/pchar/pkg-plist b/net/pchar/pkg-plist
deleted file mode 100644
index e4a1bfa531e0..000000000000
--- a/net/pchar/pkg-plist
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $FreeBSD$
-sbin/pchar
-%%PORTDOCS%%%%DOCSDIR%%/CHANGES
-%%PORTDOCS%%%%DOCSDIR%%/FAQ
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%@dirrm %%DOCSDIR%%