[csw-devel] SF.net SVN: gar:[16744] csw/mgar/pkg/webalizer/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Thu Jan 12 11:39:23 CET 2012
Revision: 16744
http://gar.svn.sourceforge.net/gar/?rev=16744&view=rev
Author: dmichelsen
Date: 2012-01-12 10:39:23 +0000 (Thu, 12 Jan 2012)
Log Message:
-----------
webalizer/trunk: Enable GeoIP and bzip2
Modified Paths:
--------------
csw/mgar/pkg/webalizer/trunk/Makefile
csw/mgar/pkg/webalizer/trunk/files/0001-Force-void-context.patch
Added Paths:
-----------
csw/mgar/pkg/webalizer/trunk/files/0002-Re-add-definition-on-u_int64_t.patch
Modified: csw/mgar/pkg/webalizer/trunk/Makefile
===================================================================
--- csw/mgar/pkg/webalizer/trunk/Makefile 2012-01-11 22:33:46 UTC (rev 16743)
+++ csw/mgar/pkg/webalizer/trunk/Makefile 2012-01-12 10:39:23 UTC (rev 16744)
@@ -17,22 +17,48 @@
PATCHFILES += 0001-Force-void-context.patch
+# Having u_int64_t defined during autoconf-time disturbs detection of BerkeleyDB db.h
+# so we disable the test below and re-add the definition manually in webalizer.h
+PATCHFILES += 0002-Re-add-definition-on-u_int64_t.patch
+
+BUILD_DEP_PKGS += CSWlibgd-dev
+BUILD_DEP_PKGS += CSWlibpng-dev
+BUILD_DEP_PKGS += CSWlibz-dev
+BUILD_DEP_PKGS += CSWbdb48devel
+BUILD_DEP_PKGS += CSWgeoip-dev
+
PACKAGES += CSWwebalizer
SPKG_DESC_CSWwebalizer = A flexible web server log file analysis program
# PKGFILES is catchall
RUNTIME_DEP_PKGS_CSWwebalizer += CSWlibgd2
RUNTIME_DEP_PKGS_CSWwebalizer += CSWlibpng12-0
RUNTIME_DEP_PKGS_CSWwebalizer += CSWlibz1
+RUNTIME_DEP_PKGS_CSWwebalizer += CSWbdb48
+RUNTIME_DEP_PKGS_CSWwebalizer += CSWgeoip
+RUNTIME_DEP_PKGS_CSWwebalizer += CSWlibbz2-1-0
# Fix config file later
CHECKPKG_OVERRIDES_CSWwebalizer += file-with-bad-content|/usr/share|root/etc/opt/csw/webalizer.conf.CSW
-# No BDB support yet as detection bails out on long long
-#EXTRA_INC = $(prefix)/bdb48/include
-#EXTRA_LIB = $(prefix)/bdb48/lib
+EXTRA_INC = $(prefix)/bdb48/include
+EXTRA_LIB = $(prefix)/bdb48/lib
+REINPLACEMENTS += geodb
+REINPLACE_MATCH_geodb = GeoDB\.dat
+REINPLACE_WITH_geodb = GeoIP.dat
+REINPLACE_FILES_geodb += dns_resolv.c
+
CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_ARGS += --enable-dns
+CONFIGURE_ARGS += --enable-bz2
+CONFIGURE_ARGS += --enable-geoip
+#CONFIGURE_ARGS += --with-geoip=DIR Alternate location for libGeoIP header files
+#CONFIGURE_ARGS += --with-geoiplib=DIR Alternate location for geoip library
+CONFIGURE_ARGS += --with-geodb=$(sharedstatedir)/GeoIP
+# This is also defined in db.h from BerkeleyDB and causes trouble when being defined twice (see patch above)
+CONFIGURE_ARGS += ac_cv_type_u_int64_t=yes
+
# There is no testsuite
TEST_SCRIPTS =
Modified: csw/mgar/pkg/webalizer/trunk/files/0001-Force-void-context.patch
===================================================================
--- csw/mgar/pkg/webalizer/trunk/files/0001-Force-void-context.patch 2012-01-11 22:33:46 UTC (rev 16743)
+++ csw/mgar/pkg/webalizer/trunk/files/0001-Force-void-context.patch 2012-01-12 10:39:23 UTC (rev 16744)
@@ -1,25 +1,37 @@
-From 185f509e80d9b2f53a7235b9572ad0c461959cd7 Mon Sep 17 00:00:00 2001
+From 974bb8cab5847f85b527d1f276eed4575d55096d Mon Sep 17 00:00:00 2001
From: Dagobert Michelsen <dam at opencsw.org>
-Date: Wed, 11 Jan 2012 23:17:40 +0100
+Date: Thu, 12 Jan 2012 11:31:37 +0100
Subject: [PATCH] Force void context
---
- webalizer.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ webalizer.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/webalizer.c b/webalizer.c
-index 702c532..612b94d 100644
+index 702c532..9d5777f 100644
--- a/webalizer.c
+++ b/webalizer.c
-@@ -579,7 +579,7 @@ int main(int argc, char *argv[])
+@@ -577,9 +577,9 @@ int main(int argc, char *argv[])
+ fflush(stdout);
+ (gz_log)?dns_resolver(zlog_fp):dns_resolver(log_fp);
#ifdef USE_BZIP
- (gz_log==COMP_BZIP)?bz2_rewind(&zlog_fp, log_fname, "rb"):
+- (gz_log==COMP_BZIP)?bz2_rewind(&zlog_fp, log_fname, "rb"):
++ (gz_log==COMP_BZIP)?(void)bz2_rewind(&zlog_fp, log_fname, "rb"):
#endif
- (gz_log==COMP_GZIP)?gzrewind(zlog_fp):
+ (gz_log==COMP_GZIP)?(void)gzrewind(zlog_fp):
(log_fname)?rewind(log_fp):exit(0);
}
+@@ -1418,7 +1418,7 @@ int main(int argc, char *argv[])
+
+ /* close log file if needed */
+ #ifdef USE_BZIP
+- if (gz_log) (gz_log==COMP_BZIP)?BZ2_bzclose(zlog_fp):gzclose(zlog_fp);
++ if (gz_log) (gz_log==COMP_BZIP)?BZ2_bzclose(zlog_fp):(void)gzclose(zlog_fp);
+ #else
+ if (gz_log) gzclose(zlog_fp);
+ #endif
--
1.7.8.2
Added: csw/mgar/pkg/webalizer/trunk/files/0002-Re-add-definition-on-u_int64_t.patch
===================================================================
--- csw/mgar/pkg/webalizer/trunk/files/0002-Re-add-definition-on-u_int64_t.patch (rev 0)
+++ csw/mgar/pkg/webalizer/trunk/files/0002-Re-add-definition-on-u_int64_t.patch 2012-01-12 10:39:23 UTC (rev 16744)
@@ -0,0 +1,25 @@
+From 46c41630bb7db3f95df0ad81fe3161270ee9b360 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 12 Jan 2012 11:05:56 +0100
+Subject: [PATCH] Re-add definition on u_int64_t
+
+---
+ webalizer.h | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/webalizer.h b/webalizer.h
+index 7a3941c..158c4d1 100644
+--- a/webalizer.h
++++ b/webalizer.h
+@@ -1,6 +1,8 @@
+ #ifndef _WEBALIZER_H
+ #define _WEBALIZER_H
+
++typedef unsigned long long u_int64_t;
++
+ #define PCENT(val,max) ((val)?((double)val/(double)max)*100.0 : 0.0)
+ #define IDX_2C(c1,c2) (((c1-'a'+1)<<7)+(c2-'a'+1) )
+ #define IDX_3C(c1,c2,c3) (((c1-'a'+1)<<12)+((c2-'a'+1)<<7)+(c3-'a'+1) )
+--
+1.7.8.2
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list