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
This commit is contained in:
Dominique Leuenberger 2018-03-07 16:58:39 +00:00 committed by Git OBS Bridge
parent 2be827c472
commit 1ae4a1456c
3 changed files with 31 additions and 24 deletions

View File

@ -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.12.0.orig/finch/libgnt/gntwm.c
+++ pidgin-2.10.11/finch/libgnt/gntwm.c +++ pidgin-2.12.0/finch/libgnt/gntwm.c
@@ -174,37 +174,37 @@ work_around_for_ncurses_bug(void) @@ -174,37 +174,37 @@ work_around_for_ncurses_bug(void)
cchar_t ch; cchar_t ch;
PANEL *below = panel; PANEL *below = panel;
@ -10,26 +10,26 @@ Index: pidgin-2.10.11/finch/libgnt/gntwm.c
- ex = panel->win->_maxx + sx; - ex = panel->win->_maxx + sx;
- sy = panel->win->_begy; - sy = panel->win->_begy;
- ey = panel->win->_maxy + sy; - ey = panel->win->_maxy + sy;
+ sx = getbegx(panel->win); + sx = getbegx(panel_window(panel));
+ ex = getmaxx(panel->win) + sx; + ex = getmaxx(panel_window(panel)) + sx;
+ sy = getbegy(panel->win); + sy = getbegy(panel_window(panel));
+ ey = getmaxy(panel->win) + sy; + ey = getmaxy(panel_window(panel)) + sy;
while ((below = panel_below(below)) != NULL) { while ((below = panel_below(below)) != NULL) {
- if (sy > below->win->_begy + below->win->_maxy || - if (sy > below->win->_begy + below->win->_maxy ||
- ey < below->win->_begy) - ey < below->win->_begy)
+ if (sy > getbegy(below->win) + getmaxy(below->win) || + if (sy > getbegy(panel_window(below)) + getmaxy(panel_window(below)) ||
+ ey < getbegy(below->win)) + ey < getbegy(panel_window(below)))
continue; continue;
- if (sx > below->win->_begx + below->win->_maxx || - if (sx > below->win->_begx + below->win->_maxx ||
- ex < below->win->_begx) - ex < below->win->_begx)
+ if (sx > getbegx(below->win) + getmaxx(below->win) || + if (sx > getbegx(panel_window(below)) + getmaxx(panel_window(below)) ||
+ ex < getbegx(below->win)) + ex < getbegx(panel_window(below)))
continue; continue;
- for (y = MAX(sy, below->win->_begy); y <= MIN(ey, below->win->_begy + below->win->_maxy); y++) { - 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) - 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++) { + for (y = MAX(sy, getbegy(panel_window(below))); y <= MIN(ey, getbegy(panel_window(below)) + getmaxy(panel_window(below))); y++) {
+ if (mvwin_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch) != OK) + if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch) != OK)
goto right; goto right;
w = widestringwidth(ch.chars); w = widestringwidth(ch.chars);
if (w > 1 && (ch.attr & 1)) { if (w > 1 && (ch.attr & 1)) {
@ -37,12 +37,12 @@ Index: pidgin-2.10.11/finch/libgnt/gntwm.c
ch.attr &= ~ A_CHARTEXT; ch.attr &= ~ A_CHARTEXT;
- mvwadd_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch); - mvwadd_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch);
- touchline(below->win, y - below->win->_begy, 1); - touchline(below->win, y - below->win->_begy, 1);
+ mvwadd_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch); + mvwadd_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch);
+ touchline(below->win, y - getbegy(below->win), 1); + touchline(panel_window(below), y - getbegy(panel_window(below)), 1);
} }
right: right:
- if (mvwin_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch) != OK) - 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; continue;
w = widestringwidth(ch.chars); w = widestringwidth(ch.chars);
if (w > 1 && !(ch.attr & 1)) { if (w > 1 && !(ch.attr & 1)) {
@ -50,8 +50,8 @@ Index: pidgin-2.10.11/finch/libgnt/gntwm.c
ch.attr &= ~ A_CHARTEXT; ch.attr &= ~ A_CHARTEXT;
- mvwadd_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch); - mvwadd_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch);
- touchline(below->win, y - below->win->_begy, 1); - touchline(below->win, y - below->win->_begy, 1);
+ mvwadd_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch); + mvwadd_wch(panel_window(below), y - getbegy(panel_window(below)), ex + 1 - getbegx(panel_window(below)), &ch);
+ touchline(below->win, y - getbegy(below->win), 1); + touchline(panel_window(below), y - getbegy(panel_window(below)), 1);
} }
} }
} }

View File

@ -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 Sat Dec 29 14:06:45 UTC 2017 - sor.alexei@meowr.ru

View File

@ -1,7 +1,7 @@
# #
# spec file for package pidgin # 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 # 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
@ -21,9 +21,9 @@ Name: pidgin
Version: 2.12.0 Version: 2.12.0
Release: 0 Release: 0
Summary: Multiprotocol Instant Messaging Client Summary: Multiprotocol Instant Messaging Client
License: GPL-2.0 License: GPL-2.0-only
Group: Productivity/Networking/Instant Messenger Group: Productivity/Networking/Instant Messenger
Url: https://pidgin.im/ URL: https://pidgin.im/
Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2 Source: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2
Source1: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2.asc Source1: http://downloads.sf.net/%{name}/%{name}-%{version}.tar.bz2.asc
Source2: pidgin.keyring Source2: pidgin.keyring
@ -68,7 +68,6 @@ BuildRequires: startup-notification-devel
BuildRequires: tk-devel BuildRequires: tk-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
Requires: perl-base >= %{perl_version} Requires: perl-base >= %{perl_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1120 %if 0%{?suse_version} >= 1120
BuildRequires: translation-update-upstream BuildRequires: translation-update-upstream
%else %else
@ -170,7 +169,7 @@ Summary: GLib-based Instant Messenger Library -- Upstream default configu
Group: System/Libraries Group: System/Libraries
Requires: libpurple = %{version} Requires: libpurple = %{version}
Supplements: packageand(libpurple:branding-upstream) Supplements: packageand(libpurple:branding-upstream)
Conflicts: otherproviders(libpurple-branding) Conflicts: libpurple-branding
Provides: libpurple-branding = %{version} Provides: libpurple-branding = %{version}
%if 0%{?suse_version} >= 1210 %if 0%{?suse_version} >= 1210
BuildArch: noarch BuildArch: noarch
@ -349,7 +348,8 @@ done
%files %files
%defattr(-,root,root) %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} %{_bindir}/%{name}
%{_libdir}/%{name}/ %{_libdir}/%{name}/
%{_datadir}/sounds/purple/ %{_datadir}/sounds/purple/