Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2014 14:31:14 +0000 (UTC)
From:      Sofian Brabez <sbz@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r347237 - in head/net/hexinject: . files
Message-ID:  <201403061431.s26EVEpN034779@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbz
Date: Thu Mar  6 14:31:13 2014
New Revision: 347237
URL: http://svnweb.freebsd.org/changeset/ports/347237
QAT: https://qat.redports.org/buildarchive/r347237/

Log:
  - Fix build with clang
  
  Reported by:	pkg-fallout

Added:
  head/net/hexinject/files/
  head/net/hexinject/files/patch-prettypacket.h   (contents, props changed)
Modified:
  head/net/hexinject/Makefile

Modified: head/net/hexinject/Makefile
==============================================================================
--- head/net/hexinject/Makefile	Thu Mar  6 14:23:28 2014	(r347236)
+++ head/net/hexinject/Makefile	Thu Mar  6 14:31:13 2014	(r347237)
@@ -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>

Added: head/net/hexinject/files/patch-prettypacket.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/hexinject/files/patch-prettypacket.h	Thu Mar  6 14:31:13 2014	(r347237)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403061431.s26EVEpN034779>