[csw-devel] SF.net SVN: gar:[17697] csw/mgar/pkg/GeoIP/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Sun Apr 15 16:18:26 CEST 2012
Revision: 17697
http://gar.svn.sourceforge.net/gar/?rev=17697&view=rev
Author: dmichelsen
Date: 2012-04-15 14:18:25 +0000 (Sun, 15 Apr 2012)
Log Message:
-----------
GeoIP/trunk: Update to 1.4.8, split package, general rework
Modified Paths:
--------------
csw/mgar/pkg/GeoIP/trunk/Makefile
csw/mgar/pkg/GeoIP/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/GeoIP/trunk/files/0001-Remove-gcc-specific-flags.patch
csw/mgar/pkg/GeoIP/trunk/files/0002-Do-not-use-unnamed-union.patch
csw/mgar/pkg/GeoIP/trunk/files/0003-Explicitly-print-NULL-when-passed-nullpointer-instea.patch
Modified: csw/mgar/pkg/GeoIP/trunk/Makefile
===================================================================
--- csw/mgar/pkg/GeoIP/trunk/Makefile 2012-04-15 14:17:16 UTC (rev 17696)
+++ csw/mgar/pkg/GeoIP/trunk/Makefile 2012-04-15 14:18:25 UTC (rev 17697)
@@ -1,45 +1,68 @@
NAME = GeoIP
-VERSION = 1.4.7
+VERSION = 1.4.8
CATEGORIES = net
GARTYPE = v2
-GARTYPE = v2
DESCRIPTION = GeoIP C API
-define BLURB
- GeoIP C API
-endef
MASTER_SITES = http://geolite.maxmind.com/download/geoip/api/c/
DISTFILES = $(NAME)-$(VERSION).tar.gz
+
+PATCHFILES += 0001-Remove-gcc-specific-flags.patch
+PATCHFILES += 0002-Do-not-use-unnamed-union.patch
+PATCHFILES += 0003-Explicitly-print-NULL-when-passed-nullpointer-instea.patch
+
VENDOR_URL = http://www.maxmind.com/app/c
-PACKAGES += CSWgeoip
-CATALOGNAME_CSWgeoip = geoip
-SPKG_DESC_CSWgeoip = $(DESCRIPTION)
-RUNTIME_DEP_PKGS_CSWgeoip = CSWgeolitedb CSWzlib CSWgcc4corert
+PACKAGES += CSWgeoip
+SPKG_DESC_CSWgeoip = GeoIP C API
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWgeoip += CSWlibgeoip1
-PACKAGES += CSWgeoip-dev
-CATALOGNAME_CSWgeoip-dev = geoip_dev
-SPKG_DESC_CSWgeoip-dev = GeoIP C API development support
-RUNTIME_DEP_PKGS_CSWgeoip-dev = CSWgeoip
-INCOMPATIBLE_PKGS_CSWgeoip-dev = CSWgeoipdevel
-PKGFILES_CSWgeoip-dev = $(PKGFILES_DEVEL)
+PACKAGES += CSWgeoip-update
+SPKG_DESC_CSWgeoip-update = Updater for GeoIP.dat directly from MaxMind
+PKGFILES_CSWgeoip-update += $(sysconfdir)/.*
+PKGFILES_CSWgeoip-update += $(bindir)/geoipupdate
+PKGFILES_CSWgeoip-update += $(mandir)/man1/geoipupdate\.1
+RUNTIME_DEP_PKGS_CSWgeoip-update += CSWlibgeoipupdate0
+RUNTIME_DEP_PKGS_CSWgeoip-update += CSWlibgeoip1
+RUNTIME_DEP_PKGS_CSWgeoip-update += CSWlibz1
-GARCOMPILER = GCC4
+PACKAGES += CSWlibgeoip1
+SPKG_DESC_CSWlibgeoip1 = GeoIP library, libGeoIP.so.1
+PKGFILES_CSWlibgeoip1 += $(call pkgfiles_lib,libGeoIP.so.1)
+RUNTIME_DEP_PKGS_CSWlibgeoip1 += CSWgeolitedb
+CHECKPKG_OVERRIDES_CSWlibgeoip1 += surplus-dependency|CSWgeolitedb
-# Tests require internet connection
-TEST_TARGET =
+PACKAGES += CSWlibgeoipupdate0
+SPKG_DESC_CSWlibgeoipupdate0 = GeoIP database update library, libGeoIPUpdate.so.0
+PKGFILES_CSWlibgeoipupdate0 += $(call pkgfiles_lib,libGeoIPUpdate.so.0)
+RUNTIME_DEP_PKGS_CSWlibgeoipupdate0 += CSWlibgeoip1
+RUNTIME_DEP_PKGS_CSWlibgeoipupdate0 += CSWlibz1
-EXTRA_MERGE_EXCLUDE_FILES = .*GeoIP.dat$
+PACKAGES += CSWgeoip-dev
+SPKG_DESC_CSWgeoip-dev = GeoIP development files for libGeoIP.so.1
+PKGFILES_CSWgeoip-dev += $(PKGFILES_DEVEL)
+RUNTIME_DEP_PKGS_CSWgeoip-dev += CSWlibgeoip1
+RUNTIME_DEP_PKGS_CSWgeoip-dev += CSWlibgeoipupdate0
BUILD64_LIBS_ONLY = 1
-STRIP_LIBTOOL = 1
-CONFIGURE_ARGS = $(DIRPATHS)
-CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw
-CONFIGURE_ARGS += --disable-static
+# CONFIGURE_ARGS = $(DIRPATHS)
+# CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw
+# CONFIGURE_ARGS += --disable-static
-CHECKPKG_OVERRIDES_CSWgeoip += non-uniform-lib-versions-in-package|sonames=libGeoIP.so.1,libGeoIPUpdate.so.0
-CHECKPKG_OVERRIDES_CSWgeoip += surplus-dependency|CSWgeolitedb
+# There is one test failing on sparcv9, skip for now
+SKIPTEST ?= 1
+EXTRA_MERGE_EXCLUDE_FILES += $(sharedstatedir)/GeoIP/GeoIP\.dat
+EXTRA_MERGE_EXCLUDE_FILES += $(sysconfdir)/GeoIP\.conf\.default
+
+PRESERVECONF += $(sysconfdir)/GeoIP.conf
+
include gar/category.mk
+
+post-patch-modulated:
+ -cd $(WORKSRC) && ./bootstrap
+ -cd $(WORKSRC) && /opt/csw/bin/libtoolize
+ @$(MAKECOOKIE)
Modified: csw/mgar/pkg/GeoIP/trunk/checksums
===================================================================
--- csw/mgar/pkg/GeoIP/trunk/checksums 2012-04-15 14:17:16 UTC (rev 17696)
+++ csw/mgar/pkg/GeoIP/trunk/checksums 2012-04-15 14:18:25 UTC (rev 17697)
@@ -1 +1 @@
-a802175d5b7e2b57b540a7dd308d9205 GeoIP-1.4.7.tar.gz
+05b7300435336231b556df5ab36f326d GeoIP-1.4.8.tar.gz
Added: csw/mgar/pkg/GeoIP/trunk/files/0001-Remove-gcc-specific-flags.patch
===================================================================
--- csw/mgar/pkg/GeoIP/trunk/files/0001-Remove-gcc-specific-flags.patch (rev 0)
+++ csw/mgar/pkg/GeoIP/trunk/files/0001-Remove-gcc-specific-flags.patch 2012-04-15 14:18:25 UTC (rev 17697)
@@ -0,0 +1,67 @@
+From 91d2141f9891e71491609a8cd1295b1722db568a Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <da\xC2m at opencsw.org>
+Date: Sat, 14 Apr 2012 19:04:53 +0200
+Subject: [PATCH 1/2] Remove gcc-specific flags
+
+---
+ Makefile.am | 2 +-
+ apps/Makefile.am | 6 +++---
+ libGeoIP/Makefile.am | 2 +-
+ test/Makefile.am | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index bd4da3a..5c12337 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-INCLUDES = -Wall -ansi
++INCLUDES =
+
+ SUBDIRS = \
+ libGeoIP \
+diff --git a/apps/Makefile.am b/apps/Makefile.am
+index 46cf501..19fac17 100644
+--- a/apps/Makefile.am
++++ b/apps/Makefile.am
+@@ -1,8 +1,8 @@
+ INCLUDES = \
+- -I$(top_srcdir)/libGeoIP \
+- -Wall
++ -I$(top_srcdir)/libGeoIP
++
+
+-AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" -Wall
++AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
+
+ DEPS = $(top_builddir)/libGeoIP/libGeoIP.la
+ LDADDS = $(top_builddir)/libGeoIP/libGeoIP.la
+diff --git a/libGeoIP/Makefile.am b/libGeoIP/Makefile.am
+index 5fa0a90..90c2cdf 100644
+--- a/libGeoIP/Makefile.am
++++ b/libGeoIP/Makefile.am
+@@ -2,7 +2,7 @@ lib_LTLIBRARIES = libGeoIP.la libGeoIPUpdate.la
+
+ EXTRA_DIST = Makefile.vc md5.h global.h types.h GeoIP_internal.h
+
+-AM_CPPFLAGS = -DGEOIPDATADIR=\"$(pkgdatadir)\" -Wall
++AM_CPPFLAGS = -DGEOIPDATADIR=\"$(pkgdatadir)\"
+
+ libGeoIP_la_SOURCES = GeoIP.c GeoIPCity.c regionName.c timeZone.c
+ include_HEADERS = GeoIP.h GeoIPCity.h GeoIPUpdate.h
+diff --git a/test/Makefile.am b/test/Makefile.am
+index fffcbed..2745604 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -1,6 +1,6 @@
+ INCLUDES = \
+- -I$(top_srcdir)/libGeoIP \
+- -Wall
++ -I$(top_srcdir)/libGeoIP
++
+
+ check_PROGRAMS = test-geoip
+
+--
+1.7.10
+
Added: csw/mgar/pkg/GeoIP/trunk/files/0002-Do-not-use-unnamed-union.patch
===================================================================
--- csw/mgar/pkg/GeoIP/trunk/files/0002-Do-not-use-unnamed-union.patch (rev 0)
+++ csw/mgar/pkg/GeoIP/trunk/files/0002-Do-not-use-unnamed-union.patch 2012-04-15 14:18:25 UTC (rev 17697)
@@ -0,0 +1,99 @@
+From 75432862a6a889ebfcfbb9305b12df021e209188 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <da\xC2m at opencsw.org>
+Date: Sat, 14 Apr 2012 19:17:40 +0200
+Subject: [PATCH 2/2] Do not use unnamed union
+
+---
+ apps/geoiplookup.c | 6 +++---
+ apps/geoiplookup6.c | 2 +-
+ libGeoIP/GeoIPCity.c | 2 +-
+ libGeoIP/GeoIPCity.h | 2 +-
+ test/test-geoip-city.c | 2 +-
+ 5 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/apps/geoiplookup.c b/apps/geoiplookup.c
+index bd3c6fc..43915e6 100644
+--- a/apps/geoiplookup.c
++++ b/apps/geoiplookup.c
+@@ -309,7 +309,7 @@ geoiplookup(GeoIP * gi, char *hostname, int i)
+ }
+ else {
+ printf("%s: %s, %s, %s, %s, %f, %f, %d, %d\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
+- gir->latitude, gir->longitude, gir->metro_code, gir->area_code);
++ gir->latitude, gir->longitude, gir->code.metro_code, gir->area_code);
+ _say_range_by_ip(gi, ipnum);
+ GeoIPRecord_delete(gir);
+ }
+@@ -327,7 +327,7 @@ geoiplookup(GeoIP * gi, char *hostname, int i)
+ _mk_conf_str(gir->postal_conf, postal_str, 5);
+
+ printf("%s: %s, %s, %s, %s, %f, %f, %d, %d, %s, %s, %s, %s\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
+- gir->latitude, gir->longitude, gir->metro_code, gir->area_code,
++ gir->latitude, gir->longitude, gir->code.metro_code, gir->area_code,
+ country_str, region_str, city_str, postal_str
+ );
+ _say_range_by_ip(gi, ipnum);
+@@ -351,7 +351,7 @@ geoiplookup(GeoIP * gi, char *hostname, int i)
+ strcpy(accuracy_radius_str,"N/A");}
+
+ printf("%s: %s, %s, %s, %s, %f, %f, %d, %d, %s, %s, %s, %s, %s\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
+- gir->latitude, gir->longitude, gir->metro_code, gir->area_code,
++ gir->latitude, gir->longitude, gir->code.metro_code, gir->area_code,
+ country_str, region_str, city_str, postal_str, accuracy_radius_str
+ );
+ _say_range_by_ip(gi, ipnum);
+diff --git a/apps/geoiplookup6.c b/apps/geoiplookup6.c
+index dc0ff9b..00c9101 100644
+--- a/apps/geoiplookup6.c
++++ b/apps/geoiplookup6.c
+@@ -175,7 +175,7 @@ geoiplookup(GeoIP * gi, char *hostname, int i)
+ }
+ else {
+ printf("%s: %s, %s, %s, %s, %f, %f, %d, %d\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
+- gir->latitude, gir->longitude, gir->metro_code, gir->area_code);
++ gir->latitude, gir->longitude, gir->code.metro_code, gir->area_code);
+ }
+ }
+
+diff --git a/libGeoIP/GeoIPCity.c b/libGeoIP/GeoIPCity.c
+index d308b45..d716e79 100644
+--- a/libGeoIP/GeoIPCity.c
++++ b/libGeoIP/GeoIPCity.c
+@@ -228,7 +228,7 @@ _extract_record(GeoIP * gi, unsigned int seek_record, int *next_record_ptr)
+ record_buf += 3;
+ for (j = 0; j < 3; ++j)
+ metroarea_combo += (record_buf[j] << (j * 8));
+- record->metro_code = metroarea_combo / 1000;
++ record->code.metro_code = metroarea_combo / 1000;
+ record->area_code = metroarea_combo % 1000;
+ }
+ }
+diff --git a/libGeoIP/GeoIPCity.h b/libGeoIP/GeoIPCity.h
+index f6f8fc8..0ed752f 100644
+--- a/libGeoIP/GeoIPCity.h
++++ b/libGeoIP/GeoIPCity.h
+@@ -42,7 +42,7 @@ typedef struct GeoIPRecordTag {
+ union {
+ int metro_code; /* metro_code is a alias for dma_code */
+ int dma_code;
+- };
++ } code;
+ int area_code;
+ int charset;
+ char *continent_code;
+diff --git a/test/test-geoip-city.c b/test/test-geoip-city.c
+index 4a48fde..c32291a 100644
+--- a/test/test-geoip-city.c
++++ b/test/test-geoip-city.c
+@@ -68,7 +68,7 @@ main(int argc, char *argv[])
+ _mk_NA(gir->postal_code),
+ gir->latitude,
+ gir->longitude,
+- gir->metro_code,
++ gir->code.metro_code,
+ gir->area_code,
+ _mk_NA(time_zone),
+ ret[0],
+--
+1.7.10
+
Added: csw/mgar/pkg/GeoIP/trunk/files/0003-Explicitly-print-NULL-when-passed-nullpointer-instea.patch
===================================================================
--- csw/mgar/pkg/GeoIP/trunk/files/0003-Explicitly-print-NULL-when-passed-nullpointer-instea.patch (rev 0)
+++ csw/mgar/pkg/GeoIP/trunk/files/0003-Explicitly-print-NULL-when-passed-nullpointer-instea.patch 2012-04-15 14:18:25 UTC (rev 17697)
@@ -0,0 +1,62 @@
+From 8697780bf0c23c0cbd47711eefceb6d383c4df9b Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <da\xC2m at opencsw.org>
+Date: Sat, 14 Apr 2012 19:56:55 +0200
+Subject: [PATCH] Explicitly print NULL when passed nullpointer instead of
+ dumping core
+
+---
+ test/test-geoip.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/test-geoip.c b/test/test-geoip.c
+index 4bb209e..63bc38e 100644
+--- a/test/test-geoip.c
++++ b/test/test-geoip.c
+@@ -63,22 +63,22 @@ int main () {
+ while (fscanf(f, "%s%s%s", ipAddress, expectedCountry, expectedCountry3) != EOF) {
+ returnedCountry = GeoIP_country_code_by_addr(gi,ipAddress);
+ if (returnedCountry == NULL || strcmp(returnedCountry, expectedCountry) != 0) {
+- fprintf(stderr,"Test addr %d for %s failed, got %s, expected %s\n",test_num,ipAddress,returnedCountry,expectedCountry);
++ fprintf(stderr,"Test addr %d for %s failed, got %s, expected %s\n",test_num,ipAddress,(returnedCountry == NULL ? "NULL" : returnedCountry),expectedCountry);
+ failed = 1;
+ }
+ returnedCountry = GeoIP_country_code_by_name(gi,ipAddress);
+ if (returnedCountry == NULL || strcmp(returnedCountry, expectedCountry) != 0) {
+- fprintf(stderr,"Test name %d for %s failed, got %s, expected %s\n",test_num,ipAddress,returnedCountry,expectedCountry);
++ fprintf(stderr,"Test name %d for %s failed, got %s, expected %s\n",test_num,ipAddress,(returnedCountry == NULL ? "NULL" : returnedCountry),expectedCountry);
+ failed = 1;
+ }
+ returnedCountry = GeoIP_country_code3_by_addr(gi,ipAddress);
+ if (returnedCountry == NULL || strcmp(returnedCountry, expectedCountry3) != 0) {
+- fprintf(stderr,"Test addr %d for %s failed, got %s, expected %s\n",test_num,ipAddress,returnedCountry,expectedCountry);
++ fprintf(stderr,"Test addr %d for %s failed, got %s, expected %s\n",test_num,ipAddress,(returnedCountry == NULL ? "NULL" : returnedCountry),expectedCountry);
+ failed = 1;
+ }
+ returnedCountry = GeoIP_country_code3_by_name(gi,ipAddress);
+ if (returnedCountry == NULL || strcmp(returnedCountry, expectedCountry3) != 0) {
+- fprintf(stderr,"Test name %d for %s failed, got %s, expected %s\n",test_num,ipAddress,returnedCountry,expectedCountry);
++ fprintf(stderr,"Test name %d for %s failed, got %s, expected %s\n",test_num,ipAddress,(returnedCountry == NULL ? "NULL" : returnedCountry),expectedCountry);
+ failed = 1;
+ }
+ test_num++;
+@@ -89,7 +89,7 @@ int main () {
+ while (fscanf(f, "%s%s", ipAddress, expectedCountry ) != EOF) {
+ returnedCountry = GeoIP_country_code_by_addr(gi,ipAddress);
+ if (returnedCountry == NULL || strcmp(returnedCountry, expectedCountry) != 0) {
+- fprintf(stderr,"Test addr %d %s failed, got %s, expected %s\n",test_num,ipAddress,returnedCountry,expectedCountry);
++ fprintf(stderr,"Test addr %d %s failed, got %s, expected %s\n",test_num,ipAddress,(returnedCountry == NULL ? "NULL" : returnedCountry),expectedCountry);
+ failed = 1;
+ }
+ test_num++;
+@@ -100,7 +100,7 @@ int main () {
+ while (fscanf(f, "%s%s", ipAddress, expectedCountry) != EOF) {
+ returnedCountry = GeoIP_country_code_by_name(gi,ipAddress);
+ if (returnedCountry == NULL || strcmp(returnedCountry, expectedCountry) != 0) {
+- fprintf(stderr,"Test addr %d %s failed, got %s, expected %s\n",test_num,ipAddress,returnedCountry,expectedCountry);
++ fprintf(stderr,"Test addr %d %s failed, got %s, expected %s\n",test_num,ipAddress,(returnedCountry == NULL ? "NULL" : returnedCountry),expectedCountry);
+ failed = 1;
+ }
+ test_num++;
+--
+1.7.10
+
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