aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSofian Brabez <sbz@FreeBSD.org>2014-03-06 14:31:13 +0000
committerSofian Brabez <sbz@FreeBSD.org>2014-03-06 14:31:13 +0000
commit4650e5d6e43939d251da3f54512132871c2922c2 (patch)
tree5a014eff887d7403daae075682c829cb8a6ad279 /net
parent464921619b1941c702f8855c35794d0af6dfd940 (diff)
Notes
Diffstat (limited to 'net')
-rw-r--r--net/hexinject/Makefile18
-rw-r--r--net/hexinject/files/patch-prettypacket.h38
2 files changed, 45 insertions, 11 deletions
diff --git a/net/hexinject/Makefile b/net/hexinject/Makefile
index 56cbcf8c82db..6e64cef00b8e 100644
--- a/net/hexinject/Makefile
+++ b/net/hexinject/Makefile
@@ -8,25 +8,21 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= sbz@FreeBSD.org
-COMMENT= HexInject is a versatile packet injector and sniffer
+COMMENT= HexInject is a very versatile packet injector and sniffer
-LICENSE= BSD
+LICENSE= BSD2CLAUSE
+
+LIB_DEPENDS= libpcap.so:${PORTSDIR}/net/libpcap
PLIST_FILES= bin/${PORTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME}
-NO_STAGE= yes
post-patch:
+ ${REINPLACE_CMD} -e 's#gcc#${CC}#g' ${WRKSRC}/Makefile
${REINPLACE_CMD} -e '2s#-lpcap#-L${LOCALBASE}/lib -lpcap#' ${WRKSRC}/Makefile
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-
-.include <bsd.port.pre.mk>
-
-.if ${OSREL} < 8
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
-.endif
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/hexinject/files/patch-prettypacket.h b/net/hexinject/files/patch-prettypacket.h
new file mode 100644
index 000000000000..dfb3048fdec6
--- /dev/null
+++ b/net/hexinject/files/patch-prettypacket.h
@@ -0,0 +1,38 @@
+--- ./prettypacket.h.orig 2012-12-04 10:31:27.000000000 +0100
++++ ./prettypacket.h 2014-03-06 14:57:20.000000000 +0100
+@@ -102,7 +102,7 @@
+ * @param counter protocol number offset
+ * @return protocol number in host format
+ */
+-inline uint8_t protocol_8bit_extract(const char *packet_buffer, int counter) {
++uint8_t protocol_8bit_extract(const char *packet_buffer, int counter) {
+ return *(packet_buffer + counter);
+ }
+
+@@ -113,7 +113,7 @@
+ * @param counter protocol number offset
+ * @return protocol number in host format
+ */
+-inline uint16_t protocol_16bit_extract(const char *packet_buffer, int counter) {
++uint16_t protocol_16bit_extract(const char *packet_buffer, int counter) {
+ return ntohs(*((uint16_t *)(packet_buffer + counter)));
+ }
+
+@@ -123,7 +123,7 @@
+ * @param counter protocol number offset
+ * @return protocol number in host format
+ */
+-inline uint64_t protocol_48bit_extract(const char *packet_buffer, int counter) {
++uint64_t protocol_48bit_extract(const char *packet_buffer, int counter) {
+ uint64_t value = 0;
+
+ int i;
+@@ -144,7 +144,7 @@
+ * @param counter read bytes counter
+ * @param field_text description of the field
+ */
+-inline field_print (const char *packet_buffer, int field_size, int *counter, const char *field_text) {
++void field_print (const char *packet_buffer, int field_size, int *counter, const char *field_text) {
+
+ char *tmp_hexstr = raw_to_hexstr(packet_buffer + *counter, field_size);
+ *counter += field_size;