libmaxminddb: new package
PATCH 1/1 libmaxminddb: new package
From: Fabrice Fontaine <[email protected]>
C library for the MaxMind DB file format
The libmaxminddb library provides a C library for reading MaxMind DB files, including the GeoIP2 databases from MaxMind. This is a custom binary format designed to facilitate fast lookups of IP addresses while allowing for great flexibility in the type of data associated with an address.
The MaxMind DB format is an open format. The spec is available at http://maxmind.github.io/MaxMind-DB/. This spec is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
http://maxmind.github.io/libmaxminddb
--- package/Config.in | 1 + .../0001-Add-disable-tests-to-configure.patch | 53 ++++++++++++++++++++++ package/libmaxminddb/Config.in | 17 +++++++ package/libmaxminddb/libmaxminddb.hash | 2 + package/libmaxminddb/libmaxminddb.mk | 15 ++++++ 5 files changed, 88 insertions(+) create mode 100644 package/libmaxminddb/0001-Add-disable-tests-to-configure.patch create mode 100644 package/libmaxminddb/Config.in create mode 100644 package/libmaxminddb/libmaxminddb.hash create mode 100644 package/libmaxminddb/libmaxminddb.mk
package/Config.in +1 -0
@@ -1238,6 +1238,7 @@ menu "Networking" source "package/libidn/Config.in" source "package/libiscsi/Config.in" source "package/libldns/Config.in" + source "package/libmaxminddb/Config.in" source "package/libmbus/Config.in" source "package/libmemcached/Config.in" source "package/libmicrohttpd/Config.in"
package/libmaxminddb/0001-Add-disable-tests-to-configure.patch new file +53 -0
53 lines not on this page · raw message
package/libmaxminddb/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBMAXMINDDB + bool "libmaxminddb" + help + C library for the MaxMind DB file format + + The libmaxminddb library provides a C library for reading + MaxMind DB files, including the GeoIP2 databases from MaxMind. + This is a custom binary format designed to facilitate fast + lookups of IP addresses while allowing for great flexibility + in the type of data associated with an address. + + The MaxMind DB format is an open format. The spec is available + at http://maxmind.github.io/MaxMind-DB/. This spec is licensed + under the Creative Commons Attribution-ShareAlike 3.0 Unported + License. + + http://maxmind.github.io/libmaxminddb
package/libmaxminddb/libmaxminddb.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 4147241d4e3103bd843167ae5a0d5cf176632b6898cb1cca6223d2d58cc53ef5 libmaxminddb-1.2.0.tar.gz
package/libmaxminddb/libmaxminddb.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# libmaxminddb +# +################################################################################ + +LIBMAXMINDDB_VERSION = 1.2.0 +LIBMAXMINDDB_SITE = $(call github,maxmind,libmaxminddb,$(LIBMAXMINDDB_VERSION)) +LIBMAXMINDDB_INSTALL_STAGING = YES +LIBMAXMINDDB_LICENSE = Apache-2.0 +LIBMAXMINDDB_LICENSE_FILES = LICENSE +LIBMAXMINDDB_AUTORECONF = YES +LIBMAXMINDDB_CONF_OPTS = --disable-tests + +$(eval $(autotools-package))
Signature · 1 line
2.5.0
PATCH 1/1 libmaxminddb: new package
Hello,
Quoted 10 lines · Fabrice Fontaine
From: Fabrice Fontaine <[email protected]>
C library for the MaxMind DB file format
The libmaxminddb library provides a C library for reading MaxMind DB files, including the GeoIP2 databases from MaxMind. This is a custom binary format designed to facilitate fast lookups of IP addresses while allowing for great flexibility in the type of data associated with an address.
Quoted 8 lines
The MaxMind DB format is an open format. The spec is available at http://maxmind.github.io/MaxMind-DB/. This spec is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
http://maxmind.github.io/libmaxminddb
Signed-off-by Fabrice Fontaine <[email protected]>
Thanks, I've applied your patch, after adding an entry to the DEVELOPERS file. However, I have some suggestions on your configure.ac patch:
package/libmaxminddb/0001-Add-disable-tests-to-configure.patch line 40
Quoted 11 lines
package/libmaxminddb/0001-Add-disable-tests-to-configure.patch new file +11
-0+diff --git a/configure.ac b/configure.ac +index 7916212..fc53ffd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -119,6 +119,16 @@ AC_ARG_ENABLE( + esac],[debug=false]) + AM_CONDITIONAL([DEBUG], [test x$debug = xtrue]) + ++AC_ARG_ENABLE( ++ [tests], ++ [ --enable-tests Compilation of tests code],
This should use AS_HELP_STRING(), see
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Pretty-Help-Strings.html.
Quoted 5 lines
++ [case "${enableval}" in
++ yes) tests=true ;; ++ no) tests=false ;; ++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;;++ esac],[tests=false])
This is very convoluted, and in addition, you default to not building the tests, which causes a change in behavior compared to when the option did not exist. I would suggest:
AC_ARG_ENABLE([tests],
AS_HELP_STRING([--enable-tests], [Compilation of tests code],
[enable_tests=${enableval}],
[enable_tests=yes])AM_CONDITIONAL([TESTS], [test "${enable_tests}" = "yes"])
This is much more "classical" autoconf code I believe.
I've anyway applied your patch because for the purpose of Buildroot it works, but you might want to submit upstream an improved version. Of course, we can also take an improved version in Buildroot.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com