diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-01-05 12:01:05 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-01-05 12:01:05 +0000 |
commit | 2efd20d5d4a9cf2e3971de3b2a241d943a812353 (patch) | |
tree | 7e2e317a42d826ada26709e81b35f6ab77ff9973 /net-im | |
parent | Prefix doesn't do stable keywords (diff) | |
download | gentoo-2-2efd20d5d4a9cf2e3971de3b2a241d943a812353.tar.gz gentoo-2-2efd20d5d4a9cf2e3971de3b2a241d943a812353.tar.bz2 gentoo-2-2efd20d5d4a9cf2e3971de3b2a241d943a812353.zip |
Fix memory leak and hebrew support wrt #299734, thanks to Andy Crook for reporting. Remove USE="kde" since it's broken (upstream) with default Oxygen theme wrt #296929, thanks to Marcel Semancik for reporting.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/licq/ChangeLog | 12 | ||||
-rw-r--r-- | net-im/licq/files/licq-1.3.8-hebrew.patch | 95 | ||||
-rw-r--r-- | net-im/licq/files/licq-1.3.8-memory_leak.patch | 9 | ||||
-rw-r--r-- | net-im/licq/licq-1.3.8-r1.ebuild (renamed from net-im/licq/licq-1.3.8.ebuild) | 26 |
4 files changed, 130 insertions, 12 deletions
diff --git a/net-im/licq/ChangeLog b/net-im/licq/ChangeLog index 0bf58133dded..01b185e32f71 100644 --- a/net-im/licq/ChangeLog +++ b/net-im/licq/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-im/licq -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/licq/ChangeLog,v 1.112 2009/12/25 20:20:05 ssuominen Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/licq/ChangeLog,v 1.113 2010/01/05 12:01:05 ssuominen Exp $ + +*licq-1.3.8-r1 (05 Jan 2010) + + 05 Jan 2010; Samuli Suominen <ssuominen@gentoo.org> +licq-1.3.8-r1.ebuild, + +files/licq-1.3.8-hebrew.patch, +files/licq-1.3.8-memory_leak.patch: + Fix memory leak and hebrew support wrt #299734, thanks to Andy Crook for + reporting. Remove USE="kde" since it's broken (upstream) with default + Oxygen theme wrt #296929, thanks to Marcel Semancik for reporting. 25 Dec 2009; Samuli Suominen <ssuominen@gentoo.org> licq-1.3.6.ebuild: Remove kdelibs:3.5 depend and USE kde with it wrt #292791 and workaround diff --git a/net-im/licq/files/licq-1.3.8-hebrew.patch b/net-im/licq/files/licq-1.3.8-hebrew.patch new file mode 100644 index 000000000000..a0fdb936bdb2 --- /dev/null +++ b/net-im/licq/files/licq-1.3.8-hebrew.patch @@ -0,0 +1,95 @@ +--- configure ++++ configure +@@ -3283,7 +3283,7 @@ + + # Check whether --enable-hebrew was given. + if test "${enable_hebrew+set}" = set; then : +- enableval=$enable_hebrew; USE_HEBREW=yes ++ enableval=$enable_hebrew; USE_HEBREW=$enableval + else + USE_HEBREW=no + fi +--- src/hebrev.c ++++ src/hebrev.c +@@ -48,6 +48,7 @@ + short int mode = 0, imode; + const char *hmark = NULL, *lmark, *nmark, *nlmark; + char ch; ++ const char* srcstart = src; + + if (src == NULL) + return NULL; +@@ -69,7 +70,7 @@ + if (*src == 0 || iseng(*src)) + { + lmark = src-1; +- while ((!isheb(*lmark)) && (!ispunct(*lmark))) lmark--; ++ while (lmark > srcstart && !isheb(*lmark) && !ispunct(*lmark)) lmark--; + src = lmark; + imode = 0; + nmark = NULL; +@@ -114,6 +115,7 @@ + hmark = NULL; + mode = 0; + } ++ if (*src == '\0') *dest = '\0'; + } + if (!*src++) + break; +@@ -141,15 +143,16 @@ + char *temp=NULL, *tmp=NULL; + char *arg=NULL, *arg2=NULL; + int i=0; ++ char* saveptr = NULL; + + temp = (char*) malloc(strlen(input)+1); + tmp = temp; + + strcpy(temp, input); + +- arg = strtok(temp, "\n"); ++ arg = strtok_r(temp, "\n", &saveptr); + for(i = 0; (i < index) && (arg!=NULL); i++) +- arg = strtok(NULL, "\n"); ++ arg = strtok_r(NULL, "\n", &saveptr); + + if(arg != NULL) + { +@@ -164,6 +167,7 @@ + { + char* temp_str = NULL; + char* temp = NULL; ++ char* arg = NULL; + int i=0; + int size = 0; + if(src == NULL) +@@ -172,21 +176,23 @@ + if((temp_str = (char*)malloc(strlen(src)+1))== NULL) + return NULL; + +- temp = GetArg(src, i); +- while(temp != NULL) ++ arg = GetArg(src, i); ++ while(arg != NULL) + { + i++; +- temp = hebrew(temp); ++ temp = hebrew(arg); ++ free(arg); + memcpy(temp_str + size , temp, strlen(temp)); + size += strlen(temp) ; + temp_str[size++] = '\n'; + + free(temp); + temp = NULL; +- temp = GetArg(src, i); ++ arg = GetArg(src, i); + } +- free(temp); +- temp_str[size]= '\0'; ++ // Above loop adds a line break after last line that wasn't there in src ++ // replace it with the null terminator ++ temp_str[--size]= '\0'; + return temp_str; + } + diff --git a/net-im/licq/files/licq-1.3.8-memory_leak.patch b/net-im/licq/files/licq-1.3.8-memory_leak.patch new file mode 100644 index 000000000000..38ea9e0da5bb --- /dev/null +++ b/net-im/licq/files/licq-1.3.8-memory_leak.patch @@ -0,0 +1,9 @@ +--- src/user.cpp ++++ src/user.cpp +@@ -3631,6 +3631,7 @@ + { + gLog.Error("%sUnable to open picture file (%s):\n%s%s.\n", L_ERRORxSTR, + szFilename, L_BLANKxSTR, strerror(errno)); ++ close(source); + return; + } diff --git a/net-im/licq/licq-1.3.8.ebuild b/net-im/licq/licq-1.3.8-r1.ebuild index 09f159ea1e07..5da5c0cf97b8 100644 --- a/net-im/licq/licq-1.3.8.ebuild +++ b/net-im/licq/licq-1.3.8-r1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/licq/licq-1.3.8.ebuild,v 1.2 2009/12/14 14:23:16 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/licq/licq-1.3.8-r1.ebuild,v 1.1 2010/01/05 12:01:05 ssuominen Exp $ EAPI=2 CMAKE_USE_DIR="${S}/plugins/qt4-gui" -inherit cmake-utils +inherit cmake-utils eutils DESCRIPTION="ICQ Client with v8 support" HOMEPAGE="http://www.licq.org/" @@ -13,15 +13,13 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="2" KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" -IUSE="debug linguas_he ncurses msn nls crypt kde socks5 ssl qt4 xosd" +IUSE="debug linguas_he ncurses msn nls crypt socks5 ssl qt4 xosd" RDEPEND="crypt? ( >=app-crypt/gpgme-1 ) ncurses? ( sys-libs/ncurses dev-libs/cdk ) ssl? ( >=dev-libs/openssl-0.9.5a ) - qt4? ( x11-libs/qt-gui:4 - kde? ( >=kde-base/kdelibs-4 - !kde-base/kdelibs[kdeprefix] ) ) + qt4? ( x11-libs/qt-gui:4 ) xosd? ( x11-libs/xosd )" DEPEND="${RDEPEND} nls? ( sys-devel/gettext ) @@ -34,6 +32,11 @@ pkg_setup() { use xosd && licq_plugins="${licq_plugins} osd" } +src_prepare() { + epatch "${FILESDIR}"/${P}-hebrew.patch \ + "${FILESDIR}"/${P}-memory_leak.patch +} + src_configure() { econf \ $(use_enable linguas_he hebrew) \ @@ -49,9 +52,12 @@ src_configure() { econf done - mycmakeargs="${mycmakeargs} - $(cmake-utils_use_with kde)" - use qt4 && cmake-utils_src_configure + if use qt4; then + # http://licq.org/ticket/1662 + mycmakeargs="${mycmakeargs} + -DWITH_KDE=OFF" + cmake-utils_src_configure + fi } src_compile() { |