diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2018-11-11 16:51:50 +0000 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-11-11 23:21:49 +0100 |
commit | e7c1fe60a65bf1738161ff27109f56941c1adced (patch) | |
tree | c119203453795eb8e1e76c7288f753ad97e5c10d /main | |
parent | bf402a06a195828237cb1cb6551b59dd2b3e6816 (diff) | |
download | aports-e7c1fe60a65bf1738161ff27109f56941c1adced.tar.bz2 aports-e7c1fe60a65bf1738161ff27109f56941c1adced.tar.xz |
main/mcabber: fix colors
Fixes #8757
Diffstat (limited to 'main')
-rw-r--r-- | main/mcabber/APKBUILD | 8 | ||||
-rw-r--r-- | main/mcabber/fix-roster-colors-on-freebsd.patch | 89 |
2 files changed, 94 insertions, 3 deletions
diff --git a/main/mcabber/APKBUILD b/main/mcabber/APKBUILD index 25b9eb957b..ccfcbf2483 100644 --- a/main/mcabber/APKBUILD +++ b/main/mcabber/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=mcabber pkgver=1.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="A small Jabber console client" url="https://mcabber.com" arch="all" @@ -12,7 +12,8 @@ options="libtool" makedepends="loudmouth-dev glib-dev ncurses-dev gpgme-dev aspell-dev libotr3-dev libidn-dev enchant-dev" subpackages="$pkgname-dev $pkgname-doc" -source="https://mcabber.com/files/$pkgname-$pkgver.tar.bz2" +source="https://mcabber.com/files/$pkgname-$pkgver.tar.bz2 + fix-roster-colors-on-freebsd.patch" builddir="$srcdir/$pkgname-$pkgver" build() { @@ -41,4 +42,5 @@ package() { || return 1 } -sha512sums="d12546e9fe9da94b6107f4d38d4083bee74e2702f7f2225e26be291230c6fe1319f60a3204da669dc00b14d69822425bf8214ebb723c3c4a7a33b1247a03093f mcabber-1.1.0.tar.bz2" +sha512sums="d12546e9fe9da94b6107f4d38d4083bee74e2702f7f2225e26be291230c6fe1319f60a3204da669dc00b14d69822425bf8214ebb723c3c4a7a33b1247a03093f mcabber-1.1.0.tar.bz2 +e8a1207eb04497b4e6ddfc5b6a55c9d6e07094504f472c4b643eeee1adfd81a1b38d64b82d8fec51d4bba757ca2e377f2e339a13f76c8ea0744a28ab3acc18a0 fix-roster-colors-on-freebsd.patch" diff --git a/main/mcabber/fix-roster-colors-on-freebsd.patch b/main/mcabber/fix-roster-colors-on-freebsd.patch new file mode 100644 index 0000000000..d1579ad430 --- /dev/null +++ b/main/mcabber/fix-roster-colors-on-freebsd.patch @@ -0,0 +1,89 @@ +Without this patch colors in mcabber do not work on Alpine (and +apparently also on FreeBSD). + +The patch was taken from: https://bitbucket.org/McKael/mcabber-crew/issues/60/ + +diff --git a/mcabber/mcabber/screen.c b/mcabber/mcabber/screen.c +--- a/mcabber/screen.c ++++ b/mcabber/screen.c +@@ -1159,7 +1159,7 @@ static void scr_update_window(winbuf *wi + color = COLOR_GENERAL; + + if (color != COLOR_GENERAL) +- wattrset(win_entry->win, get_color(color)); ++ wbkgdset(win_entry->win, get_color(color)); + + // Generate the prefix area and display it + scr_line_prefix(line, pref, prefixwidth); +@@ -1215,12 +1215,12 @@ static void scr_update_window(winbuf *wi + if (actual && ((type == MC_ALL) || (actual->manual)) + && (line->flags & HBB_PREFIX_IN) && + (!(line->flags & HBB_PREFIX_HLIGHT_OUT))) +- wattrset(win_entry->win, compose_color(actual->color)); ++ wbkgdset(win_entry->win, compose_color(actual->color)); + wprintw(win_entry->win, "%s", line->text); + // Return the char + line->text[line->mucnicklen] = tmp; + // Return the color back +- wattrset(win_entry->win, get_color(color)); ++ wbkgdset(win_entry->win, get_color(color)); + } + + // Display text line +@@ -1229,7 +1229,7 @@ static void scr_update_window(winbuf *wi + + // Return the color back + if (color != COLOR_GENERAL) +- wattrset(win_entry->win, get_color(COLOR_GENERAL)); ++ wbkgdset(win_entry->win, get_color(COLOR_GENERAL)); + + g_free(line->text); + g_free(line); +@@ -1879,7 +1879,7 @@ void scr_draw_roster(void) + if (Roster_Width) { + int line_x_pos = roster_win_on_right ? 0 : Roster_Width-1; + // Redraw the vertical line (not very good...) +- wattrset(rosterWnd, get_color(COLOR_GENERAL)); ++ wbkgdset(rosterWnd, get_color(COLOR_GENERAL)); + for (i=0 ; i < CHAT_WIN_HEIGHT ; i++) + mvwaddch(rosterWnd, i, line_x_pos, ACS_VLINE); + } +@@ -1977,16 +1977,16 @@ void scr_draw_roster(void) + } + if (buddy == current_buddy) { + if (pending == '#') +- wattrset(rosterWnd, get_color(COLOR_ROSTERSELNMSG)); +- else +- wattrset(rosterWnd, get_color(COLOR_ROSTERSEL)); ++ wbkgdset(rosterWnd, get_color(COLOR_ROSTERSELNMSG)); ++ else ++ wbkgdset(rosterWnd, get_color(COLOR_ROSTERSEL)); + // The 3 following lines aim at coloring the whole line + wmove(rosterWnd, i, x_pos); + for (n = 0; n < maxx; n++) + waddch(rosterWnd, ' '); + } else { + if (pending == '#') +- wattrset(rosterWnd, get_color(COLOR_ROSTERNMSG)); ++ wbkgdset(rosterWnd, get_color(COLOR_ROSTERNMSG)); + else { + int color = get_color(COLOR_ROSTER); + if ((!isspe) && (!isgrp)) { // Look for color rules +@@ -2001,7 +2001,7 @@ void scr_draw_roster(void) + } + } + } +- wattrset(rosterWnd, color); ++ wbkgdset(rosterWnd, color); + } + } + +@@ -2055,6 +2055,8 @@ void scr_draw_roster(void) + i++; + } + ++ wbkgdset(rosterWnd, get_color(COLOR_GENERAL)); ++ + g_free(rline); + g_free(name); + top_panel(inputPanel); |