From cc8486c6c58f4b77d442f36b77bcc458ebcae30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 15 Mar 2021 22:01:47 +0700 Subject: [PATCH 1/6] spdlog: build shared lib --- common/shlibs | 1 + srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++ srcpkgs/spdlog/template | 14 ++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch diff --git a/common/shlibs b/common/shlibs index 86567af2ad0f..d463813d035e 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3966,3 +3966,4 @@ libsimavrparts.so.1 simavr-1.6_2 libsword-1.8.1.so libsword-1.8.1_6 libpari-gmp.so.7 pari-2.13.0_1 libtree-sitter.so.0 tree-sitter-0.19.0_1 +libspdlog.so.1 libspdlog-1.8.2_2 diff --git a/srcpkgs/spdlog/patches/fix-pkgconfig.patch b/srcpkgs/spdlog/patches/fix-pkgconfig.patch new file mode 100644 index 000000000000..99c8b7ff1068 --- /dev/null +++ b/srcpkgs/spdlog/patches/fix-pkgconfig.patch @@ -0,0 +1,12 @@ +Index: spdlog-1.8.2/cmake/spdlog.pc.in +=================================================================== +--- spdlog-1.8.2.orig/cmake/spdlog.pc.in ++++ spdlog-1.8.2/cmake/spdlog.pc.in +@@ -8,6 +8,6 @@ Description: Fast C++ logging library. + URL: https://github.com/gabime/@PROJECT_NAME@ + Version: @SPDLOG_VERSION@ + CFlags: -I${includedir} @PKG_CONFIG_DEFINES@ +-Libs: -L${libdir} -lspdlog -pthread ++Libs: -L${libdir} -lspdlog -lfmt -pthread + Requires: @PKG_CONFIG_REQUIRES@ + diff --git a/srcpkgs/spdlog/template b/srcpkgs/spdlog/template index 2a8e1c9e8f16..184a4d891698 100644 --- a/srcpkgs/spdlog/template +++ b/srcpkgs/spdlog/template @@ -1,11 +1,13 @@ # Template file for 'spdlog' pkgname=spdlog version=1.8.2 -revision=1 +revision=2 build_style=cmake -configure_args="-DSPDLOG_BUILD_EXAMPLE=OFF -DSPDLOG_FMT_EXTERNAL=ON" +configure_args="-DSPDLOG_BUILD_EXAMPLE=OFF -DSPDLOG_FMT_EXTERNAL=ON + -DSPDLOG_BUILD_SHARED=ON" hostmakedepends="pkg-config" makedepends="fmt-devel" +depends="libspdlog>=${version}_${revision} fmt-devel" short_desc="Fast C++ logging library" maintainer="Orphaned " license="MIT" @@ -17,6 +19,10 @@ if [ "$XBPS_CHECK_PKGS" ]; then configure_args+=" -DSPDLOG_BUILD_TESTS_HO=ON" fi -post_install() { - vlicense LICENSE +libspdlog_package() { + short_desc+=" - libraries" + pkg_install() { + vmove "usr/lib/*.so.*" + vlicense LICENSE + } } From 67656df2fc766b2618addabd3b0a45e4142dd206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 15 Mar 2021 22:02:20 +0700 Subject: [PATCH 2/6] Waybar: use shared spdlog --- srcpkgs/Waybar/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/Waybar/template b/srcpkgs/Waybar/template index 16588a75f874..13b84b38d847 100644 --- a/srcpkgs/Waybar/template +++ b/srcpkgs/Waybar/template @@ -1,7 +1,7 @@ # Template file for 'Waybar' pkgname=Waybar version=0.9.5 -revision=1 +revision=2 _date_version=3.0.0 create_wrksrc=yes build_wrksrc=${pkgname}-${version} From 918d7cf2decc5cbc52661bd6c8db66a9ed7dd3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 15 Mar 2021 22:02:29 +0700 Subject: [PATCH 3/6] gerbera: use shared spdlog --- srcpkgs/gerbera/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/gerbera/template b/srcpkgs/gerbera/template index 451f9eff5398..13ff8252378d 100644 --- a/srcpkgs/gerbera/template +++ b/srcpkgs/gerbera/template @@ -1,7 +1,7 @@ # Template file for 'gerbera' pkgname=gerbera version=1.6.4 -revision=2 +revision=3 build_style=cmake configure_args="-DWITH_SYSTEMD=0 -DWITH_AVCODEC=1" hostmakedepends="pkg-config" From 0c0e34aed144480d4b6596e1249c302a7c59cadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 15 Mar 2021 22:02:34 +0700 Subject: [PATCH 4/6] libixion: use shared spdlog --- srcpkgs/libixion/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libixion/template b/srcpkgs/libixion/template index 2d709b3f88b6..6ffb939d830b 100644 --- a/srcpkgs/libixion/template +++ b/srcpkgs/libixion/template @@ -1,7 +1,7 @@ # Template file for 'libixion' pkgname=libixion version=0.16.1 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config python3" makedepends="boost-devel fmt-devel mdds python3-devel spdlog" From 30ac9efefc232f13a16919ed70cf9bf58d181b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 15 Mar 2021 22:02:42 +0700 Subject: [PATCH 5/6] nheko: use shared spdlog --- srcpkgs/nheko/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/nheko/template b/srcpkgs/nheko/template index 541d113a16e6..dd635f70f249 100644 --- a/srcpkgs/nheko/template +++ b/srcpkgs/nheko/template @@ -1,7 +1,7 @@ # Template file for 'nheko' pkgname=nheko version=0.7.2 -revision=2 +revision=3 build_style=cmake hostmakedepends="qt5-host-tools qt5-qmake pkg-config qt5-declarative" makedepends="qt5-multimedia-devel qt5-svg-devel qt5-tools-devel fmt-devel From 69bf341680c994315f1374fca8ad8e3df334e731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 15 Mar 2021 23:26:33 +0700 Subject: [PATCH 6/6] cryfs: un-vendor, build with None build type --- .../cryfs/patches/allow-build-type-none.patch | 33 ++++ srcpkgs/cryfs/patches/de-vendor.patch | 180 ++++++++++++++++++ .../rename-simple-to-basic-filesink.patch | 21 ++ srcpkgs/cryfs/patches/spdlog-include.patch | 33 ++++ srcpkgs/cryfs/template | 20 +- 5 files changed, 284 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/cryfs/patches/allow-build-type-none.patch create mode 100644 srcpkgs/cryfs/patches/de-vendor.patch create mode 100644 srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch create mode 100644 srcpkgs/cryfs/patches/spdlog-include.patch diff --git a/srcpkgs/cryfs/patches/allow-build-type-none.patch b/srcpkgs/cryfs/patches/allow-build-type-none.patch new file mode 100644 index 000000000000..e591974c05f4 --- /dev/null +++ b/srcpkgs/cryfs/patches/allow-build-type-none.patch @@ -0,0 +1,33 @@ +Index: cryfs-0.10.2/doc/CMakeLists.txt +=================================================================== +--- cryfs-0.10.2.orig/doc/CMakeLists.txt ++++ cryfs-0.10.2/doc/CMakeLists.txt +@@ -15,6 +15,5 @@ ELSE (WIN32) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cryfs.1.gz + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 +- CONFIGURATIONS Release + ) + ENDIF(WIN32) +Index: cryfs-0.10.2/src/cryfs-cli/CMakeLists.txt +=================================================================== +--- cryfs-0.10.2.orig/src/cryfs-cli/CMakeLists.txt ++++ cryfs-0.10.2/src/cryfs-cli/CMakeLists.txt +@@ -27,6 +27,5 @@ target_enable_style_warnings(${PROJECT_N + target_activate_cpp14(${PROJECT_NAME}_bin) + + install(TARGETS ${PROJECT_NAME}_bin +- CONFIGURATIONS Debug Release RelWithDebInfo + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) +Index: cryfs-0.10.2/src/cryfs-unmount/CMakeLists.txt +=================================================================== +--- cryfs-0.10.2.orig/src/cryfs-unmount/CMakeLists.txt ++++ cryfs-0.10.2/src/cryfs-unmount/CMakeLists.txt +@@ -19,6 +19,5 @@ target_enable_style_warnings(${PROJECT_N + target_activate_cpp14(${PROJECT_NAME}_bin) + + install(TARGETS ${PROJECT_NAME}_bin +- CONFIGURATIONS Debug Release RelWithDebInfo + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) diff --git a/srcpkgs/cryfs/patches/de-vendor.patch b/srcpkgs/cryfs/patches/de-vendor.patch new file mode 100644 index 000000000000..4909cad7b84a --- /dev/null +++ b/srcpkgs/cryfs/patches/de-vendor.patch @@ -0,0 +1,180 @@ +Index: cryfs-0.10.2/src/blockstore/implementations/compressing/compressors/Gzip.cpp +=================================================================== +--- cryfs-0.10.2.orig/src/blockstore/implementations/compressing/compressors/Gzip.cpp ++++ cryfs-0.10.2/src/blockstore/implementations/compressing/compressors/Gzip.cpp +@@ -1,6 +1,6 @@ + #include "cpp-utils/crypto/cryptopp_byte.h" + #include "Gzip.h" +-#include ++#include + + using cpputils::Data; + +Index: cryfs-0.10.2/src/cpp-utils/crypto/cryptopp_byte.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/crypto/cryptopp_byte.h ++++ cryfs-0.10.2/src/cpp-utils/crypto/cryptopp_byte.h +@@ -2,7 +2,7 @@ + #ifndef _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H + #define _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H + +-#include ++#include + + // If we're running an older CryptoPP version, CryptoPP::byte isn't defined yet. + // Define it. Refer to "byte" type in the global namespace (placed by CryptoPP). +Index: cryfs-0.10.2/src/cpp-utils/crypto/hash/Hash.cpp +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/crypto/hash/Hash.cpp ++++ cryfs-0.10.2/src/cpp-utils/crypto/hash/Hash.cpp +@@ -1,6 +1,6 @@ + #include "Hash.h" + #include +-#include ++#include + + using cpputils::Random; + using CryptoPP::SHA512; +Index: cryfs-0.10.2/src/cpp-utils/crypto/kdf/Scrypt.cpp +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/crypto/kdf/Scrypt.cpp ++++ cryfs-0.10.2/src/cpp-utils/crypto/kdf/Scrypt.cpp +@@ -1,5 +1,5 @@ + #include "Scrypt.h" +-#include ++#include + + using std::string; + +Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/CFB_Cipher.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/crypto/symmetric/CFB_Cipher.h ++++ cryfs-0.10.2/src/cpp-utils/crypto/symmetric/CFB_Cipher.h +@@ -7,7 +7,7 @@ + #include "../../data/Data.h" + #include "../../random/Random.h" + #include +-#include ++#include + #include "Cipher.h" + #include "EncryptionKey.h" + +Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/GCM_Cipher.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/crypto/symmetric/GCM_Cipher.h ++++ cryfs-0.10.2/src/cpp-utils/crypto/symmetric/GCM_Cipher.h +@@ -6,7 +6,7 @@ + #include "../../data/FixedSizeData.h" + #include "../../data/Data.h" + #include "../../random/Random.h" +-#include ++#include + #include "Cipher.h" + #include "EncryptionKey.h" + +Index: cryfs-0.10.2/src/cpp-utils/crypto/symmetric/ciphers.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/crypto/symmetric/ciphers.h ++++ cryfs-0.10.2/src/cpp-utils/crypto/symmetric/ciphers.h +@@ -2,11 +2,11 @@ + #ifndef MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_ + #define MESSMER_CPPUTILS_CRYPTO_SYMMETRIC_CIPHERS_H_ + +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include + #include "GCM_Cipher.h" + #include "CFB_Cipher.h" + +Index: cryfs-0.10.2/src/cpp-utils/data/Data.cpp +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/data/Data.cpp ++++ cryfs-0.10.2/src/cpp-utils/data/Data.cpp +@@ -1,6 +1,6 @@ + #include "Data.h" + #include +-#include ++#include + #include + + using std::istream; +Index: cryfs-0.10.2/src/cpp-utils/data/FixedSizeData.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/data/FixedSizeData.h ++++ cryfs-0.10.2/src/cpp-utils/data/FixedSizeData.h +@@ -2,7 +2,7 @@ + #ifndef MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_ + #define MESSMER_CPPUTILS_DATA_FIXEDSIZEDATA_H_ + +-#include ++#include + #include + #include + #include "../assert/assert.h" +Index: cryfs-0.10.2/src/cpp-utils/random/OSRandomGenerator.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/random/OSRandomGenerator.h ++++ cryfs-0.10.2/src/cpp-utils/random/OSRandomGenerator.h +@@ -4,7 +4,7 @@ + + #include "cpp-utils/crypto/cryptopp_byte.h" + #include "RandomGenerator.h" +-#include ++#include + + namespace cpputils { + class OSRandomGenerator final : public RandomGenerator { +Index: cryfs-0.10.2/src/cpp-utils/random/RandomGeneratorThread.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/random/RandomGeneratorThread.h ++++ cryfs-0.10.2/src/cpp-utils/random/RandomGeneratorThread.h +@@ -4,7 +4,7 @@ + + #include "../thread/LoopThread.h" + #include "ThreadsafeRandomDataBuffer.h" +-#include ++#include + + namespace cpputils { + //TODO Test +Index: cryfs-0.10.2/src/cryfs/localstate/BasedirMetadata.cpp +=================================================================== +--- cryfs-0.10.2.orig/src/cryfs/localstate/BasedirMetadata.cpp ++++ cryfs-0.10.2/src/cryfs/localstate/BasedirMetadata.cpp +@@ -1,7 +1,7 @@ + #include "BasedirMetadata.h" + #include + #include +-#include ++#include + #include + #include "LocalStateDir.h" + #include +Index: cryfs-0.10.2/test/cryfs/config/CompatibilityTest.cpp +=================================================================== +--- cryfs-0.10.2.orig/test/cryfs/config/CompatibilityTest.cpp ++++ cryfs-0.10.2/test/cryfs/config/CompatibilityTest.cpp +@@ -3,7 +3,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +Index: cryfs-0.10.2/vendor/CMakeLists.txt +=================================================================== +--- cryfs-0.10.2.orig/vendor/CMakeLists.txt ++++ cryfs-0.10.2/vendor/CMakeLists.txt +@@ -1,3 +1 @@ + add_subdirectory(googletest) +-add_subdirectory(spdlog) +-add_subdirectory(cryptopp) diff --git a/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch b/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch new file mode 100644 index 000000000000..08513cb4d0ca --- /dev/null +++ b/srcpkgs/cryfs/patches/rename-simple-to-basic-filesink.patch @@ -0,0 +1,21 @@ +Index: cryfs-0.10.2/src/cryfs-cli/Cli.cpp +=================================================================== +--- cryfs-0.10.2.orig/src/cryfs-cli/Cli.cpp ++++ cryfs-0.10.2/src/cryfs-cli/Cli.cpp +@@ -27,6 +27,7 @@ + #include "Environment.h" + #include + #include ++#include + + //TODO Many functions accessing the ProgramOptions object. Factor out into class that stores it as a member. + //TODO Factor out class handling askPassword +@@ -310,7 +311,7 @@ namespace cryfs_cli { + //TODO Test that --logfile parameter works. Should be: file if specified, otherwise stderr if foreground, else syslog. + if (options.logFile() != none) { + cpputils::logging::setLogger( +- spdlog::create>("cryfs", options.logFile()->string())); ++ spdlog::create>("cryfs", options.logFile()->string())); + } else if (options.foreground()) { + cpputils::logging::setLogger(spdlog::stderr_logger_mt("cryfs")); + } else { diff --git a/srcpkgs/cryfs/patches/spdlog-include.patch b/srcpkgs/cryfs/patches/spdlog-include.patch new file mode 100644 index 000000000000..2c1c5a926cf3 --- /dev/null +++ b/srcpkgs/cryfs/patches/spdlog-include.patch @@ -0,0 +1,33 @@ +Index: cryfs-0.10.2/src/cpp-utils/logging/Logger.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/logging/Logger.h ++++ cryfs-0.10.2/src/cpp-utils/logging/Logger.h +@@ -7,6 +7,7 @@ + #endif + + #include ++#include + #include "../macros.h" + + namespace cpputils { +Index: cryfs-0.10.2/src/cpp-utils/logging/logging.h +=================================================================== +--- cryfs-0.10.2.orig/src/cpp-utils/logging/logging.h ++++ cryfs-0.10.2/src/cpp-utils/logging/logging.h +@@ -5,6 +5,7 @@ + #include "Logger.h" + #include + #include ++#include + + #if defined(_MSC_VER) + #include +@@ -75,7 +76,7 @@ namespace cpputils { + #if defined(_MSC_VER) + return spdlog::create(name); + #else +- return spdlog::syslog_logger(name, name, LOG_PID); ++ return spdlog::syslog_logger_mt(name, name, LOG_PID); + #endif + } + } diff --git a/srcpkgs/cryfs/template b/srcpkgs/cryfs/template index e8022335f019..504a074e1ea8 100644 --- a/srcpkgs/cryfs/template +++ b/srcpkgs/cryfs/template @@ -4,9 +4,11 @@ version=0.10.2 revision=1 create_wrksrc=yes build_style=cmake -configure_args="-DCRYFS_UPDATE_CHECKS=off" -hostmakedepends="git python" -makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel" +configure_args="-DCRYFS_UPDATE_CHECKS=off -DCMAKE_BUILD_TYPE=None + -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_STANDARD_LIBRARIES=-lfmt" +hostmakedepends="pkg-config" +makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel + spdlog" depends="fuse" short_desc="Cryptographic filesystem for the cloud" maintainer="Andy Weidenbaum " @@ -15,7 +17,19 @@ homepage="https://www.cryfs.org" changelog="https://github.com/cryfs/cryfs/raw/master/ChangeLog.txt" distfiles="https://github.com/cryfs/cryfs/releases/download/${version}/${pkgname}-${version}.tar.gz" checksum=004c7fdf537062e197aaa0bcdafd2682904a279802441bb6063cb72c1fba52d2 +patch_args=-Np1 if [ "${XBPS_CHECK_PKGS}" ]; then configure_args+=" -DBUILD_TESTING=on" fi + +post_patch() { + rm -rf vendor/cryptopp + rm -rf vendor/spdlog +} + +pre_configure() { + local _pkg_config="$($PKG_CONFIG --cflags spdlog)" + CFLAGS+=" $_pkg_config" + CXXFLAGS+=" $_pkg_config" +}