[62810] trunk/dports/net/ntop

markd at macports.org markd at macports.org
Mon Jan 18 01:04:15 PST 2010


Revision: 62810
          http://trac.macports.org/changeset/62810
Author:   markd at macports.org
Date:     2010-01-18 01:04:12 -0800 (Mon, 18 Jan 2010)
Log Message:
-----------
Fix incorrect patch and add a Makefile patch from FreeBSD.

Modified Paths:
--------------
    trunk/dports/net/ntop/Portfile
    trunk/dports/net/ntop/files/patch-external-geoip.diff

Added Paths:
-----------
    trunk/dports/net/ntop/files/patch-Makefile.am.diff

Modified: trunk/dports/net/ntop/Portfile
===================================================================
--- trunk/dports/net/ntop/Portfile	2010-01-18 04:55:05 UTC (rev 62809)
+++ trunk/dports/net/ntop/Portfile	2010-01-18 09:04:12 UTC (rev 62810)
@@ -4,8 +4,9 @@
 
 name			ntop
 version			3.3.10
+revision		1
 categories		net
-maintainers		markd
+maintainers		markd openmaintainer
 description		network traffic probe
 platforms		darwin
 long_description	ntop is a network traffic probe that shows the network \
@@ -15,18 +16,19 @@
 master_sites		sourceforge
 checksums		md5 6e2ffa90d5f935c8f03d88a5dd19a866
 
-patchfiles		patch-external-geoip.diff
+patchfiles		patch-external-geoip.diff \
+			patch-Makefile.am.diff
 
 depends_build		port:gawk \
 			port:wget \
-			port:rrdtool
+			port:rrdtool \
+			port:libevent
 depends_lib		port:libpcap \
 			port:gd2 \
 			port:libpng \
 			port:gdbm \
 			port:libgeoip
 
-patch.pre_args		-p1
 configure.cflags-append	-I${prefix}/include
 configure.args		--mandir=${prefix}/share/man \
 			--with-localedir=${prefix}/share/locale \

Added: trunk/dports/net/ntop/files/patch-Makefile.am.diff
===================================================================
--- trunk/dports/net/ntop/files/patch-Makefile.am.diff	                        (rev 0)
+++ trunk/dports/net/ntop/files/patch-Makefile.am.diff	2010-01-18 09:04:12 UTC (rev 62810)
@@ -0,0 +1,30 @@
+--- Makefile.am.orig	2009-04-17 17:27:57.000000000 -0300
++++ Makefile.am	2009-09-15 13:07:19.000000000 -0300
+@@ -76,9 +76,7 @@
+ NTOPDATA = ntop-cert.pem \
+            $(ETTER_PASSIVE) \
+            oui.txt.gz \
+-           specialMAC.txt.gz \
+-	   GeoIPASNum.dat \
+-	   GeoLiteCity.dat
++           specialMAC.txt.gz
+ 
+ NTOPHTML = html html/*.js html/*.html  html/*.gif html/*.jpg html/*.ico html/*.png \
+            html/*.css html/*.dtd \
+@@ -270,8 +268,6 @@
+ 
+ install: install-recursive
+ 
+-	cd @GEO_DIR@; make install
+-
+ 	@mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR)
+ 
+ 	@echo ""
+@@ -341,7 +337,6 @@
+ 	chcon -t textrel_shlib_t $(DESTDIR)$(libdir)/*ntop*.so
+ 
+ install-data-local: ntop.txt ntop.html faq.html
+-	@$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins;
+ 	@if ! test -d $(DESTDIR)/$(datadir)/ntop; then \
+ 	  $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop; \
+ 	  touch $(DESTDIR)/$(datadir)/ntop/warnuser; \

Modified: trunk/dports/net/ntop/files/patch-external-geoip.diff
===================================================================
--- trunk/dports/net/ntop/files/patch-external-geoip.diff	2010-01-18 04:55:05 UTC (rev 62809)
+++ trunk/dports/net/ntop/files/patch-external-geoip.diff	2010-01-18 09:04:12 UTC (rev 62810)
@@ -1,23 +1,23 @@
-diff -Nru ntop-3.3.9.orig/configure.in ntop-3.3.9/configure.in
---- ntop-3.3.9.orig/configure.in	2009-02-18 21:04:10.000000000 +0000
-+++ ntop-3.3.9/configure.in	2009-02-18 21:05:58.000000000 +0000
-@@ -1883,39 +1883,7 @@
+--- configure.in.orig	2009-08-05 19:30:31.141160363 +0530
++++ configure.in	2009-08-05 19:34:11.076160092 +0530
+@@ -1962,40 +1962,23 @@
+     }'`
  fi
  
- dnl> GeoIP (http://www.maxmind.com/)
+-dnl> GeoIP (http://www.maxmind.com/)
 -if test -f "GeoIP.tar.gz"; then
 -   echo "GeoIP already present on this machine"
 -else
 -   wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
--   tar xvfz GeoIP.tar.gz
--   GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
--   cd $GEO_DIR; ./configure; make; cd ..
--   # OSX Fix
--   GEO_DYLIB="$GEO_DIR/libGeoIP/.libs/libGeoIP.dylib"
--   if test -f $GEO_DYLIB; then
--      ln -s $GEO_DYLIB .
--   fi
 -fi
+-tar xvfz GeoIP.tar.gz
+-GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
+-cd $GEO_DIR; ./configure --prefix=${prefix}; make; cd ..
+-# OSX Fix
+-GEO_DYLIB="$GEO_DIR/libGeoIP/.libs/libGeoIP.dylib"
+-if test -f $GEO_DYLIB; then
+-   ln -s $GEO_DYLIB .
+-fi
 -
 -if test -f "GeoLiteCity.dat"; then
 -   echo "GeoLiteCity.dat already present"
@@ -31,86 +31,29 @@
 -else
 -   wget http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
 -   gunzip GeoIPASNum.dat.gz
--fi
++#
++#GeoIP
++#
++AC_CHECK_HEADERS(
++    [GeoIP.h],
++    [geoip_header="yes"],
++    [AC_MSG_FAILURE([GeoIP header file is missing])]
++)
++if test "$geoip_header" = "yes"; then
++    AC_CHECK_LIB(GeoIP, GeoIP_open,
++        [geoip_libs="yes"],
++	[AC_MSG_FAILURE([GeoIP library is missing])]
++    )
++fi
++if test "$geoip_libs" = "yes"; then
++    LDFLAGS="${LDFLAGS} -lGeoIP"
+ fi
 -
 -
 -GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
 -GEO_IP="$GEO_DIR/libGeoIP/"
 -CFLAGS="$CFLAGS -I$GEO_IP"
--LDFLAGS="$LDFLAGS -L$GEO_IP.libs/ -lGeoIP"
-+LDFLAGS="$LDFLAGS -lGeoIP"
+-LDFLAGS="-L$GEO_IP.libs/ -lGeoIP $LDFLAGS"
  
  dnl> NTOPCONFIGDEBUG_SETTINGS([precet])
  
-@@ -2080,7 +2048,6 @@
- AC_SUBST(SO_VERSION_PATCH)
- AC_SUBST(RRD_LIB)
- AC_SUBST(RRD_INC)
--AC_SUBST(GEO_DIR)
- 
- AC_CONFIG_FILES([Makefile])
- 
-diff -Nru ntop-3.3.9.orig/initialize.c ntop-3.3.9/initialize.c
---- ntop-3.3.9.orig/initialize.c	2008-12-03 22:00:22.000000000 +0000
-+++ ntop-3.3.9/initialize.c	2009-02-18 21:04:44.000000000 +0000
-@@ -467,16 +467,15 @@
- #endif
- 
-   /* Initialize GeoIP databases */
--  for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
-+  {
-     char path[256];
-     
-     safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
- 		  "%s%c%s",
--		  myGlobals.configFileDirs[i], CONST_PATH_SEP, GEO_IP_FILE);
-+		  myGlobals.dbPath, CONST_PATH_SEP, GEO_IP_FILE);
-     revertSlashIfWIN32(path, 0);
-     if((myGlobals.geo_ip_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
-       traceEvent(CONST_TRACE_INFO, "GeoIP: loaded config file %s", path);
--      break;
-     }
-   }
-   
-@@ -485,16 +484,15 @@
-   
-   /* *************************** */
- 
--  for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
-+  {
-     char path[256];
-     
-     safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
- 		  "%s%c%s",
--		  myGlobals.configFileDirs[i], CONST_PATH_SEP, GEO_IP_ASN_FILE);
-+		  myGlobals.dbPath, CONST_PATH_SEP, GEO_IP_ASN_FILE);
-     revertSlashIfWIN32(path, 0);
-     if((myGlobals.geo_ip_asn_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
-       traceEvent(CONST_TRACE_INFO, "GeoIP: loaded ASN config file %s", path);
--      break;
-     }
-   }
-   
-diff -Nru ntop-3.3.9.orig/Makefile.am ntop-3.3.9/Makefile.am
---- ntop-3.3.9.orig/Makefile.am	2008-12-03 22:00:22.000000000 +0000
-+++ ntop-3.3.9/Makefile.am	2009-02-18 21:05:33.000000000 +0000
-@@ -76,9 +76,7 @@
- NTOPDATA = ntop-cert.pem \
-            $(ETTER_PASSIVE) \
-            oui.txt.gz \
--           specialMAC.txt.gz \
--	   GeoIPASNum.dat \
--	   GeoLiteCity.dat
-+           specialMAC.txt.gz
- 
- NTOPHTML = html html/*.js html/*.html  html/*.gif html/*.jpg html/*.ico html/*.png \
-            html/*.css html/*.dtd \
-@@ -270,8 +268,6 @@
- 
- install: install-recursive
- 
--	cd @GEO_DIR@; make install
--
- 	@mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR)
- 
- 	@echo ""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100118/692d1aa0/attachment.html>


More information about the macports-changes mailing list