Skip to contentSkip to conversation

package/leveldb: turn snappy into an optional dependency

Buildroot Peter Korsgaard 1 participant 1 message Jun 1, 2020

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=e6300810c44e362adc479f1a80c24243597cd007
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2020.02.x

snappy is not a mandatory dependency to build leveldb. Back when it was introduced in Buildroot, as of version 1.18, the build logic already made snappy an optional dependency.

(cherry picked from commit 39ef24f8bbe44d7850179f10fe0ab7e08e06059d)
---
 package/leveldb/Config.in  | 1 -
 package/leveldb/leveldb.mk | 5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)
package/leveldb/Config.in +0 -1
index c767b88645..c4279fcb64 100644
@@ -3,7 +3,6 @@ config BR2_PACKAGE_LEVELDB
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_PACKAGE_SNAPPY
 	help
 	  LevelDB is a fast key-value storage library written at Google
 	  that provides an ordered mapping from string keys to string
package/leveldb/leveldb.mk +4 -1
index cf3c096f5d..684b618679 100644
@@ -9,9 +9,12 @@ LEVELDB_SITE = $(call github,google,leveldb,$(LEVELDB_VERSION))
 LEVELDB_LICENSE = BSD-3-Clause
 LEVELDB_LICENSE_FILES = LICENSE
 LEVELDB_INSTALL_STAGING = YES
-LEVELDB_DEPENDENCIES = snappy
 LEVELDB_CONF_OPTS = \
 	-DLEVELDB_BUILD_BENCHMARKS=OFF \
 	-DLEVELDB_BUILD_TESTS=OFF
 
+ifeq ($(BR2_PACKAGE_SNAPPY),y)
+LEVELDB_DEPENDENCIES += snappy
+endif
+
 $(eval $(cmake-package))