package/libosmium: new package
authorMaxim Kochetkov <fido_max@inbox.ru>
Wed, 28 Apr 2021 04:12:14 +0000 (07:12 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 28 Jul 2021 20:59:20 +0000 (22:59 +0200)
A fast and flexible C++ library for working with OpenStreetMap data.
Libosmium works on Linux, macOS and Windows.

https://osmcode.org/libosmium/

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/libosmium/Config.in [new file with mode: 0644]
package/libosmium/libosmium.hash [new file with mode: 0644]
package/libosmium/libosmium.mk [new file with mode: 0644]

index 7fa48516272639938bcee91c06555d400ffa94d4..e8bb9fd54aa6e22840518a23eca150852d75d7b9 100644 (file)
@@ -1864,6 +1864,7 @@ N:        Max Filippov <jcmvbkbc@gmail.com>
 F:     arch/Config.in.xtensa
 
 N:     Maxim Kochetkov <fido_max@inbox.ru>
+F:     package/libosmium/
 F:     package/postgis/
 F:     package/protozero/
 F:     package/timescaledb/
index 9ced0a139e0b4532acdd6c00156e8b056adfd54e..48ddbb63b2fed5b9f8856edb0a1892b3ebb52698 100644 (file)
@@ -1938,6 +1938,7 @@ menu "Other"
        source "package/libloki/Config.in"
        source "package/libnpth/Config.in"
        source "package/libnspr/Config.in"
+       source "package/libosmium/Config.in"
        source "package/libpfm4/Config.in"
        source "package/libplatform/Config.in"
        source "package/libplist/Config.in"
diff --git a/package/libosmium/Config.in b/package/libosmium/Config.in
new file mode 100644 (file)
index 0000000..9f002d3
--- /dev/null
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_LIBOSMIUM
+       bool "libosmium"
+       depends on BR2_INSTALL_LIBSTDCPP
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
+       depends on BR2_TOOLCHAIN_HAS_THREADS # boost
+       depends on BR2_USE_WCHAR # boost
+       select BR2_PACKAGE_BOOST
+       select BR2_PACKAGE_PROTOZERO
+       help
+         A fast and flexible C++ library for working with OpenStreetMap
+         data. Libosmium works on Linux, macOS and Windows.
+
+         https://osmcode.org/libosmium/
+
+comment "libosmium needs a toolchain w/ C++,  wchar, threads, gcc >= 4.7"
+       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
+               !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libosmium/libosmium.hash b/package/libosmium/libosmium.hash
new file mode 100644 (file)
index 0000000..05d898b
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  4a7672d7caf4da3bc68619912b298462370c423c697871a0be6273c6686e10d6  libosmium-2.17.0.tar.gz
+sha256  c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566  LICENSE
diff --git a/package/libosmium/libosmium.mk b/package/libosmium/libosmium.mk
new file mode 100644 (file)
index 0000000..3beca73
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#
+# libosmium
+#
+################################################################################
+
+LIBOSMIUM_VERSION = 2.17.0
+LIBOSMIUM_SITE = $(call github,osmcode,libosmium,v$(LIBOSMIUM_VERSION))
+LIBOSMIUM_LICENSE = BSL-1.0
+LIBOSMIUM_LICENSE_FILES = LICENSE
+LIBOSMIUM_INSTALL_STAGING = YES
+LIBOSMIUM_DEPENDENCIES = boost protozero
+
+ifeq ($(BR2_PACKAGE_BZIP2),y)
+LIBOSMIUM_DEPENDENCIES += bzip2
+endif
+
+ifeq ($(BR2_PACKAGE_EXPAT),y)
+LIBOSMIUM_DEPENDENCIES += expat
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGEOS),y)
+LIBOSMIUM_DEPENDENCIES += libgeos
+endif
+
+ifeq ($(BR2_PACKAGE_LZ4),y)
+LIBOSMIUM_DEPENDENCIES += lz4
+endif
+
+ifeq ($(BR2_PACKAGE_PROJ),y)
+LIBOSMIUM_DEPENDENCIES += proj
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+LIBOSMIUM_DEPENDENCIES += zlib
+endif
+
+$(eval $(cmake-package))