diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-27 08:15:59 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-27 08:15:59 +0200 |
commit | bf4e47b9f2ae35686765a0d16391700cf7a04572 (patch) | |
tree | ea2cac77b69de4576fc070c4dd6acfe07bcd7e0f | |
parent | 85c02e913723c057aeec49dcb1d0edee1a85b872 (diff) | |
download | weechat-bf4e47b9f2ae35686765a0d16391700cf7a04572.zip |
core: fix detection of libgcrypt ≥ 1.11 (debian #1071960)
Use pkg-config to detect libgcrypt, since command `libgcrypt-config` is not
available any more.
Remove patches for Debian/Raspbian Buster and Ubuntu Bionic: detection of
libgcrypt don't work any more with version 1.8.4 on Debian Buster and 1.8.1 on
Ubuntu Bionic (both versions don't provide the file `libgcrypt.pc`).
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | cmake/FindGCRYPT.cmake | 53 | ||||
-rw-r--r-- | src/plugins/irc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/relay/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/xfer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tools/debian/patches/weechat_debian_buster.patch | 50 | ||||
l--------- | tools/debian/patches/weechat_raspbian_buster.patch | 1 | ||||
-rw-r--r-- | tools/debian/patches/weechat_ubuntu_bionic.patch | 106 |
9 files changed, 7 insertions, 215 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cd9de77d4..ebb2423c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed +- core: fix detection of libgcrypt ≥ 1.11 ([debian #1071960](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071960)) - irc: close /list buffer when the server buffer is closed ([#2121](https://github.com/weechat/weechat/issues/2121)) - php: fix return value of function hdata_longlong - tcl: fix return value of function hdata_longlong ([#2119](https://github.com/weechat/weechat/issues/2119)) diff --git a/CMakeLists.txt b/CMakeLists.txt index f34ba06ce..d0f52cb81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,9 +206,10 @@ if(ENABLE_LARGEFILE) endif() # Check for libgcrypt -find_package(GCRYPT REQUIRED) +pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt) add_definitions(-DHAVE_GCRYPT) -list(APPEND EXTRA_LIBS ${GCRYPT_LDFLAGS}) +include_directories(${LIBGCRYPT_INCLUDE_DIRS}) +list(APPEND EXTRA_LIBS ${LIBGCRYPT_LDFLAGS}) # Check for GnuTLS find_package(GnuTLS REQUIRED) diff --git a/cmake/FindGCRYPT.cmake b/cmake/FindGCRYPT.cmake deleted file mode 100644 index 96f4cecc0..000000000 --- a/cmake/FindGCRYPT.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org> -# -# This file is part of WeeChat, the extensible chat client. -# -# WeeChat is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# WeeChat is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with WeeChat. If not, see <https://www.gnu.org/licenses/>. -# - -# - Find Gcrypt -# This module finds if libgcrypt is installed and determines where -# the include files and libraries are. -# -# This code sets the following variables: -# -# GCRYPT_CFLAGS = cflags to use to compile -# GCRYPT_LDFLAGS = ldflags to use to compile -# - -find_program(LIBGCRYPT_CONFIG_EXECUTABLE NAMES libgcrypt-config) - -set(GCRYPT_LDFLAGS) -set(GCRYPT_CFLAGS) - -if(LIBGCRYPT_CONFIG_EXECUTABLE) - - execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) - execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) - - if(NOT DEFINED ${GCRYPT_CFLAGS}) - set(GCRYPT_CFLAGS " ") - endif() - -endif() - -# handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GCRYPT REQUIRED_VARS GCRYPT_LDFLAGS GCRYPT_CFLAGS) - -if(GCRYPT_FOUND) - mark_as_advanced(GCRYPT_CFLAGS GCRYPT_LDFLAGS) -endif() diff --git a/src/plugins/irc/CMakeLists.txt b/src/plugins/irc/CMakeLists.txt index 792b9ed94..050b4c6c7 100644 --- a/src/plugins/irc/CMakeLists.txt +++ b/src/plugins/irc/CMakeLists.txt @@ -56,7 +56,7 @@ set(LINK_LIBS) include_directories(${GNUTLS_INCLUDE_PATH}) list(APPEND LINK_LIBS ${GNUTLS_LIBRARY}) -list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) +list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS}) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # link with resolv lib on macOS diff --git a/src/plugins/relay/CMakeLists.txt b/src/plugins/relay/CMakeLists.txt index c175d50bd..22853b555 100644 --- a/src/plugins/relay/CMakeLists.txt +++ b/src/plugins/relay/CMakeLists.txt @@ -63,7 +63,7 @@ set(LINK_LIBS) include_directories(${GNUTLS_INCLUDE_PATH}) list(APPEND LINK_LIBS ${GNUTLS_LIBRARY}) -list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) +list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS}) list(APPEND LINK_LIBS ${ZLIB_LIBRARY}) diff --git a/src/plugins/xfer/CMakeLists.txt b/src/plugins/xfer/CMakeLists.txt index f4f34b52e..334876689 100644 --- a/src/plugins/xfer/CMakeLists.txt +++ b/src/plugins/xfer/CMakeLists.txt @@ -34,7 +34,7 @@ set_target_properties(xfer PROPERTIES PREFIX "") set(LINK_LIBS) -list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS}) +list(APPEND LINK_LIBS ${LIBGCRYPT_LDFLAGS}) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # link with resolv lib on macOS diff --git a/tools/debian/patches/weechat_debian_buster.patch b/tools/debian/patches/weechat_debian_buster.patch deleted file mode 100644 index 096c50ef3..000000000 --- a/tools/debian/patches/weechat_debian_buster.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/debian-devel/control b/debian-devel/control -index a5d24b6a8..edae1ec5e 100644 ---- a/debian-devel/control -+++ b/debian-devel/control -@@ -14,7 +14,7 @@ Build-Depends: - libaspell-dev, - liblua5.3-dev, - tcl8.6-dev, -- guile-3.0-dev, -+ guile-2.2-dev, - php-dev, libphp-embed, libargon2-dev, libsodium-dev, - libxml2-dev, - libcurl4-gnutls-dev, -diff --git a/debian-devel/rules b/debian-devel/rules -index cab713c93..d2756333b 100755 ---- a/debian-devel/rules -+++ b/debian-devel/rules -@@ -8,6 +8,7 @@ override_dh_auto_configure: - dh_auto_configure --buildsystem=cmake -- \ - -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ - -DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \ -+ -DENABLE_CJSON:BOOL=OFF \ - -DENABLE_DOC:BOOL=ON \ - -DENABLE_MAN:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -diff --git a/debian-stable/control b/debian-stable/control -index a75e6fee5..50c4f69a8 100644 ---- a/debian-stable/control -+++ b/debian-stable/control -@@ -14,7 +14,7 @@ Build-Depends: - libaspell-dev, - liblua5.3-dev, - tcl8.6-dev, -- guile-3.0-dev, -+ guile-2.2-dev, - php-dev, libphp-embed, libargon2-dev, libsodium-dev, - libxml2-dev, - libcurl4-gnutls-dev, -diff --git a/debian-stable/rules b/debian-stable/rules -index cab713c93..d2756333b 100755 ---- a/debian-stable/rules -+++ b/debian-stable/rules -@@ -8,6 +8,7 @@ override_dh_auto_configure: - dh_auto_configure --buildsystem=cmake -- \ - -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ - -DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \ -+ -DENABLE_CJSON:BOOL=OFF \ - -DENABLE_DOC:BOOL=ON \ - -DENABLE_MAN:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ diff --git a/tools/debian/patches/weechat_raspbian_buster.patch b/tools/debian/patches/weechat_raspbian_buster.patch deleted file mode 120000 index 3b84ccec9..000000000 --- a/tools/debian/patches/weechat_raspbian_buster.patch +++ /dev/null @@ -1 +0,0 @@ -weechat_debian_buster.patch
\ No newline at end of file diff --git a/tools/debian/patches/weechat_ubuntu_bionic.patch b/tools/debian/patches/weechat_ubuntu_bionic.patch deleted file mode 100644 index 94c0aed2b..000000000 --- a/tools/debian/patches/weechat_ubuntu_bionic.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/debian-devel/compat b/debian-devel/compat -index 48082f72f..b4de39476 100644 ---- a/debian-devel/compat -+++ b/debian-devel/compat -@@ -1 +1 @@ --12 -+11 -diff --git a/debian-devel/control b/debian-devel/control -index a5d24b6a8..81ae98045 100644 ---- a/debian-devel/control -+++ b/debian-devel/control -@@ -5,24 +5,23 @@ Maintainer: Sébastien Helleu <flashcode@flashtux.org> - Build-Depends: - asciidoctor (>= 1.5.4), - ruby-pygments.rb, -- debhelper (>= 12), -+ debhelper (>= 11), - cmake, pkg-config, -- libncurses-dev, -+ libncursesw5-dev, - gem2deb, - libperl-dev, - python3-dev, - libaspell-dev, - liblua5.3-dev, - tcl8.6-dev, -- guile-3.0-dev, -- php-dev, libphp-embed, libargon2-dev, libsodium-dev, -+ guile-2.2-dev, -+ php-dev, libphp-embed, libargon2-0-dev, libsodium-dev, - libxml2-dev, - libcurl4-gnutls-dev, - libgcrypt20-dev, - libgnutls28-dev, - libzstd-dev, -- zlib1g-dev, -- libcjson-dev -+ zlib1g-dev - Standards-Version: 4.6.2 - Homepage: https://weechat.org/ - Vcs-Git: https://salsa.debian.org/kolter/weechat.git -diff --git a/debian-devel/rules b/debian-devel/rules -index cab713c93..d2756333b 100755 ---- a/debian-devel/rules -+++ b/debian-devel/rules -@@ -8,6 +8,7 @@ override_dh_auto_configure: - dh_auto_configure --buildsystem=cmake -- \ - -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ - -DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \ -+ -DENABLE_CJSON:BOOL=OFF \ - -DENABLE_DOC:BOOL=ON \ - -DENABLE_MAN:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -diff --git a/debian-stable/compat b/debian-stable/compat -index 48082f72f..b4de39476 100644 ---- a/debian-stable/compat -+++ b/debian-stable/compat -@@ -1 +1 @@ --12 -+11 -diff --git a/debian-stable/control b/debian-stable/control -index a75e6fee5..b39bf88dc 100644 ---- a/debian-stable/control -+++ b/debian-stable/control -@@ -5,24 +5,23 @@ Maintainer: Emmanuel Bouthenot <kolter@debian.org> - Build-Depends: - asciidoctor (>= 1.5.4), - ruby-pygments.rb, -- debhelper (>= 12), -+ debhelper (>= 11), - cmake, pkg-config, -- libncurses-dev, -+ libncursesw5-dev, - gem2deb, - libperl-dev, - python3-dev, - libaspell-dev, - liblua5.3-dev, - tcl8.6-dev, -- guile-3.0-dev, -- php-dev, libphp-embed, libargon2-dev, libsodium-dev, -+ guile-2.2-dev, -+ php-dev, libphp-embed, libargon2-0-dev, libsodium-dev, - libxml2-dev, - libcurl4-gnutls-dev, - libgcrypt20-dev, - libgnutls28-dev, - libzstd-dev, -- zlib1g-dev, -- libcjson-dev -+ zlib1g-dev - Standards-Version: 4.6.2 - Homepage: https://weechat.org/ - Vcs-Git: https://salsa.debian.org/kolter/weechat.git -diff --git a/debian-stable/rules b/debian-stable/rules -index cab713c93..d2756333b 100755 ---- a/debian-stable/rules -+++ b/debian-stable/rules -@@ -8,6 +8,7 @@ override_dh_auto_configure: - dh_auto_configure --buildsystem=cmake -- \ - -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ - -DLIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} \ -+ -DENABLE_CJSON:BOOL=OFF \ - -DENABLE_DOC:BOOL=ON \ - -DENABLE_MAN:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ |