Skip to contentSkip to conversation

package/leveldb: bump version to 1.22

PATCH New Bernd Kuhls 2 participants 4 messages Oct 12, 2019 – Oct 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/leveldb: bump version to 1.22

Upstream switched to cmake, removed patches for the old buildsystem and added new patch to install libmemenv.a and memenv.h.

Added license hash.

Package requires gcc >= 4.8:
https://github.com/google/leveldb/blob/master/CMakeLists.txt#L14

Removed "v" from LEVELDB_SITE to reflect current naming scheme.

---
v2: added patch to CMake build system to build/install
libmemenv.a and memenv.h (Thomas)
Patch not sent upstream due to
https://github.com/google/leveldb/issues/236#issuecomment-398199946

 package/leveldb/0002-Add-install-recipe.patch | 42 ------------
 .../0002-CMake-install-libmemenv.a.patch      | 68 +++++++++++++++++++
 ...n-independant-code-for-static-librar.patch | 52 --------------
 package/leveldb/Config.in                     |  6 +-
 package/leveldb/leveldb.hash                  |  3 +-
 package/leveldb/leveldb.mk                    | 30 +-------
 6 files changed, 77 insertions(+), 124 deletions(-)
 delete mode 100644 package/leveldb/0002-Add-install-recipe.patch
 create mode 100644 package/leveldb/0002-CMake-install-libmemenv.a.patch
 delete mode 100644 package/leveldb/0003-Generate-position-independant-code-for-static-librar.patch
package/leveldb/0002-Add-install-recipe.patch deleted +0 -42
deleted file mode 100644
index 29bf4a4831..0000000000
@@ -1,42 +0,0 @@
-From bf646b73391d3d2d0b9780a399dd24880c66b9ab Mon Sep 17 00:00:00 2001
-From: Steve James <[email protected]>
-Date: Sun, 5 Apr 2015 16:30:46 +0200
-Subject: [PATCH 2/2] Add install recipe
-
-Upstream-Status: Rejected [https://github.com/google/leveldb/pull/276]
-
-Signed-off-by: Steve James <[email protected]>
-Signed-off-by: Thomas Petazzoni <[email protected]>
-[baruch: update for v1.19]
-Signed-off-by: Baruch Siach <[email protected]>
-[Bernd: update for v1.20]
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- Makefile | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index 07a5a1ead6fd..c87023db527a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -412,3 +412,17 @@ $(SHARED_OUTDIR)/%.o: %.cc
- 
- $(SHARED_OUTDIR)/port/port_posix_sse.o: port/port_posix_sse.cc
- 	$(CXX) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(PLATFORM_SSEFLAGS) -c $< -o $@
-+
-+INSTALL_ROOT = /
-+INSTALL_PREFIX= usr/local
-+
-+install: all
-+	install -d -m 0755 $(INSTALL_ROOT)$(INSTALL_PREFIX)/include/leveldb
-+	install -D -m 0644 include/leveldb/*.h $(INSTALL_ROOT)$(INSTALL_PREFIX)/include/leveldb
-+	install -d -m 0755 $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib
-+	install -m 0644 $(STATIC_OUTDIR)/libleveldb.a $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib
-+ifneq (,$(SHARED_LIBS))
-+	install -m 0755 $(SHARED_OUTDIR)/$(SHARED_LIB3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib
-+	ln -sf $(SHARED_LIB3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib/$(SHARED_LIB1)
-+	ln -sf $(SHARED_LIB3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib/$(SHARED_LIB2)
-+endif
--- 
-2.1.0
-
package/leveldb/0002-CMake-install-libmemenv.a.patch new file +68 -0

68 lines not on this page · raw message

package/leveldb/0003-Generate-position-independant-code-for-static-librar.patch deleted +0 -52

52 lines not on this page · raw message

package/leveldb/Config.in +4 -2
index 163a75e8f2..c767b88645 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LEVELDB
 	bool "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
@@ -10,5 +11,6 @@ config BR2_PACKAGE_LEVELDB
 
 	  https://github.com/google/leveldb
 
-comment "leveldb needs a toolchain w/ C++, threads"
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+comment "leveldb needs a toolchain w/ C++, threads, gcc >= 4.8"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
package/leveldb/leveldb.hash +2 -1
index 008c1a6c40..c4a8499dec 100644
@@ -1,2 +1,3 @@
 # Locally calculated
-sha256 f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664  leveldb-1.20.tar.gz
+sha256 55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2  leveldb-1.22.tar.gz
+sha256 ccc19f1da0798ed666609b65a5b44dd8b3abe6fc08b9c0592eb76e82e174db19  LICENSE
package/leveldb/leveldb.mk +3 -27
index 6c1a0e66fb..8aabc7e7a7 100644
@@ -4,35 +4,11 @@
 #
 ################################################################################
 
-LEVELDB_VERSION = 1.20
-LEVELDB_SITE = $(call github,google,leveldb,v$(LEVELDB_VERSION))
+LEVELDB_VERSION = 1.22
+LEVELDB_SITE = $(call github,google,leveldb,$(LEVELDB_VERSION))
 LEVELDB_LICENSE = BSD-3-Clause
 LEVELDB_LICENSE_FILES = LICENSE
 LEVELDB_INSTALL_STAGING = YES
 LEVELDB_DEPENDENCIES = snappy
 
-# Disable the shared library for static only build
-ifeq ($(BR2_STATIC_LIBS),y)
-LEVELDB_MAKE_ARGS += SHARED_LIBS= SHARED_PROGRAMS=
-endif
-
-define LEVELDB_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) \
-		$(LEVELDB_MAKE_ARGS) -C $(@D)
-endef
-
-define LEVELDB_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE1) \
-		INSTALL_ROOT=$(STAGING_DIR) INSTALL_PREFIX=/usr \
-		$(LEVELDB_MAKE_ARGS) -C $(@D) install
-	$(INSTALL) -D -m 0644 $(@D)/out-static/libmemenv.a $(STAGING_DIR)/usr/lib/libmemenv.a
-	$(INSTALL) -D -m 0644 $(@D)/helpers/memenv/memenv.h $(STAGING_DIR)/usr/include/helpers/memenv/memenv.h
-endef
-
-define LEVELDB_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE1) \
-		INSTALL_ROOT=$(TARGET_DIR) INSTALL_PREFIX=/usr \
-		$(LEVELDB_MAKE_ARGS) -C $(@D) install
-endef
-
-$(eval $(generic-package))
+$(eval $(cmake-package))
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 package/leveldb: bump version to 1.22

Quoted 8 lines · On Sat, 12 Oct 2019 14:59:43 +0200 Bernd Kuhls <[email protected]> wrote:

Upstream switched to cmake, removed patches for the old buildsystem and added new patch to install libmemenv.a and memenv.h.

Added license hash.

Package requires gcc >= 4.8:
https://github.com/google/leveldb/blob/master/CMakeLists.txt#L14

Quoted 8 lines

Removed "v" from LEVELDB_SITE to reflect current naming scheme.

---
v2: added patch to CMake build system to build/install
libmemenv.a and memenv.h (Thomas)
Patch not sent upstream due to
https://github.com/google/leveldb/issues/236#issuecomment-398199946

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 package/leveldb: bump version to 1.22

In reply to Bernd Kuhls
Quoted 8 lines · On Sat, 12 Oct 2019 14:59:43 +0200 Bernd Kuhls <[email protected]> wrote:

Upstream switched to cmake, removed patches for the old buildsystem and added new patch to install libmemenv.a and memenv.h.

Added license hash.

Package requires gcc >= 4.8:
https://github.com/google/leveldb/blob/master/CMakeLists.txt#L14

Quoted 8 lines

Removed "v" from LEVELDB_SITE to reflect current naming scheme.

---
v2: added patch to CMake build system to build/install
libmemenv.a and memenv.h (Thomas)
Patch not sent upstream due to
https://github.com/google/leveldb/issues/236#issuecomment-398199946

This new version of leveldb is causing some build failures:
http://autobuild.buildroot.net/?reason=leveldb-1.22. Could you have a look ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com