From patchwork Sat Oct 12 12:59:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1175711 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46r4fx1kBlz9sPT for ; Sun, 13 Oct 2019 00:00:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7A56620397; Sat, 12 Oct 2019 13:00:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YRRIesOo0voH; Sat, 12 Oct 2019 13:00:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 207B12033D; Sat, 12 Oct 2019 13:00:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 36CCB1BF27C for ; Sat, 12 Oct 2019 12:59:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3041787DE1 for ; Sat, 12 Oct 2019 12:59:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KkPIq5hXHjVM for ; Sat, 12 Oct 2019 12:59:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id 28F2F80D09 for ; Sat, 12 Oct 2019 12:59:55 +0000 (UTC) Received: from fwd40.aul.t-online.de (fwd40.aul.t-online.de [172.20.26.139]) by mailout02.t-online.de (Postfix) with SMTP id 74E4241E24CE; Sat, 12 Oct 2019 14:59:53 +0200 (CEST) Received: from fli4l.lan.fli4l (E2jHv6Z6ZhkSu-xCKnosjHQcfHapf8GZ+-oojivfoZDPktZTylhIJti6AhHhG6+gmn@[84.161.190.184]) by fwd40.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1iJGzs-23MfTM0; Sat, 12 Oct 2019 14:59:48 +0200 Received: from mahler.lan.fli4l ([192.168.1.1]:41448) by fli4l.lan.fli4l with esmtp (Exim 4.92.3) (envelope-from ) id 1iJGzq-0003Cd-OW; Sat, 12 Oct 2019 14:59:47 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sat, 12 Oct 2019 14:59:43 +0200 Message-Id: <20191012125943.6749-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-ID: E2jHv6Z6ZhkSu-xCKnosjHQcfHapf8GZ+-oojivfoZDPktZTylhIJti6AhHhG6+gmn X-TOI-MSGID: 72cbf005-ea71-43cc-9c17-9c7542ca0f7c Subject: [Buildroot] [PATCH v2 1/1] package/leveldb: bump version to 1.22 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , =?utf-8?q?Ga?= =?utf-8?q?=C3=ABl_PORTAY?= , Steve James Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. Signed-off-by: Bernd Kuhls --- 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 diff --git a/package/leveldb/0002-Add-install-recipe.patch b/package/leveldb/0002-Add-install-recipe.patch deleted file mode 100644 index 29bf4a4831..0000000000 --- a/package/leveldb/0002-Add-install-recipe.patch +++ /dev/null @@ -1,42 +0,0 @@ -From bf646b73391d3d2d0b9780a399dd24880c66b9ab Mon Sep 17 00:00:00 2001 -From: Steve James -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 -Signed-off-by: Thomas Petazzoni -[baruch: update for v1.19] -Signed-off-by: Baruch Siach -[Bernd: update for v1.20] -Signed-off-by: Bernd Kuhls ---- - 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 - diff --git a/package/leveldb/0002-CMake-install-libmemenv.a.patch b/package/leveldb/0002-CMake-install-libmemenv.a.patch new file mode 100644 index 0000000000..85ee8a824b --- /dev/null +++ b/package/leveldb/0002-CMake-install-libmemenv.a.patch @@ -0,0 +1,68 @@ +From 2fa960098e5b6f9daa9f7d6cab27188566859be8 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 12 Oct 2019 14:43:46 +0200 +Subject: [PATCH] CMake: install libmemenv.a + +Needed for qt5webkit +https://git.busybox.net/buildroot/commit/?id=8a10d9ce311c6cb0490d76921cae55618c258354 +https://git.busybox.net/buildroot/commit/?id=16f847340d07dce620e4c3fc0a099aa79898d86a + +Signed-off-by: Bernd Kuhls +--- + CMakeLists.txt | 26 +++++++++++++++++++++++++- + 1 file changed, 25 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a65afbf..83b2425 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -199,6 +199,24 @@ target_sources(leveldb + "${LEVELDB_PUBLIC_INCLUDE_DIR}/write_batch.h" + ) + ++set(libmemenv_a_sources ++ "${PROJECT_SOURCE_DIR}/helpers/memenv/memenv.cc" ++ "${PROJECT_SOURCE_DIR}/helpers/memenv/memenv.h" ++ ) ++add_library(memenv STATIC ${libmemenv_a_sources}) ++target_compile_definitions(memenv ++ PRIVATE ++ # Used by include/export.h when building shared libraries. ++ LEVELDB_COMPILE_LIBRARY ++ # Used by port/port.h. ++ ${LEVELDB_PLATFORM_NAME}=1 ++) ++target_include_directories(memenv ++ PUBLIC ++ $ ++ $ ++) ++ + if (WIN32) + target_sources(leveldb + PRIVATE +@@ -418,7 +436,7 @@ endif(LEVELDB_BUILD_BENCHMARKS) + + if(LEVELDB_INSTALL) + include(GNUInstallDirs) +- install(TARGETS leveldb ++ install(TARGETS leveldb memenv + EXPORT leveldbTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -444,6 +462,12 @@ if(LEVELDB_INSTALL) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/leveldb + ) + ++ install( ++ FILES ++ "${PROJECT_SOURCE_DIR}/helpers/memenv/memenv.h" ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/helpers/memenv ++ ) ++ + include(CMakePackageConfigHelpers) + write_basic_package_version_file( + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" +-- +2.20.1 + diff --git a/package/leveldb/0003-Generate-position-independant-code-for-static-librar.patch b/package/leveldb/0003-Generate-position-independant-code-for-static-librar.patch deleted file mode 100644 index dce06ec725..0000000000 --- a/package/leveldb/0003-Generate-position-independant-code-for-static-librar.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 6ed1b57ef6bcee0d497c181730710b2b0fafbfb3 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= -Date: Fri, 31 Aug 2018 12:23:46 -0400 -Subject: [PATCH] Generate position independant code for static library -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit - -Currently, only shared libraries are using the PIC flag. - -Generalize this flag for static libraries in order to let them linkable -by dynamic libraries. - -Fixes: - - /home/gportay/src/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-amd-linux-gnu/6.2.0/../../../../x86_64-amd-linux-gnu/bin/ld: /home/gportay/src/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libmemenv.a(memenv.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC - /home/gportay/src/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libmemenv.a: error adding symbols: Bad value - collect2: error: ld returned 1 exit status - -Upstream-Status: Inappropriate [upstream has migrated to cmake] -Signed-off-by: Gaƫl PORTAY ---- - build_detect_platform | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/build_detect_platform b/build_detect_platform -index d2a20ce..4839444 100755 ---- a/build_detect_platform -+++ b/build_detect_platform -@@ -55,8 +55,8 @@ fi - - COMMON_FLAGS= - CROSS_COMPILE= --PLATFORM_CCFLAGS= --PLATFORM_CXXFLAGS= -+PLATFORM_CCFLAGS="-fPIC" -+PLATFORM_CXXFLAGS="-fPIC" - PLATFORM_LDFLAGS= - PLATFORM_LIBS= - PLATFORM_SHARED_EXT="so" -@@ -197,7 +197,7 @@ else - EOF - if [ "$?" = 0 ]; then - COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT" -- PLATFORM_CXXFLAGS="-std=c++0x" -+ PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS -std=c++0x" - else - COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX" - fi --- -2.18.0 - diff --git a/package/leveldb/Config.in b/package/leveldb/Config.in index 163a75e8f2..c767b88645 100644 --- a/package/leveldb/Config.in +++ b/package/leveldb/Config.in @@ -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 diff --git a/package/leveldb/leveldb.hash b/package/leveldb/leveldb.hash index 008c1a6c40..c4a8499dec 100644 --- a/package/leveldb/leveldb.hash +++ b/package/leveldb/leveldb.hash @@ -1,2 +1,3 @@ # Locally calculated -sha256 f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664 leveldb-1.20.tar.gz +sha256 55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2 leveldb-1.22.tar.gz +sha256 ccc19f1da0798ed666609b65a5b44dd8b3abe6fc08b9c0592eb76e82e174db19 LICENSE diff --git a/package/leveldb/leveldb.mk b/package/leveldb/leveldb.mk index 6c1a0e66fb..8aabc7e7a7 100644 --- a/package/leveldb/leveldb.mk +++ b/package/leveldb/leveldb.mk @@ -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))