Accepting request 954412 from server:irc

OBS-URL: https://build.opensuse.org/request/show/954412
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/weechat?expand=0&rev=64
This commit is contained in:
Dominique Leuenberger 2022-02-14 23:37:40 +00:00 committed by Git OBS Bridge
commit e166058b3d
3 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,39 @@
From b32059638933d2c958961dae396fe4a5a0c2e784 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= <flashcode@flashtux.org>
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 11 09:10:16 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patch:
* 0001-ruby-add-detection-of-Ruby-3.1.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Dec 20 10:35:51 UTC 2021 - Dirk Müller <dmueller@suse.com> Mon Dec 20 10:35:51 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package weechat # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -28,6 +28,8 @@ Source1: weechat.desktop
Source2: %{name}.keyring Source2: %{name}.keyring
Source3: https://weechat.org/files/src/%{name}-%{version}.tar.xz.asc Source3: https://weechat.org/files/src/%{name}-%{version}.tar.xz.asc
Source4: %{name}.changes Source4: %{name}.changes
# PATCH-FIX-UPSTREAM
Patch0: 0001-ruby-add-detection-of-Ruby-3.1.patch
BuildRequires: ca-certificates BuildRequires: ca-certificates
BuildRequires: cmake BuildRequires: cmake
BuildRequires: curl-devel BuildRequires: curl-devel
@ -124,7 +126,7 @@ Provides: %{name}-aspell = %{version}
Spell-checking support for %{name}, using the aspell and enchant libraries. Spell-checking support for %{name}, using the aspell and enchant libraries.
%prep %prep
%setup -q %autosetup -p1
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE4}")" modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE4}")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\"" TIME="\"$(date -d "${modified}" "+%%R")\""