pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/ntopng



Module Name:    pkgsrc
Committed By:   fhajny
Date:           Thu Jun 15 14:54:45 UTC 2017

Modified Files:
        pkgsrc/net/ntopng: Makefile distinfo
        pkgsrc/net/ntopng/patches: patch-include_ntop__includes.h
            patch-src_PacketDumperTuntap.cpp
Added Files:
        pkgsrc/net/ntopng/patches: patch-src_Utils.cpp
            patch-third-party_snmp_net.c

Log Message:
Add rudimentary SunOS support.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/net/ntopng/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/ntopng/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/net/ntopng/patches/patch-include_ntop__includes.h \
    pkgsrc/net/ntopng/patches/patch-src_PacketDumperTuntap.cpp
cvs rdiff -u -r0 -r1.1 pkgsrc/net/ntopng/patches/patch-src_Utils.cpp \
    pkgsrc/net/ntopng/patches/patch-third-party_snmp_net.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/ntopng/Makefile
diff -u pkgsrc/net/ntopng/Makefile:1.11 pkgsrc/net/ntopng/Makefile:1.12
--- pkgsrc/net/ntopng/Makefile:1.11     Sun Apr 30 01:21:57 2017
+++ pkgsrc/net/ntopng/Makefile  Thu Jun 15 14:54:44 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2017/04/30 01:21:57 ryoon Exp $
+# $NetBSD: Makefile,v 1.12 2017/06/15 14:54:44 fhajny Exp $
 
 DISTNAME=      ntopng-2.4-stable
 PKGNAME=       ntopng-2.4
@@ -27,6 +27,14 @@ SUBST_FILES.fix-vers=        configure.seed
 SUBST_SED.fix-vers=    -e 's,@VERSION@,${PKGVERSION},g'
 SUBST_SED.fix-vers+=   -e 's,@SHORT_VERSION@,${PKGVERSION_NOREV},g'
 
+# Portable types
+CFLAGS.SunOS+=         -Du_int8_t=uint8_t
+CFLAGS.SunOS+=         -Du_int16_t=uint16_t
+CFLAGS.SunOS+=         -Du_int32_t=uint32_t
+CFLAGS.SunOS+=         -Du_int64_t=uint64_t
+
+LDFLAGS.SunOS+=                -lresolv
+
 pre-configure:
        cd ${WRKSRC} && cp configure.seed configure.ac && autoreconf -fiv
 

Index: pkgsrc/net/ntopng/distinfo
diff -u pkgsrc/net/ntopng/distinfo:1.3 pkgsrc/net/ntopng/distinfo:1.4
--- pkgsrc/net/ntopng/distinfo:1.3      Fri Jul  1 04:51:15 2016
+++ pkgsrc/net/ntopng/distinfo  Thu Jun 15 14:54:44 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2016/07/01 04:51:15 adam Exp $
+$NetBSD: distinfo,v 1.4 2017/06/15 14:54:44 fhajny Exp $
 
 SHA1 (ntopng-2.4-stable.tar.gz) = ceb08377f98e8d149e39f5546a62e2f6ca980a31
 RMD160 (ntopng-2.4-stable.tar.gz) = 14940d0ea398cd43d7c31868f34b833b214386e7
@@ -6,7 +6,9 @@ SHA512 (ntopng-2.4-stable.tar.gz) = 515d
 Size (ntopng-2.4-stable.tar.gz) = 134074662 bytes
 SHA1 (patch-Makefile.in) = 9ef39a98e77d4bbf5afdde4e2a23e72d80fe9fd0
 SHA1 (patch-configure.seed) = b2c6e07c21f234c089e8a6319cb4dd476ba7890b
-SHA1 (patch-include_ntop__includes.h) = dd8f61228d6a8d96a5577e53857cb8a05394a036
+SHA1 (patch-include_ntop__includes.h) = 2bf588dba941f25b71381c7848b237d964d77f31
 SHA1 (patch-src_DivertInterface.cpp) = 0a0ba0510b284fe40c432cf6db02a9906b03f236
-SHA1 (patch-src_PacketDumperTuntap.cpp) = 274b70f065f407ca34a3d88e021924639ffa105b
+SHA1 (patch-src_PacketDumperTuntap.cpp) = 76415461ebbe88d886111aa2d6508c7eec66b11d
 SHA1 (patch-src_Redis.cpp) = 10f04cb1b300cd400905df993bb7d4f20431569b
+SHA1 (patch-src_Utils.cpp) = a3a0f86956dba31e23b0dc4a7739777a9479386f
+SHA1 (patch-third-party_snmp_net.c) = defaacb719c2fb0276932554a7951f02a19ba4ef

Index: pkgsrc/net/ntopng/patches/patch-include_ntop__includes.h
diff -u pkgsrc/net/ntopng/patches/patch-include_ntop__includes.h:1.1 pkgsrc/net/ntopng/patches/patch-include_ntop__includes.h:1.2
--- pkgsrc/net/ntopng/patches/patch-include_ntop__includes.h:1.1        Fri Apr  8 16:59:07 2016
+++ pkgsrc/net/ntopng/patches/patch-include_ntop__includes.h    Thu Jun 15 14:54:45 2017
@@ -1,8 +1,8 @@
-$NetBSD: patch-include_ntop__includes.h,v 1.1 2016/04/08 16:59:07 adam Exp $
+$NetBSD: patch-include_ntop__includes.h,v 1.2 2017/06/15 14:54:45 fhajny Exp $
 
-Add NetBSD support.
+Add NetBSD and SunOS support.
 
---- include/ntop_includes.h.orig       2016-04-04 12:57:38.000000000 +0000
+--- include/ntop_includes.h.orig       2016-06-27 19:31:18.000000000 +0000
 +++ include/ntop_includes.h
 @@ -43,7 +43,7 @@
  #include <arpa/inet.h>
@@ -13,3 +13,13 @@ Add NetBSD support.
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <netinet/in.h>
+@@ -51,6 +51,9 @@
+ #include <net/if_arp.h>
+ #include <netinet/if_ether.h>
+ #include <netinet/in_systm.h>
++#elif defined(__sun)
++#include <netinet/in_systm.h>
++#include <sys/sockio.h>
+ #else
+ #include <net/ethernet.h>
+ #endif
Index: pkgsrc/net/ntopng/patches/patch-src_PacketDumperTuntap.cpp
diff -u pkgsrc/net/ntopng/patches/patch-src_PacketDumperTuntap.cpp:1.1 pkgsrc/net/ntopng/patches/patch-src_PacketDumperTuntap.cpp:1.2
--- pkgsrc/net/ntopng/patches/patch-src_PacketDumperTuntap.cpp:1.1      Fri Apr  8 16:59:07 2016
+++ pkgsrc/net/ntopng/patches/patch-src_PacketDumperTuntap.cpp  Thu Jun 15 14:54:45 2017
@@ -1,15 +1,15 @@
-$NetBSD: patch-src_PacketDumperTuntap.cpp,v 1.1 2016/04/08 16:59:07 adam Exp $
+$NetBSD: patch-src_PacketDumperTuntap.cpp,v 1.2 2017/06/15 14:54:45 fhajny Exp $
 
-Add NetBSD support.
+Add NetBSD and SunOS support.
 
---- src/PacketDumperTuntap.cpp.orig    2016-04-04 12:59:52.000000000 +0000
+--- src/PacketDumperTuntap.cpp.orig    2016-06-27 19:31:18.000000000 +0000
 +++ src/PacketDumperTuntap.cpp
 @@ -127,7 +127,7 @@ int PacketDumperTuntap::openTap(char *de
  
  /* ********************************************* */
  
 -#ifdef __OpenBSD__
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
++#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun)
  #define OPENBSD_TAPDEVICE_SIZE 32
  int PacketDumperTuntap::openTap(char *dev, /* user-definable interface name, eg. edge0 */ int mtu) {
    int i;

Added files:

Index: pkgsrc/net/ntopng/patches/patch-src_Utils.cpp
diff -u /dev/null pkgsrc/net/ntopng/patches/patch-src_Utils.cpp:1.1
--- /dev/null   Thu Jun 15 14:54:45 2017
+++ pkgsrc/net/ntopng/patches/patch-src_Utils.cpp       Thu Jun 15 14:54:45 2017
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_Utils.cpp,v 1.1 2017/06/15 14:54:45 fhajny Exp $
+
+d_type is not POSIX, provide workaround for SunOS.
+
+--- src/Utils.cpp.orig 2016-06-27 19:31:18.000000000 +0000
++++ src/Utils.cpp
+@@ -23,6 +23,9 @@
+ 
+ #include <curl/curl.h>
+ #include <string.h>
++#ifdef __sun
++struct stat s;
++#endif
+ 
+ // A simple struct for strings.
+ typedef struct {
+@@ -1232,7 +1235,12 @@ bool scan_dir(const char * dir_name, lis
+     entry = readdir (d);
+     if(!entry) break;
+     d_name = entry->d_name;
++#ifdef __sun
++    stat(entry->d_name, &s);
++    if (!(s.st_mode & S_IFDIR)) {
++#else
+     if(!(entry->d_type & DT_DIR)) {
++#endif
+       if(!stat(entry->d_name, &file_stats)) {
+         struct dirent *temp = (struct dirent *)malloc(sizeof(struct dirent));
+         memcpy(temp, entry, sizeof(struct dirent));
+@@ -1241,7 +1249,12 @@ bool scan_dir(const char * dir_name, lis
+       }
+     }
+ 
++#ifdef __sun
++    stat(entry->d_name, &s);
++    if (s.st_mode & S_IFDIR) {
++#else
+     if(entry->d_type & DT_DIR) {
++#endif
+       if(strncmp (d_name, "..", 2) != 0 &&
+           strncmp (d_name, ".", 1) != 0) {
+         int path_length;
Index: pkgsrc/net/ntopng/patches/patch-third-party_snmp_net.c
diff -u /dev/null pkgsrc/net/ntopng/patches/patch-third-party_snmp_net.c:1.1
--- /dev/null   Thu Jun 15 14:54:45 2017
+++ pkgsrc/net/ntopng/patches/patch-third-party_snmp_net.c      Thu Jun 15 14:54:45 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-third-party_snmp_net.c,v 1.1 2017/06/15 14:54:45 fhajny Exp $
+
+SunOS doesn't have gethostbyname2.
+
+--- third-party/snmp/net.c.orig        2016-06-27 19:31:19.000000000 +0000
++++ third-party/snmp/net.c
+@@ -15,7 +15,7 @@
+ #define __USE_GNU
+ #endif
+ 
+-#ifdef WIN32
++#if defined(WIN32) || defined(__sun)
+ #define gethostbyname2(a, b) gethostbyname(a)
+ #else
+ #include <unistd.h>



Home | Main Index | Thread Index | Old Index