diff options
author | Kiyoshi Aman <kiyoshi.aman@gmail.com> | 2011-02-16 01:36:32 -0500 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman@gmail.com> | 2011-02-16 01:37:11 -0500 |
commit | d300c7466e7914bc07781b4b33cdb6b4c8bc8f99 (patch) | |
tree | e0d499f61deaef73bde85ffb49feeba793146167 /main | |
parent | 3731e07125ddb129e0949944de7365795de49be3 (diff) | |
download | aports-d300c7466e7914bc07781b4b33cdb6b4c8bc8f99.tar.bz2 aports-d300c7466e7914bc07781b4b33cdb6b4c8bc8f99.tar.xz |
main/irssi: Preliminary support for mIRC 'italics' controlcode.
Diffstat (limited to 'main')
-rw-r--r-- | main/irssi/APKBUILD | 32 | ||||
-rw-r--r-- | main/irssi/irssi-italics.patch | 93 |
2 files changed, 116 insertions, 9 deletions
diff --git a/main/irssi/APKBUILD b/main/irssi/APKBUILD index 4310d19c20..e291da3578 100644 --- a/main/irssi/APKBUILD +++ b/main/irssi/APKBUILD @@ -1,18 +1,31 @@ # Maintainer: Kiyoshi Aman <kiyoshi.aman at gmail.com> pkgname=irssi pkgver=0.8.15 -pkgrel=4 +pkgrel=5 pkgdesc="A modular textUI IRC client with IPv6 support" url="http://irssi.org/" arch="all" license='GPL' depends= makedepends="glib-dev openssl-dev ncurses-dev perl-dev pkgconfig" -source="http://irssi.org/files/irssi-${pkgver}.tar.bz2" +source=" + http://irssi.org/files/irssi-${pkgver}.tar.bz2 + $pkgname-italics.patch + " subpackages="$pkgname-doc $pkgname-dev $pkgname-perl:perl $pkgname-proxy:proxy" _builddir="$srcdir/$pkgname-$pkgver" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + build() { cd "$_builddir" @@ -20,7 +33,7 @@ build() { --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-perl=module \ - --with-proxy + --with-proxy make || return 1 make DESTDIR="$pkgdir" install } @@ -37,7 +50,7 @@ perl() { mv "$pkgdir"/usr/share/irssi/scripts "$subpkgdir"/usr/share/irssi/ mkdir -p "$subpkgdir"/usr/lib/irssi/modules mv "$pkgdir"/usr/lib/irssi/modules/libfe_perl.* \ - "$pkgdir"/usr/lib/irssi/modules/libperl_core.* "$subpkgdir"/usr/lib/irssi/modules/ + "$pkgdir"/usr/lib/irssi/modules/libperl_core.* "$subpkgdir"/usr/lib/irssi/modules/ mv "$pkgdir"/usr/lib/perl5 "$subpkgdir"/usr/lib/ #need write permission when stripping chmod +w "$subpkgdir"/usr/lib/perl5/core_perl/auto/Irssi/TextUI/TextUI.so @@ -47,10 +60,11 @@ perl() { } proxy() { - depends="$pkgname" - pkgdesc="Irssi module for enabling bouncer-like functionality" - mkdir -p "$subpkgdir"/usr/lib/irssi/modules - mv "$pkgdir"/usr/lib/irssi/modules/libirc_proxy.* "$subpkgdir"/usr/lib/irssi/modules/ + depends="$pkgname" + pkgdesc="Irssi module for enabling bouncer-like functionality" + mkdir -p "$subpkgdir"/usr/lib/irssi/modules + mv "$pkgdir"/usr/lib/irssi/modules/libirc_proxy.* "$subpkgdir"/usr/lib/irssi/modules/ } -md5sums="1dcb3f511b88df94b0c996f36668c7da irssi-0.8.15.tar.bz2" +md5sums="1dcb3f511b88df94b0c996f36668c7da irssi-0.8.15.tar.bz2 +997281a5b6dc68f86cc6182d287cc894 irssi-italics.patch" diff --git a/main/irssi/irssi-italics.patch b/main/irssi/irssi-italics.patch new file mode 100644 index 0000000000..fb4324e302 --- /dev/null +++ b/main/irssi/irssi-italics.patch @@ -0,0 +1,93 @@ +--- irssi-0.8.15/src/fe-common/core/fe-messages.c ++++ irssi-b/src/fe-common/core/fe-messages.c +@@ -64,8 +64,12 @@ + + if (*bgn == '*') + type = 2; /* bold */ +- else if (*bgn == '_') ++ else if (*bgn == '_') + type = 31; /* underlined */ ++ /* XXX: irssi does not support 'true' italics at this time. */ ++ else if (settings_get_bool("emphasis_underline_slashes") && ++ (*bgn == '/')) ++ type = 31; /* italics */ + else + continue; + +@@ -76,7 +80,8 @@ + if ((end = strchr(bgn+1, *bgn)) == NULL) + continue; + if (!ishighalnum(end[-1]) || ishighalnum(end[1]) || +- end[1] == type || end[1] == '*' || end[1] == '_') ++ end[1] == type || end[1] == '*' || end[1] == '_' || ++ end[1] == '/') + continue; + + if (IS_CHANNEL(item)) { +@@ -643,6 +648,7 @@ + settings_add_bool("lookandfeel", "emphasis", TRUE); + settings_add_bool("lookandfeel", "emphasis_replace", FALSE); + settings_add_bool("lookandfeel", "emphasis_multiword", FALSE); ++ settings_add_bool("lookandfeel", "emphasis_underline_slashes", FALSE); + settings_add_bool("lookandfeel", "show_nickmode", TRUE); + settings_add_bool("lookandfeel", "show_nickmode_empty", TRUE); + settings_add_bool("lookandfeel", "print_active_channel", FALSE); +--- irssi-0.8.15/src/fe-common/core/formats.c ++++ irssi-b/src/fe-common/core/formats.c +@@ -118,6 +118,10 @@ + g_string_append_c(out, 4); + g_string_append_c(out, FORMAT_STYLE_UNDERLINE); + break; ++ case 'I': ++ /* italics on/off */ ++ g_string_append_c(out, 4); ++ g_string_append_c(out, FORMAT_STYLE_ITALIC); + case '9': + case '_': + /* bold on/off */ +@@ -1050,6 +1054,7 @@ + if (!hide_text_style) + flags ^= GUI_PRINT_FLAG_REVERSE; + break; ++ case 29: /* italics */ + case 31: + /* underline */ + if (!hide_text_style) +--- irssi-0.8.15/src/fe-common/core/formats.h ++++ irssi-b/src/fe-common/core/formats.h +@@ -7,9 +7,10 @@ + #define GUI_PRINT_FLAG_BOLD 0x0001 + #define GUI_PRINT_FLAG_REVERSE 0x0002 + #define GUI_PRINT_FLAG_UNDERLINE 0x0004 +-#define GUI_PRINT_FLAG_BLINK 0x0008 +-#define GUI_PRINT_FLAG_MIRC_COLOR 0x0010 +-#define GUI_PRINT_FLAG_INDENT 0x0020 ++#define GUI_PRINT_FLAG_ITALIC 0x0008 ++#define GUI_PRINT_FLAG_BLINK 0x0010 ++#define GUI_PRINT_FLAG_MIRC_COLOR 0x0020 ++#define GUI_PRINT_FLAG_INDENT 0x0040 + #define GUI_PRINT_FLAG_NEWLINE 0x0080 + #define GUI_PRINT_FLAG_CLRTOEOL 0x0100 + #define GUI_PRINT_FLAG_MONOSPACE 0x0200 +@@ -126,8 +127,9 @@ + #define FORMAT_STYLE_BLINK (0x01 + FORMAT_STYLE_SPECIAL) + #define FORMAT_STYLE_UNDERLINE (0x02 + FORMAT_STYLE_SPECIAL) + #define FORMAT_STYLE_BOLD (0x03 + FORMAT_STYLE_SPECIAL) +-#define FORMAT_STYLE_REVERSE (0x04 + FORMAT_STYLE_SPECIAL) +-#define FORMAT_STYLE_INDENT (0x05 + FORMAT_STYLE_SPECIAL) ++#define FORMAT_STYLE_ITALIC (0x04 + FORMAT_STYLE_SPECIAL) ++#define FORMAT_STYLE_REVERSE (0x05 + FORMAT_STYLE_SPECIAL) ++#define FORMAT_STYLE_INDENT (0x06 + FORMAT_STYLE_SPECIAL) + #define FORMAT_STYLE_DEFAULTS (0x07 + FORMAT_STYLE_SPECIAL) + #define FORMAT_STYLE_CLRTOEOL (0x08 + FORMAT_STYLE_SPECIAL) + #define FORMAT_STYLE_MONOSPACE (0x09 + FORMAT_STYLE_SPECIAL) +--- irssi-0.8.15/src/fe-text/gui-printtext.c ++++ irssi-b/src/fe-text/gui-printtext.c +@@ -157,6 +157,7 @@ + if (flags & GUI_PRINT_FLAG_REVERSE) *attr |= ATTR_REVERSE; + if (flags & GUI_PRINT_FLAG_BOLD) *attr |= ATTR_BOLD; + if (flags & GUI_PRINT_FLAG_UNDERLINE) *attr |= ATTR_UNDERLINE; ++ if (flags & GUI_PRINT_FLAG_ITALIC) *attr |= ATTR_UNDERLINE; + if (flags & GUI_PRINT_FLAG_BLINK) *attr |= ATTR_BLINK; + } + |