depends: protobuf: update to 28.2

This commit is contained in:
tobtoht 2024-09-29 09:36:18 +02:00
parent 0634845cb9
commit 6cf0362ae3
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
13 changed files with 104 additions and 34 deletions

View file

@ -15,6 +15,8 @@ set(PACKAGE_URL "https://featherwallet.org/")
set(COPYRIGHT_YEAR "2024")
set(COPYRIGHT_HOLDERS "The Monero Project")
cmake_policy(SET CMP0074 NEW)
# Configurable options
option(STATIC "Link libraries statically, requires static Qt" OFF)
option(SELF_CONTAINED "Disable when building Feather for packages" OFF)

View file

@ -0,0 +1,27 @@
package=abseil
$(package)_version=$(native_$(package)_version)
$(package)_download_path=$(native_$(package)_download_path)
$(package)_download_file=$(native_$(package)_download_file)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_patches=no_librt.patch
define $(package)_set_vars
$(package)_cxxflags+=-std=c++17
endef
define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/no_librt.patch
endef
define $(package)_config_cmds
$($(package)_cmake)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View file

@ -0,0 +1,18 @@
package=native_abseil
$(package)_version=20240722.0
$(package)_download_path=https://github.com/abseil/abseil-cpp/archive/refs/tags/
$(package)_download_file=$($(package)_version).tar.gz
$(package)_file_name=abseil-$($(package)_version).tar.gz
$(package)_sha256_hash=f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3
define $(package)_config_cmds
$($(package)_cmake)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View file

@ -1,27 +1,34 @@
package=native_protobuf
$(package)_version=3.21.12
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v21.12/
$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
$(package)_sha256_hash=4eab9b524aa5913c6fffb20b2a8abf5ef7f95a80bc0701f3a6dbb4c607f73460
$(package)_cxxflags=-std=c++11
$(package)_version=28.2
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)
$(package)_file_name=protobuf-$($(package)_version).tar.gz
$(package)_sha256_hash=b2340aa47faf7ef10a0328190319d3f3bee1b24f426d4ce8f4253b6f27ce16db
$(package)_dependencies=native_abseil
define $(package)_set_vars
$(package)_config_opts=--disable-shared --prefix=$(build_prefix)
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags+=-std=c++17
$(package)_config_opts=-Dprotobuf_BUILD_TESTS=OFF
$(package)_config_opts+=-Dprotobuf_ABSL_PROVIDER=package
$(package)_config_opts+=-Dprotobuf_BUILD_SHARED_LIBS=OFF
$(package)_config_opts+=-Dprotobuf_WITH_ZLIB=OFF
endef
define $(package)_preprocess_cmds
rm -rf docs php/src/GPBMetadata compatibility objectivec/Tests csharp/keys php/tests src/google/protobuf/testdata csharp/src/Google.Protobuf.Test
endef
define $(package)_config_cmds
$($(package)_autoconf)
$($(package)_cmake)
endef
define $(package)_build_cmds
$(MAKE) -C src protoc
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-binPROGRAMS install-nobase_dist_protoDATA
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm -rf lib/
rm -rf lib64
endef

View file

@ -1,5 +1,5 @@
packages := boost openssl libiconv unbound qrencode libsodium polyseed hidapi protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp
native_packages := native_qt native_protobuf
packages := boost openssl libiconv unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp
native_packages := native_qt native_abseil native_protobuf
linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime
linux_native_packages =

View file

@ -3,27 +3,29 @@ $(package)_version=$(native_$(package)_version)
$(package)_download_path=$(native_$(package)_download_path)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_dependencies=native_$(package)
$(package)_cxxflags=-std=c++11
$(package)_dependencies=abseil
define $(package)_set_vars
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags+=-std=c++17
$(package)_config_opts=-Dprotobuf_ABSL_PROVIDER=package
$(package)_config_opts+=-Dprotobuf_BUILD_TESTS=OFF
$(package)_config_opts+=-Dprotobuf_BUILD_SHARED_LIBS=OFF
$(package)_config_opts+=-Dprotobuf_BUILD_PROTOC_BINARIES=OFF
$(package)_config_opts+=-Dprotobuf_WITH_ZLIB=OFF
endef
define $(package)_preprocess_cmds
rm -rf docs php/src/GPBMetadata compatibility objectivec/Tests csharp/keys php/tests src/google/protobuf/testdata csharp/src/Google.Protobuf.Test
endef
define $(package)_config_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub ./third_party/googletest/googletest/build-aux/ && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub ./third_party/googletest/googlemock/build-aux/ && \
$($(package)_autoconf)
$($(package)_cmake)
endef
define $(package)_build_cmds
$(MAKE) -C src libprotobuf.la
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-nobase_includeHEADERS &&\
$(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA &&\
cp -f src/.libs/libprotobuf.a $($(package)_staging_prefix_dir)/lib/
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View file

@ -54,7 +54,6 @@ $(package)_config_opts += -DINSTALL_LIBEXECDIR=$(build_prefix)/bin
$(package)_config_opts += -DQT_BUILD_EXAMPLES=FALSE
$(package)_config_opts += -DQT_BUILD_TESTS=FALSE
$(package)_config_opts += -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
$(package)_config_opts += -DINPUT_cups=no
$(package)_config_opts += -DINPUT_egl=no
$(package)_config_opts += -DINPUT_eglfs=no

View file

@ -0,0 +1,12 @@
diff --git a/absl/base/CMakeLists.txt b/absl/base/CMakeLists.txt
index 97994fc6..06ab426c 100644
--- a/absl/base/CMakeLists.txt
+++ b/absl/base/CMakeLists.txt
@@ -240,7 +240,6 @@ absl_cc_library(
${ABSL_DEFAULT_COPTS}
LINKOPTS
${ABSL_DEFAULT_LINKOPTS}
- $<$<BOOL:${LIBRT}>:-lrt>
$<$<BOOL:${MINGW}>:-ladvapi32>
DEPS
absl::atomic_hook

View file

@ -37,6 +37,9 @@ SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
SET(UNBOUND_INCLUDE_DIR @prefix@/include)
SET(UNBOUND_LIBRARIES @prefix@/lib/libunbound.a)
SET(CMAKE_FIND_USE_PACKAGE_ROOT_PATH ON)
SET(absl_ROOT @prefix@)
SET(NATIVE_BIN_PATH @prefix@/native/bin CACHE FILEPATH "path to native binaries" FORCE)
SET(LRELEASE_PATH @prefix@/native/bin CACHE FILEPATH "path to lrelease" FORCE)
@ -49,11 +52,6 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
SET(LIBUSB-1.0_LIBRARY @prefix@/lib/libusb-1.0.a)
SET(LIBUDEV_LIBRARY @prefix@/lib/libudev.a)
SET(Protobuf_FOUND 1)
SET(Protobuf_PROTOC_EXECUTABLE @prefix@/native/bin/protoc CACHE FILEPATH "Path to the native protoc")
SET(Protobuf_INCLUDE_DIR @prefix@/include CACHE PATH "Protobuf include dir")
SET(Protobuf_INCLUDE_DIRS @prefix@/include CACHE PATH "Protobuf include dir")
SET(Protobuf_LIBRARY @prefix@/lib/libprotobuf.a CACHE FILEPATH "Protobuf library")
endif()
endif()

View file

@ -292,6 +292,8 @@ case "$HOST" in
arm-linux-gnueabihf) HOST_CXXFLAGS="${HOST_CXXFLAGS} -Wno-psabi" ;;
esac
export USE_DEVICE_TREZOR_MANDATORY=1
# Make $HOST-specific native binaries from depends available in $PATH
export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
mkdir -p "$DISTSRC"

View file

@ -319,8 +319,8 @@ chain for " target " development."))
(make-bitcoin-cross-toolchain target)))
((string-contains target "darwin")
(list
gcc-toolchain-10
(list gcc-toolchain-10 "static")
gcc-toolchain-11
(list gcc-toolchain-11 "static")
binutils
clang-toolchain-10
ldid))

2
monero

@ -1 +1 @@
Subproject commit 6a88faa9af20c56363bac563a5c0b803ea2695dd
Subproject commit e572251b548b913dd00079d1ddeef4dea79a8f58

View file

@ -293,6 +293,9 @@ if(DEPENDS)
endif()
if(DEVICE_TREZOR_READY)
if (DEPENDS)
find_package(Protobuf CONFIG REQUIRED)
endif()
target_link_libraries(feather PRIVATE ${TREZOR_DEP_LIBS})
endif()