Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] spdlog shared lib
@ 2021-03-15 15:12 sgn
  2021-03-15 15:13 ` sgn
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: sgn @ 2021-03-15 15:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 4494 bytes --]

From 1e3e12cbfdb7c416ce195021deab41fe8063a518 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/5] spdlog: build shared lib

---
 common/shlibs           |  1 +
 srcpkgs/spdlog/template | 14 ++++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

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/template b/srcpkgs/spdlog/template
index 2a8e1c9e8f16..fc3f6e7d6b60 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}"
 short_desc="Fast C++ logging library"
 maintainer="Orphaned <orphan@voidlinux.org>"
 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 c6c68e55c5af4a26257dcb7b45a5b798f170584f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:20 +0700
Subject: [PATCH 2/5] 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 5634e6f71d46e185365e5e7e6c2d89563d72783f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:29 +0700
Subject: [PATCH 3/5] 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 c06d738c298594ff9338823b85f04a9dbb497440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:34 +0700
Subject: [PATCH 4/5] 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 1497a61705a05826ffcbf5cb3215416de5faae0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:42 +0700
Subject: [PATCH 5/5] 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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
@ 2021-03-15 15:13 ` sgn
  2021-03-15 15:39 ` [PR PATCH] [Updated] " sgn
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-15 15:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/29489#issuecomment-799499605

Comment:
@Johnnynator Do you recall any reason you didn't build shared lib back in time?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
  2021-03-15 15:13 ` sgn
@ 2021-03-15 15:39 ` sgn
  2021-03-15 16:27 ` sgn
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-15 15:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 4504 bytes --]

From 4d71ff346b1c1de6fb77796196dd4c2b650c13f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/5] spdlog: build shared lib

---
 common/shlibs           |  1 +
 srcpkgs/spdlog/template | 14 ++++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

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/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 <orphan@voidlinux.org>"
 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 960bc4adbffef516ac2bdc928f282062f994e661 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:20 +0700
Subject: [PATCH 2/5] 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 ab3fd7d00ba6152f64232ae58ad06027d7cab2e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:29 +0700
Subject: [PATCH 3/5] 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 3d344b69f6f4059b5664340840190af2035ba48e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:34 +0700
Subject: [PATCH 4/5] 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 d381283f53efa6171d2df7fce6b03b5003479139 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:42 +0700
Subject: [PATCH 5/5] 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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
  2021-03-15 15:13 ` sgn
  2021-03-15 15:39 ` [PR PATCH] [Updated] " sgn
@ 2021-03-15 16:27 ` sgn
  2021-03-15 16:27 ` sgn
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-15 16:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 19187 bytes --]

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?=
 <congdanhqx@gmail.com>
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 <orphan@voidlinux.org>"
 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?=
 <congdanhqx@gmail.com>
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?=
 <congdanhqx@gmail.com>
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?=
 <congdanhqx@gmail.com>
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?=
 <congdanhqx@gmail.com>
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?=
 <congdanhqx@gmail.com>
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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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 <atweiden@tutanota.de>"
@@ -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"
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (2 preceding siblings ...)
  2021-03-15 16:27 ` sgn
@ 2021-03-15 16:27 ` sgn
  2021-03-15 18:01 ` Johnnynator
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-15 16:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/29489#issuecomment-799557776

Comment:
@atweiden cryfs is un-vendored

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (3 preceding siblings ...)
  2021-03-15 16:27 ` sgn
@ 2021-03-15 18:01 ` Johnnynator
  2021-03-16  0:15 ` [PR PATCH] [Updated] " sgn
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Johnnynator @ 2021-03-15 18:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/29489#issuecomment-799628961

Comment:
> @Johnnynator Do you recall any reason you didn't build shared lib back in time?

:shrug: Reason is probably that it wasn't really supported when packaging it initially and I was never bothered to fix it afterwards.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (4 preceding siblings ...)
  2021-03-15 18:01 ` Johnnynator
@ 2021-03-16  0:15 ` sgn
  2021-03-16  0:18 ` sgn
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16  0:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 19641 bytes --]

From 272b3d5c88e65396f8412a84abe401ba2bc76c1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 14 ++++++++++----
 4 files changed, 25 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 462846b97390..41d9f5547605 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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 <orphan@voidlinux.org>"
 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 796aeec8625525ae0d0dc09e9078fe0bf0a33363 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 6f2615e2839e07431862522bf42568cb3436747c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 bbab74bf54ec3e2b63eea344bbb0950fa3e14c13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 71c13b33184f6f7f0c2e0522b6d19da769e13d94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 eda38fbf10e14344ff81c8ebb935a623e53bc448 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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 <atweiden@tutanota.de>"
@@ -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"
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (5 preceding siblings ...)
  2021-03-16  0:15 ` [PR PATCH] [Updated] " sgn
@ 2021-03-16  0:18 ` sgn
  2021-03-16  1:29 ` sgn
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16  0:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 19836 bytes --]

From ee20dd46cb9df72fa7129192441e9c4bf848b0e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 26 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 462846b97390..41d9f5547605 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 8a868a62f14e3b91405befe74a972537c0da7c95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 209997d9789ac58e62b013e7ede1f2927ff08be2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 7f4675ef301ff42c9da1b483a4c5ffc26b44f8dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 6e34b7d75d984a762963771cf99f4417400c7311 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 f5a82aca16f10d3eb699f81af85ce2d7abe236cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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 <atweiden@tutanota.de>"
@@ -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"
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (6 preceding siblings ...)
  2021-03-16  0:18 ` sgn
@ 2021-03-16  1:29 ` sgn
  2021-03-16  1:44 ` sgn
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16  1:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 21071 bytes --]

From 5fa243b7a5902bdaa07d4cd6cd068fc9916c3526 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 26 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 27fdddc90d72..adf35f728423 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 6e4a7a665e4851fa8257dc49d0a3b79e468bb23b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 e9857a690fd4327b75f4b398007ccc573274bbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 197565a45807283913b6ab17df8711a733bbc769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 a2d187defad61b0b080b85404b752738e0be7550 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 f1c8f3b3a1690291e9ef44fcbe4ac0b4e7682bb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 ++++++++++++++++++
 srcpkgs/cryfs/patches/fix-test.patch          |  22 +++
 .../rename-simple-to-basic-filesink.patch     |  21 ++
 srcpkgs/cryfs/patches/spdlog-include.patch    |  33 ++++
 srcpkgs/cryfs/template                        |  20 +-
 6 files changed, 306 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/fix-test.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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch
new file mode 100644
index 000000000000..d3a5847b1a3c
--- /dev/null
+++ b/srcpkgs/cryfs/patches/fix-test.patch
@@ -0,0 +1,22 @@
+Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+===================================================================
+--- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h
++++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+@@ -11,8 +11,7 @@ class MockLogger final {
+ public:
+     MockLogger():
+             _capturedLogData(),
+-            _sink(std::make_shared<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
+-            _logger(spdlog::create("MockLogger", {_sink})) {
++            _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
+     }
+ 
+     ~MockLogger() {
+@@ -28,7 +27,6 @@ public:
+     }
+ private:
+     std::ostringstream _capturedLogData;
+-    std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
+     std::shared_ptr<spdlog::logger> _logger;
+ };
+ 
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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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 <atweiden@tutanota.de>"
@@ -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"
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (7 preceding siblings ...)
  2021-03-16  1:29 ` sgn
@ 2021-03-16  1:44 ` sgn
  2021-03-16 15:33 ` sgn
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 21430 bytes --]

From 5fa243b7a5902bdaa07d4cd6cd068fc9916c3526 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 26 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 27fdddc90d72..adf35f728423 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 6e4a7a665e4851fa8257dc49d0a3b79e468bb23b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 e9857a690fd4327b75f4b398007ccc573274bbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 197565a45807283913b6ab17df8711a733bbc769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 a2d187defad61b0b080b85404b752738e0be7550 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 df84d3e6ae1f622de2e615b9253afeedbfe90b8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 ++++++++++++++++++
 srcpkgs/cryfs/patches/fix-test.patch          |  22 +++
 .../rename-simple-to-basic-filesink.patch     |  21 ++
 srcpkgs/cryfs/patches/spdlog-include.patch    |  33 ++++
 srcpkgs/cryfs/template                        |  33 +++-
 6 files changed, 319 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/fix-test.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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch
new file mode 100644
index 000000000000..d3a5847b1a3c
--- /dev/null
+++ b/srcpkgs/cryfs/patches/fix-test.patch
@@ -0,0 +1,22 @@
+Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+===================================================================
+--- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h
++++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+@@ -11,8 +11,7 @@ class MockLogger final {
+ public:
+     MockLogger():
+             _capturedLogData(),
+-            _sink(std::make_shared<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
+-            _logger(spdlog::create("MockLogger", {_sink})) {
++            _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
+     }
+ 
+     ~MockLogger() {
+@@ -28,7 +27,6 @@ public:
+     }
+ private:
+     std::ostringstream _capturedLogData;
+-    std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
+     std::shared_ptr<spdlog::logger> _logger;
+ };
+ 
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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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..36d5fe81d552 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 <atweiden@tutanota.de>"
@@ -15,7 +17,32 @@ 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"
+}
+
+do_check() {
+	cd ${wrksrc}/build
+	# XXX: check their Travis-CI script on update
+	./test/gitversion/gitversion-test
+	./test/cpp-utils/cpp-utils-test
+	./test/parallelaccessstore/parallelaccessstore-test
+	./test/blockstore/blockstore-test
+	./test/blobstore/blobstore-test
+	./test/cryfs/cryfs-test
+	./test/cryfs-cli/cryfs-cli-test
+	cd ${wrksrc}
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (8 preceding siblings ...)
  2021-03-16  1:44 ` sgn
@ 2021-03-16 15:33 ` sgn
  2021-03-16 15:37 ` sgn
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16 15:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 22440 bytes --]

From 5fa243b7a5902bdaa07d4cd6cd068fc9916c3526 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/7] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 26 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 27fdddc90d72..adf35f728423 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 6e4a7a665e4851fa8257dc49d0a3b79e468bb23b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:20 +0700
Subject: [PATCH 2/7] 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 e9857a690fd4327b75f4b398007ccc573274bbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:29 +0700
Subject: [PATCH 3/7] 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 197565a45807283913b6ab17df8711a733bbc769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:34 +0700
Subject: [PATCH 4/7] 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 a2d187defad61b0b080b85404b752738e0be7550 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:02:42 +0700
Subject: [PATCH 5/7] 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 fc206b7dc33de1fb88c1684d03205e733019be95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 23:26:33 +0700
Subject: [PATCH 6/7] cryfs: un-vendor, build with None build type

---
 .../cryfs/patches/allow-build-type-none.patch |  33 ++++
 srcpkgs/cryfs/patches/de-vendor.patch         | 180 ++++++++++++++++++
 srcpkgs/cryfs/patches/fix-test.patch          |  22 +++
 .../rename-simple-to-basic-filesink.patch     |  21 ++
 srcpkgs/cryfs/patches/spdlog-include.patch    |  33 ++++
 srcpkgs/cryfs/template                        |  33 +++-
 6 files changed, 319 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/fix-test.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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch
new file mode 100644
index 000000000000..d3a5847b1a3c
--- /dev/null
+++ b/srcpkgs/cryfs/patches/fix-test.patch
@@ -0,0 +1,22 @@
+Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+===================================================================
+--- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h
++++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+@@ -11,8 +11,7 @@ class MockLogger final {
+ public:
+     MockLogger():
+             _capturedLogData(),
+-            _sink(std::make_shared<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
+-            _logger(spdlog::create("MockLogger", {_sink})) {
++            _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
+     }
+ 
+     ~MockLogger() {
+@@ -28,7 +27,6 @@ public:
+     }
+ private:
+     std::ostringstream _capturedLogData;
+-    std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
+     std::shared_ptr<spdlog::logger> _logger;
+ };
+ 
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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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..0676d6dd8b39 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 <atweiden@tutanota.de>"
@@ -15,7 +17,32 @@ 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"
+}
+
+do_check() {
+	cd ${wrksrc}/build
+	# XXX: check their Travis-CI script on update
+	./test/gitversion/gitversion-test
+	./test/cpp-utils/cpp-utils-test
+	./test/parallelaccessstore/parallelaccessstore-test
+	./test/blockstore/blockstore-test
+	./test/blobstore/blobstore-test
+	./test/cryfs/cryfs-test
+	# ./test/cryfs-cli/cryfs-cli-test
+	cd ${wrksrc}
+}

From c7ce80bb93433a9cecfadcd839a555b58cec3998 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Tue, 16 Mar 2021 22:32:45 +0700
Subject: [PATCH 7/7] fixup! fixup! cryfs: un-vendor, build with None build
 type

---
 srcpkgs/cryfs/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cryfs/template b/srcpkgs/cryfs/template
index 0676d6dd8b39..0eae0c1c7bff 100644
--- a/srcpkgs/cryfs/template
+++ b/srcpkgs/cryfs/template
@@ -5,8 +5,9 @@ revision=1
 create_wrksrc=yes
 build_style=cmake
 configure_args="-DCRYFS_UPDATE_CHECKS=off -DCMAKE_BUILD_TYPE=None
- -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_STANDARD_LIBRARIES=-lfmt"
-hostmakedepends="pkg-config"
+ -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_STANDARD_LIBRARIES=-lfmt
+ -DBOOST_ROOT=$XBPS_CROSS_BASE/usr"
+hostmakedepends="pkg-config python3"
 makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel
  spdlog"
 depends="fuse"

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (9 preceding siblings ...)
  2021-03-16 15:33 ` sgn
@ 2021-03-16 15:37 ` sgn
  2021-03-16 23:05 ` sgn
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16 15:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 21440 bytes --]

From 5fa243b7a5902bdaa07d4cd6cd068fc9916c3526 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 26 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 27fdddc90d72..adf35f728423 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 6e4a7a665e4851fa8257dc49d0a3b79e468bb23b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 e9857a690fd4327b75f4b398007ccc573274bbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 197565a45807283913b6ab17df8711a733bbc769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 a2d187defad61b0b080b85404b752738e0be7550 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 398571d194af7493f6c26e20a0e4b3b16835e324 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 ++++++++++++++++++
 srcpkgs/cryfs/patches/fix-test.patch          |  22 +++
 .../rename-simple-to-basic-filesink.patch     |  21 ++
 srcpkgs/cryfs/patches/spdlog-include.patch    |  33 ++++
 srcpkgs/cryfs/template                        |  33 +++-
 6 files changed, 319 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/fix-test.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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch
new file mode 100644
index 000000000000..d3a5847b1a3c
--- /dev/null
+++ b/srcpkgs/cryfs/patches/fix-test.patch
@@ -0,0 +1,22 @@
+Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+===================================================================
+--- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h
++++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+@@ -11,8 +11,7 @@ class MockLogger final {
+ public:
+     MockLogger():
+             _capturedLogData(),
+-            _sink(std::make_shared<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
+-            _logger(spdlog::create("MockLogger", {_sink})) {
++            _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
+     }
+ 
+     ~MockLogger() {
+@@ -28,7 +27,6 @@ public:
+     }
+ private:
+     std::ostringstream _capturedLogData;
+-    std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
+     std::shared_ptr<spdlog::logger> _logger;
+ };
+ 
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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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..76880174d7b9 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 python3"
+makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel
+ spdlog"
 depends="fuse"
 short_desc="Cryptographic filesystem for the cloud"
 maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
@@ -15,7 +17,32 @@ 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"
+}
+
+do_check() {
+	cd ${wrksrc}/build
+	# XXX: check their Travis-CI script on update
+	./test/gitversion/gitversion-test
+	./test/cpp-utils/cpp-utils-test
+	./test/parallelaccessstore/parallelaccessstore-test
+	./test/blockstore/blockstore-test
+	./test/blobstore/blobstore-test
+	./test/cryfs/cryfs-test
+	# ./test/cryfs-cli/cryfs-cli-test
+	cd ${wrksrc}
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (10 preceding siblings ...)
  2021-03-16 15:37 ` sgn
@ 2021-03-16 23:05 ` sgn
  2021-03-16 23:06 ` sgn
  2021-03-16 23:07 ` [PR PATCH] [Merged]: " sgn
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16 23:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 21440 bytes --]

From 5fa243b7a5902bdaa07d4cd6cd068fc9916c3526 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  3 ++-
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 26 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 27fdddc90d72..adf35f728423 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3969,4 +3969,5 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
-libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
\ No newline at end of file
+libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 6e4a7a665e4851fa8257dc49d0a3b79e468bb23b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 e9857a690fd4327b75f4b398007ccc573274bbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 197565a45807283913b6ab17df8711a733bbc769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 a2d187defad61b0b080b85404b752738e0be7550 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 398571d194af7493f6c26e20a0e4b3b16835e324 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 ++++++++++++++++++
 srcpkgs/cryfs/patches/fix-test.patch          |  22 +++
 .../rename-simple-to-basic-filesink.patch     |  21 ++
 srcpkgs/cryfs/patches/spdlog-include.patch    |  33 ++++
 srcpkgs/cryfs/template                        |  33 +++-
 6 files changed, 319 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/fix-test.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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch
new file mode 100644
index 000000000000..d3a5847b1a3c
--- /dev/null
+++ b/srcpkgs/cryfs/patches/fix-test.patch
@@ -0,0 +1,22 @@
+Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+===================================================================
+--- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h
++++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+@@ -11,8 +11,7 @@ class MockLogger final {
+ public:
+     MockLogger():
+             _capturedLogData(),
+-            _sink(std::make_shared<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
+-            _logger(spdlog::create("MockLogger", {_sink})) {
++            _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
+     }
+ 
+     ~MockLogger() {
+@@ -28,7 +27,6 @@ public:
+     }
+ private:
+     std::ostringstream _capturedLogData;
+-    std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
+     std::shared_ptr<spdlog::logger> _logger;
+ };
+ 
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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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..76880174d7b9 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 python3"
+makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel
+ spdlog"
 depends="fuse"
 short_desc="Cryptographic filesystem for the cloud"
 maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
@@ -15,7 +17,32 @@ 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"
+}
+
+do_check() {
+	cd ${wrksrc}/build
+	# XXX: check their Travis-CI script on update
+	./test/gitversion/gitversion-test
+	./test/cpp-utils/cpp-utils-test
+	./test/parallelaccessstore/parallelaccessstore-test
+	./test/blockstore/blockstore-test
+	./test/blobstore/blobstore-test
+	./test/cryfs/cryfs-test
+	# ./test/cryfs-cli/cryfs-cli-test
+	cd ${wrksrc}
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (11 preceding siblings ...)
  2021-03-16 23:05 ` sgn
@ 2021-03-16 23:06 ` sgn
  2021-03-16 23:07 ` [PR PATCH] [Merged]: " sgn
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16 23:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages spdlog-shared-lib
https://github.com/void-linux/void-packages/pull/29489

spdlog shared lib
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29489.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spdlog-shared-lib-29489.patch --]
[-- Type: text/x-diff, Size: 21315 bytes --]

From 44e57d0934998a88ef750e8ff4b1546bde474dba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 22:01:47 +0700
Subject: [PATCH 1/6] spdlog: build shared lib

---
 common/shlibs                              |  1 +
 srcpkgs/libspdlog                          |  1 +
 srcpkgs/spdlog/patches/fix-pkgconfig.patch | 12 ++++++++++++
 srcpkgs/spdlog/template                    | 15 +++++++++++----
 4 files changed, 25 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/libspdlog
 create mode 100644 srcpkgs/spdlog/patches/fix-pkgconfig.patch

diff --git a/common/shlibs b/common/shlibs
index 487708693003..bba9a0eb1939 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3970,3 +3970,4 @@ libwayland-client++.so.0 libwaylandpp-0.2.8_1
 libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
 libwayland-egl++.so.0 libwaylandpp-0.2.8_1
 libwayland-client-extra++.so.0 libwaylandpp-0.2.8_1
+libspdlog.so.1 libspdlog-1.8.2_2
diff --git a/srcpkgs/libspdlog b/srcpkgs/libspdlog
new file mode 120000
index 000000000000..b624c8477e80
--- /dev/null
+++ b/srcpkgs/libspdlog
@@ -0,0 +1 @@
+spdlog
\ No newline at end of file
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..ecf3e97a14ce 100644
--- a/srcpkgs/spdlog/template
+++ b/srcpkgs/spdlog/template
@@ -1,22 +1,29 @@
 # 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 <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/gabime/spdlog"
 distfiles="https://github.com/gabime/spdlog/archive/v${version}.tar.gz"
 checksum=e20e6bd8f57e866eaf25a5417f0a38a116e537f1a77ac7b5409ca2b180cec0d5
+patch_args=-Np1
 
 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 8fb0f21461950eb911ec563a22c8a59cf99bf05c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 6148bbdf028114a082df98a39febaa4d779f6020 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 9d84f6e401fb65fba741acfff9194149f2ea544b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 e6b90414dd34ae4e77b45e96fdae8390d91107af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 508da76a2581c219204c3b8625f9060cea02125a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
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 ++++++++++++++++++
 srcpkgs/cryfs/patches/fix-test.patch          |  22 +++
 .../rename-simple-to-basic-filesink.patch     |  21 ++
 srcpkgs/cryfs/patches/spdlog-include.patch    |  33 ++++
 srcpkgs/cryfs/template                        |  33 +++-
 6 files changed, 319 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/fix-test.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 <vendor_cryptopp/gzip.h>
++#include <cryptopp/gzip.h>
+ 
+ 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 <vendor_cryptopp/cryptlib.h>
++#include <cryptopp/cryptlib.h>
+ 
+ // 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 <cpp-utils/random/Random.h>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ 
+ 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 <vendor_cryptopp/scrypt.h>
++#include <cryptopp/scrypt.h>
+ 
+ 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 <boost/optional.hpp>
+-#include <vendor_cryptopp/modes.h>
++#include <cryptopp/modes.h>
+ #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 <vendor_cryptopp/gcm.h>
++#include <cryptopp/gcm.h>
+ #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 <vendor_cryptopp/aes.h>
+-#include <vendor_cryptopp/twofish.h>
+-#include <vendor_cryptopp/serpent.h>
+-#include <vendor_cryptopp/cast.h>
+-#include <vendor_cryptopp/mars.h>
++#include <cryptopp/aes.h>
++#include <cryptopp/twofish.h>
++#include <cryptopp/serpent.h>
++#include <cryptopp/cast.h>
++#include <cryptopp/mars.h>
+ #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 <stdexcept>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/cryptopp_byte.h>
+ 
+ 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 <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <string>
+ #include <cstring>
+ #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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <vendor_cryptopp/osrng.h>
++#include <cryptopp/osrng.h>
+ 
+ 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 <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
+-#include <vendor_cryptopp/sha.h>
++#include <cryptopp/sha.h>
+ #include <boost/filesystem/operations.hpp>
+ #include "LocalStateDir.h"
+ #include <cpp-utils/logging/logging.h>
+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 <vector>
+ #include <boost/filesystem.hpp>
+ #include <cpp-utils/data/Data.h>
+-#include <vendor_cryptopp/hex.h>
++#include <cryptopp/hex.h>
+ #include <cpp-utils/crypto/symmetric/ciphers.h>
+ #include <cpp-utils/tempfile/TempFile.h>
+ #include <cryfs/config/CryConfigFile.h>
+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/fix-test.patch b/srcpkgs/cryfs/patches/fix-test.patch
new file mode 100644
index 000000000000..d3a5847b1a3c
--- /dev/null
+++ b/srcpkgs/cryfs/patches/fix-test.patch
@@ -0,0 +1,22 @@
+Index: cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+===================================================================
+--- cryfs-0.10.2.orig/test/cpp-utils/logging/testutils/LoggingTest.h
++++ cryfs-0.10.2/test/cpp-utils/logging/testutils/LoggingTest.h
+@@ -11,8 +11,7 @@ class MockLogger final {
+ public:
+     MockLogger():
+             _capturedLogData(),
+-            _sink(std::make_shared<spdlog::sinks::ostream_sink<std::mutex>>(_capturedLogData, true)),
+-            _logger(spdlog::create("MockLogger", {_sink})) {
++            _logger(spdlog::create<spdlog::sinks::ostream_sink_mt>("MockLogger", _capturedLogData, true)) {
+     }
+ 
+     ~MockLogger() {
+@@ -28,7 +27,6 @@ public:
+     }
+ private:
+     std::ostringstream _capturedLogData;
+-    std::shared_ptr<spdlog::sinks::ostream_sink<std::mutex>> _sink;
+     std::shared_ptr<spdlog::logger> _logger;
+ };
+ 
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 <cryfs/CryfsException.h>
+ #include <cpp-utils/thread/debugging.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ 
+ //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<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs", options.logFile()->string()));
++                spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("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 <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #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 <stdexcept>
+ #include <spdlog/fmt/ostr.h>
++#include <spdlog/sinks/syslog_sink.h>
+ 
+ #if defined(_MSC_VER)
+ #include <spdlog/sinks/msvc_sink.h>
+@@ -75,7 +76,7 @@ namespace cpputils {
+ #if defined(_MSC_VER)
+           return spdlog::create<spdlog::sinks::msvc_sink_mt>(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..76880174d7b9 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 python3"
+makedepends="boost-devel fuse-devel libcurl-devel libgomp-devel crypto++-devel
+ spdlog"
 depends="fuse"
 short_desc="Cryptographic filesystem for the cloud"
 maintainer="Andy Weidenbaum <atweiden@tutanota.de>"
@@ -15,7 +17,32 @@ 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"
+}
+
+do_check() {
+	cd ${wrksrc}/build
+	# XXX: check their Travis-CI script on update
+	./test/gitversion/gitversion-test
+	./test/cpp-utils/cpp-utils-test
+	./test/parallelaccessstore/parallelaccessstore-test
+	./test/blockstore/blockstore-test
+	./test/blobstore/blobstore-test
+	./test/cryfs/cryfs-test
+	# ./test/cryfs-cli/cryfs-cli-test
+	cd ${wrksrc}
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Merged]: spdlog shared lib
  2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
                   ` (12 preceding siblings ...)
  2021-03-16 23:06 ` sgn
@ 2021-03-16 23:07 ` sgn
  13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2021-03-16 23:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

There's a merged pull request on the void-packages repository

spdlog shared lib
https://github.com/void-linux/void-packages/pull/29489

Description:
<!-- Mark items with [x] where applicable -->
I keep the development files in `spdlog` because I don't want to break user system.

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-03-16 23:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 15:12 [PR PATCH] spdlog shared lib sgn
2021-03-15 15:13 ` sgn
2021-03-15 15:39 ` [PR PATCH] [Updated] " sgn
2021-03-15 16:27 ` sgn
2021-03-15 16:27 ` sgn
2021-03-15 18:01 ` Johnnynator
2021-03-16  0:15 ` [PR PATCH] [Updated] " sgn
2021-03-16  0:18 ` sgn
2021-03-16  1:29 ` sgn
2021-03-16  1:44 ` sgn
2021-03-16 15:33 ` sgn
2021-03-16 15:37 ` sgn
2021-03-16 23:05 ` sgn
2021-03-16 23:06 ` sgn
2021-03-16 23:07 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).