From 6cf982cd85972ae1193c644db9799972c69961e269ef5c18b384516454b64555 Mon Sep 17 00:00:00 2001 From: Maximilian Trummer Date: Mon, 14 Feb 2022 23:13:27 +0000 Subject: [PATCH] Accepting request 953413 from home:cgiboudeaux:branches:server:irc - Add upstream patch: * 0001-ruby-add-detection-of-Ruby-3.1.patch OBS-URL: https://build.opensuse.org/request/show/953413 OBS-URL: https://build.opensuse.org/package/show/server:irc/weechat?expand=0&rev=105 --- 0001-ruby-add-detection-of-Ruby-3.1.patch | 39 +++++++++++++++++++++++ weechat.changes | 6 ++++ weechat.spec | 6 ++-- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0001-ruby-add-detection-of-Ruby-3.1.patch diff --git a/0001-ruby-add-detection-of-Ruby-3.1.patch b/0001-ruby-add-detection-of-Ruby-3.1.patch new file mode 100644 index 0000000..e36887b --- /dev/null +++ b/0001-ruby-add-detection-of-Ruby-3.1.patch @@ -0,0 +1,39 @@ +From b32059638933d2c958961dae396fe4a5a0c2e784 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= +Date: Tue, 8 Feb 2022 12:41:32 +0100 +Subject: [PATCH] ruby: add detection of Ruby 3.1 + +--- + cmake/FindRuby.cmake | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/FindRuby.cmake b/cmake/FindRuby.cmake +index f874453..407a8a8 100644 +--- a/cmake/FindRuby.cmake ++++ b/cmake/FindRuby.cmake +@@ -37,7 +37,7 @@ if(PKG_CONFIG_FOUND) + # set specific search path for macOS + set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/ruby/lib/pkgconfig") + endif() +- pkg_search_module(RUBY ruby-3.0 ruby-2.7 ruby-2.6 ruby-2.5 ruby-2.4 ruby-2.3 ruby-2.2 ruby-2.1 ruby-2.0 ruby-1.9 ruby) ++ pkg_search_module(RUBY ruby-3.1 ruby-3.0 ruby-2.7 ruby-2.6 ruby-2.5 ruby-2.4 ruby-2.3 ruby-2.2 ruby-2.1 ruby-2.0 ruby-1.9 ruby) + if(RUBY_FOUND AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # FIXME: weird hack: hardcoding the Ruby lib location on macOS + set(RUBY_LDFLAGS "${RUBY_LDFLAGS} -L/usr/local/opt/ruby/lib") +diff --git a/configure.ac b/configure.ac +index 75fa0b4..de2750a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -501,7 +501,7 @@ RUBY_VERSION= + if test "x$enable_ruby" = "xyes" ; then + RUBY_CFLAGS="" + RUBY_LFLAGS="" +- for v in "3.0" "2.7" "2.6" "2.5" "2.4" "2.3" "2.2" "2.1" "2.0" "1.9" "1.8" ; do ++ for v in "3.1" "3.0" "2.7" "2.6" "2.5" "2.4" "2.3" "2.2" "2.1" "2.0" "1.9" "1.8" ; do + pkgconfig_ruby_found=`$PKGCONFIG --exists ruby-$v 2>/dev/null` + if test "x$?" = "x0" ; then + RUBY_VERSION=`$PKGCONFIG --modversion ruby-$v` +-- +2.35.1 + diff --git a/weechat.changes b/weechat.changes index ab8c6ab..45a418f 100644 --- a/weechat.changes +++ b/weechat.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 11 09:10:16 UTC 2022 - Christophe Giboudeaux + +- Add upstream patch: + * 0001-ruby-add-detection-of-Ruby-3.1.patch + ------------------------------------------------------------------- Mon Dec 20 10:35:51 UTC 2021 - Dirk Müller diff --git a/weechat.spec b/weechat.spec index 5f919a1..c605fbd 100644 --- a/weechat.spec +++ b/weechat.spec @@ -1,7 +1,7 @@ # # spec file for package weechat # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,8 @@ Source1: weechat.desktop Source2: %{name}.keyring Source3: https://weechat.org/files/src/%{name}-%{version}.tar.xz.asc Source4: %{name}.changes +# PATCH-FIX-UPSTREAM +Patch0: 0001-ruby-add-detection-of-Ruby-3.1.patch BuildRequires: ca-certificates BuildRequires: cmake BuildRequires: curl-devel @@ -124,7 +126,7 @@ Provides: %{name}-aspell = %{version} Spell-checking support for %{name}, using the aspell and enchant libraries. %prep -%setup -q +%autosetup -p1 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE4}")" DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" TIME="\"$(date -d "${modified}" "+%%R")\""