From 1ae4a1456c19847ab940451c362c0d48b3c3733502547b6b0837501a3ca4a6e9 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 7 Mar 2018 16:58:39 +0000 Subject: [PATCH] Accepting request 583470 from home:dimstar:Factory Fix build with latest ncurses changes OBS-URL: https://build.opensuse.org/request/show/583470 OBS-URL: https://build.opensuse.org/package/show/network:pidgin/pidgin?expand=0&rev=16 --- pidgin-ncurses-6.0-accessors.patch | 36 +++++++++++++++--------------- pidgin.changes | 7 ++++++ pidgin.spec | 12 +++++----- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/pidgin-ncurses-6.0-accessors.patch b/pidgin-ncurses-6.0-accessors.patch index 52b86a7..a1feb4c 100644 --- a/pidgin-ncurses-6.0-accessors.patch +++ b/pidgin-ncurses-6.0-accessors.patch @@ -1,7 +1,7 @@ -Index: pidgin-2.10.11/finch/libgnt/gntwm.c +Index: pidgin-2.12.0/finch/libgnt/gntwm.c =================================================================== ---- pidgin-2.10.11.orig/finch/libgnt/gntwm.c -+++ pidgin-2.10.11/finch/libgnt/gntwm.c +--- pidgin-2.12.0.orig/finch/libgnt/gntwm.c ++++ pidgin-2.12.0/finch/libgnt/gntwm.c @@ -174,37 +174,37 @@ work_around_for_ncurses_bug(void) cchar_t ch; PANEL *below = panel; @@ -10,26 +10,26 @@ Index: pidgin-2.10.11/finch/libgnt/gntwm.c - ex = panel->win->_maxx + sx; - sy = panel->win->_begy; - ey = panel->win->_maxy + sy; -+ sx = getbegx(panel->win); -+ ex = getmaxx(panel->win) + sx; -+ sy = getbegy(panel->win); -+ ey = getmaxy(panel->win) + sy; ++ sx = getbegx(panel_window(panel)); ++ ex = getmaxx(panel_window(panel)) + sx; ++ sy = getbegy(panel_window(panel)); ++ ey = getmaxy(panel_window(panel)) + sy; while ((below = panel_below(below)) != NULL) { - if (sy > below->win->_begy + below->win->_maxy || - ey < below->win->_begy) -+ if (sy > getbegy(below->win) + getmaxy(below->win) || -+ ey < getbegy(below->win)) ++ if (sy > getbegy(panel_window(below)) + getmaxy(panel_window(below)) || ++ ey < getbegy(panel_window(below))) continue; - if (sx > below->win->_begx + below->win->_maxx || - ex < below->win->_begx) -+ if (sx > getbegx(below->win) + getmaxx(below->win) || -+ ex < getbegx(below->win)) ++ if (sx > getbegx(panel_window(below)) + getmaxx(panel_window(below)) || ++ ex < getbegx(panel_window(below))) continue; - for (y = MAX(sy, below->win->_begy); y <= MIN(ey, below->win->_begy + below->win->_maxy); y++) { - if (mvwin_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch) != OK) -+ for (y = MAX(sy, getbegy(below->win)); y <= MIN(ey, getbegy(below->win) + getmaxy(below->win)); y++) { -+ if (mvwin_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch) != OK) ++ for (y = MAX(sy, getbegy(panel_window(below))); y <= MIN(ey, getbegy(panel_window(below)) + getmaxy(panel_window(below))); y++) { ++ if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch) != OK) goto right; w = widestringwidth(ch.chars); if (w > 1 && (ch.attr & 1)) { @@ -37,12 +37,12 @@ Index: pidgin-2.10.11/finch/libgnt/gntwm.c ch.attr &= ~ A_CHARTEXT; - mvwadd_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch); - touchline(below->win, y - below->win->_begy, 1); -+ mvwadd_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch); -+ touchline(below->win, y - getbegy(below->win), 1); ++ mvwadd_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch); ++ touchline(panel_window(below), y - getbegy(panel_window(below)), 1); } right: - if (mvwin_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch) != OK) -+ if (mvwin_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch) != OK) ++ if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), ex + 1 - getbegx(panel_window(below)), &ch) != OK) continue; w = widestringwidth(ch.chars); if (w > 1 && !(ch.attr & 1)) { @@ -50,8 +50,8 @@ Index: pidgin-2.10.11/finch/libgnt/gntwm.c ch.attr &= ~ A_CHARTEXT; - mvwadd_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch); - touchline(below->win, y - below->win->_begy, 1); -+ mvwadd_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch); -+ touchline(below->win, y - getbegy(below->win), 1); ++ mvwadd_wch(panel_window(below), y - getbegy(panel_window(below)), ex + 1 - getbegx(panel_window(below)), &ch); ++ touchline(panel_window(below), y - getbegy(panel_window(below)), 1); } } } diff --git a/pidgin.changes b/pidgin.changes index 02f2df6..604df40 100644 --- a/pidgin.changes +++ b/pidgin.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 6 15:52:11 UTC 2018 - dimstar@opensuse.org + +- Update pidgin-ncurses-6.0-accessors.patch to cope with ncurses + enabling opaque-panels. Pidgin should not access internal + structures of ncurses. + ------------------------------------------------------------------- Sat Dec 29 14:06:45 UTC 2017 - sor.alexei@meowr.ru diff --git a/pidgin.spec b/pidgin.spec index cfc0657..c8a0558 100644 --- a/pidgin.spec +++ b/pidgin.spec @@ -1,7 +1,7 @@ # # spec file for package pidgin # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,9 +21,9 @@ Name: pidgin Version: 2.12.0 Release: 0 Summary: Multiprotocol Instant Messaging Client -License: GPL-2.0 +License: GPL-2.0-only Group: Productivity/Networking/Instant Messenger -Url: https://pidgin.im/ +URL: https://pidgin.im/ Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2 Source1: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2.asc Source2: pidgin.keyring @@ -68,7 +68,6 @@ BuildRequires: startup-notification-devel BuildRequires: tk-devel BuildRequires: update-desktop-files Requires: perl-base >= %{perl_version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} >= 1120 BuildRequires: translation-update-upstream %else @@ -170,7 +169,7 @@ Summary: GLib-based Instant Messenger Library -- Upstream default configu Group: System/Libraries Requires: libpurple = %{version} Supplements: packageand(libpurple:branding-upstream) -Conflicts: otherproviders(libpurple-branding) +Conflicts: libpurple-branding Provides: libpurple-branding = %{version} %if 0%{?suse_version} >= 1210 BuildArch: noarch @@ -349,7 +348,8 @@ done %files %defattr(-,root,root) -%doc AUTHORS COPYING COPYRIGHT ChangeLog README doc/the_penguin.txt +%license COPYING +%doc AUTHORS COPYRIGHT ChangeLog README doc/the_penguin.txt %{_bindir}/%{name} %{_libdir}/%{name}/ %{_datadir}/sounds/purple/