Updated to version 0.11.2.

This commit is contained in:
Vitaly Zaitsev 2023-02-20 19:29:50 +01:00
parent f520a5f5a9
commit 9c9a18f45d
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A
4 changed files with 8 additions and 111 deletions

View File

@ -1,56 +0,0 @@
From 1831819e67ec8077b9e9d3224da848016b2f7357 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Thu, 16 Feb 2023 15:26:02 +0100
Subject: [PATCH] Added ability to build with packaged version of blurhash.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
CMakeLists.txt | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2aa6faebe..57b6b67a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,7 @@ option(USE_BUNDLED_LIBEVENT "Use the bundled version of libevent." ${HUNTER_ENAB
option(USE_BUNDLED_LIBCURL "Use the bundled version of libcurl." ${HUNTER_ENABLED})
option(USE_BUNDLED_RE2 "Use the bundled version of re2." ${HUNTER_ENABLED})
option(USE_BUNDLED_CPPHTTPLIB "Use the bundled version of cpp-httplib." ON)
+option(USE_BUNDLED_BLURHASH "Use the bundled version of blurhash." ON)
include(CMakeDependentOption)
set(VOIP_DEFAULT ON)
@@ -698,12 +699,7 @@ else()
endif()
endif()
-target_include_directories(nheko PRIVATE src includes third_party/blurhash)
-set(THIRD_PARTY_SRC_FILES
- third_party/blurhash/blurhash.cpp
- third_party/blurhash/blurhash.hpp
- )
-target_sources(nheko PRIVATE ${THIRD_PARTY_SRC_FILES})
+target_include_directories(nheko PRIVATE src includes)
if (USE_BUNDLED_CPPHTTPLIB)
target_include_directories(nheko PRIVATE third_party/cpp-httplib-0.5.12)
@@ -713,6 +709,19 @@ else()
target_link_libraries(nheko PRIVATE httplib::httplib)
endif()
+if (USE_BUNDLED_BLURHASH)
+ target_include_directories(nheko PRIVATE third_party/blurhash)
+ set(BLURHASH_SRC_FILES
+ third_party/blurhash/blurhash.cpp
+ third_party/blurhash/blurhash.hpp
+ )
+ target_sources(nheko PRIVATE ${BLURHASH_SRC_FILES})
+else()
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(blurhash REQUIRED IMPORTED_TARGET blurhash)
+ target_link_libraries(nheko PRIVATE PkgConfig::blurhash)
+endif()
+
# Fixup bundled keychain include dirs
if (USE_BUNDLED_QTKEYCHAIN)
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})

View File

@ -1,46 +0,0 @@
From c432cf4909b8a9ffd8cb012542556ebc20feb20d Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Wed, 15 Feb 2023 10:36:56 +0100
Subject: [PATCH] Added ability to build with packaged version of cpp-httplib.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
CMakeLists.txt | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4724a1ce..2aa6faebe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,7 @@ option(USE_BUNDLED_COEURL "Use a bundled version of the Curl wrapper"
option(USE_BUNDLED_LIBEVENT "Use the bundled version of libevent." ${HUNTER_ENABLED})
option(USE_BUNDLED_LIBCURL "Use the bundled version of libcurl." ${HUNTER_ENABLED})
option(USE_BUNDLED_RE2 "Use the bundled version of re2." ${HUNTER_ENABLED})
+option(USE_BUNDLED_CPPHTTPLIB "Use the bundled version of cpp-httplib." ON)
include(CMakeDependentOption)
set(VOIP_DEFAULT ON)
@@ -697,14 +698,21 @@ else()
endif()
endif()
-target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)
+target_include_directories(nheko PRIVATE src includes third_party/blurhash)
set(THIRD_PARTY_SRC_FILES
third_party/blurhash/blurhash.cpp
third_party/blurhash/blurhash.hpp
- third_party/cpp-httplib-0.5.12/httplib.h
)
target_sources(nheko PRIVATE ${THIRD_PARTY_SRC_FILES})
+if (USE_BUNDLED_CPPHTTPLIB)
+ target_include_directories(nheko PRIVATE third_party/cpp-httplib-0.5.12)
+ target_sources(nheko PRIVATE third_party/cpp-httplib-0.5.12/httplib.h)
+else()
+ find_package(httplib REQUIRED)
+ target_link_libraries(nheko PRIVATE httplib::httplib)
+endif()
+
# Fixup bundled keychain include dirs
if (USE_BUNDLED_QTKEYCHAIN)
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})

View File

@ -1,6 +1,6 @@
Name: nheko
Version: 0.11.1
Release: 5%{?dist}
Version: 0.11.2
Release: 1%{?dist}
# Main source - GPL-3.0-or-later.
# cpp-httplib - bundled - MIT.
@ -10,12 +10,7 @@ Summary: Desktop client for the Matrix protocol
URL: https://github.com/Nheko-Reborn/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# https://github.com/Nheko-Reborn/nheko/pull/1371
Patch100: %{name}-unbundle-cpp-httplib.patch
# https://github.com/Nheko-Reborn/nheko/pull/1376
Patch101: %{name}-unbundle-blurhash.patch
BuildRequires: cmake(MatrixClient) >= 0.9.1
BuildRequires: cmake(MatrixClient) >= 0.9.2
BuildRequires: cmake(Olm) >= 3.2.12
BuildRequires: cmake(Qt5Concurrent)
BuildRequires: cmake(Qt5Core)
@ -79,6 +74,7 @@ for Matrix that feels more like a mainstream chat app.
%prep
%autosetup -p1
rm -rf third_party/{blurhash,cpp-httplib*}
%build
%cmake -G Ninja \
@ -127,6 +123,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1*
%changelog
* Mon Feb 20 2023 Vitaly Zaitsev <vitaly@easycoding.org> - 0.11.2-1
- Updated to version 0.11.2.
* Sat Feb 18 2023 Vitaly Zaitsev <vitaly@easycoding.org> - 0.11.1-5
- Unbundled cpp-httplib and blurhash-cpp. Fixes rhbz#2169587.

View File

@ -1 +1 @@
SHA512 (nheko-0.11.1.tar.gz) = 3ccaa859ff76a78c024ea2159e666316a3505bc3a3220020a4805ee93351865868b56219ab8421c70ed9922c3f38fbb39370c7f98b702836bd3bb3665c712fda
SHA512 (nheko-0.11.2.tar.gz) = ac42065f23c18039e0c40ce5c65615c5dcd7bdc0a92f400ae48e2557380674f60357f2717588f81181149cda29831842c3da904a68b0b00b274dab268522475a