fixed a memory leak in newtTextbox. Thanks to Robert Gill <locke@twilightsilhouette...
authorChristian Zoffoli <xmerlin@gentoo.org>
Thu, 1 Sep 2005 13:25:41 +0000 (13:25 +0000)
committerChristian Zoffoli <xmerlin@gentoo.org>
Thu, 1 Sep 2005 13:25:41 +0000 (13:25 +0000)
Package-Manager: portage-2.0.51.19

dev-libs/newt/ChangeLog
dev-libs/newt/Manifest
dev-libs/newt/files/digest-newt-0.51.6-r1 [new file with mode: 0644]
dev-libs/newt/files/newt-0.51.6-newttextbox-memoryleak.patch [new file with mode: 0644]
dev-libs/newt/newt-0.51.6-r1.ebuild [new file with mode: 0644]

index b028e5a4ee0590b11ffe68a8f849717430f56197..50c4eefce2f2a392d2813acab8bb7b04c0549e3e 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for dev-libs/newt
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/newt/ChangeLog,v 1.24 2005/05/30 03:03:17 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/newt/ChangeLog,v 1.25 2005/09/01 13:25:41 xmerlin Exp $
+
+*newt-0.51.6-r1 (01 Sep 2005)
+
+  01 Sep 2005; Christian Zoffoli <xmerlin@gentoo.org>
+  +files/newt-0.51.6-newttextbox-memoryleak.patch, +newt-0.51.6-r1.ebuild,
+  newt-0.51.6.ebuild:
+  fixed a memory leak in newtTextbox. Thanks to Robert Gill
+  <locke@twilightsilhouette.org>.
 
   29 May 2005; <solar@gentoo.org> newt-0.50.35-r4.ebuild, newt-0.51.6.ebuild:
   - update newt to use libc expanded variable elibc_uclibc vs uclibc so USE=-*
index d4453fe9361079b34a9a8d81548aa1fce10e6974..d99986bda026c71536513856b0ba6d58c1937209 100644 (file)
@@ -4,21 +4,22 @@ Hash: SHA1
 MD5 9dd901e4c2a68f204f1b2dce5cff066b newt-0.50.35-r3.ebuild 898
 MD5 85adf51bae0096b4d4b9f13c146a7d5c newt-0.50.35-r2.ebuild 859
 MD5 05a3d2b2cf5f4c237d48322136b3e7bf newt-0.50.35-r4.ebuild 1568
-MD5 4579231dd385ac121734275b4e5339c3 ChangeLog 3114
+MD5 515bbd7db3ac8a1b8c34e59162633064 ChangeLog 3393
 MD5 917caa8876e58604c0e0f84dcb598380 metadata.xml 296
+MD5 e382a623fb8c6687f948b2f607549e60 newt-0.51.6-r1.ebuild 1990
 MD5 7ac2532571f5dd5558f4b9489378513f newt-0.51.6.ebuild 1917
-MD5 f6412dbeaf1b1f3d11fc8c0fc08c1ee2 files/digest-newt-0.51.6 63
 MD5 6d5a67f6fae3839c22aa176ffbd96790 files/digest-newt-0.50.35-r2 64
 MD5 6d5a67f6fae3839c22aa176ffbd96790 files/digest-newt-0.50.35-r3 64
 MD5 6d5a67f6fae3839c22aa176ffbd96790 files/digest-newt-0.50.35-r4 64
 MD5 27e2ae6e4d99b4a772f4520a89ce73f9 files/newt-0.51.4-fix-wstrlen-for-non-utf8-strings.patch 266
 MD5 9910bf0c9ea69bf046e7801c2c6958ea files/newt-gpm-fix.diff 177
+MD5 f6412dbeaf1b1f3d11fc8c0fc08c1ee2 files/digest-newt-0.51.6 63
+MD5 e2afea648371131edd033fcc81b4a1d0 files/newt-0.51.6-newttextbox-memoryleak.patch 391
+MD5 f6412dbeaf1b1f3d11fc8c0fc08c1ee2 files/digest-newt-0.51.6-r1 63
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.0 (GNU/Linux)
+Version: GnuPG v1.4.1 (GNU/Linux)
 
-iQCVAwUBQpqCfJ4WFLgrx1GWAQJBoQP/diN/rFBIEfDltbOFZl9LTL9i6T/WMK8p
-ALcZswL6aClXPVOoyuSBKgZ/RxxnaK1ZRMDkSkhZ1XhPxJleR99n/CKtyakfwx3U
-4m2w6ec9WPAjMu6gP+Lc8VDphUq9coy6CwxXkvRjGiT/VwOMTBQQh2ka4nPpzd1g
-Y3BWR0Y2+mk=
-=6Gt7
+iD8DBQFDFwHSgMUyd/cdjWsRAgZSAJ41o8YCzFJsmkLVueE7s1EIunvaUQCdFziB
+YBlIVKSmXwpca7/C5LZ5kxQ=
+=ObFe
 -----END PGP SIGNATURE-----
diff --git a/dev-libs/newt/files/digest-newt-0.51.6-r1 b/dev-libs/newt/files/digest-newt-0.51.6-r1
new file mode 100644 (file)
index 0000000..898bb73
--- /dev/null
@@ -0,0 +1 @@
+MD5 76ebfb749d3bbe9a0d55915faef4ac5e newt-0.51.6.tar.gz 155739
diff --git a/dev-libs/newt/files/newt-0.51.6-newttextbox-memoryleak.patch b/dev-libs/newt/files/newt-0.51.6-newttextbox-memoryleak.patch
new file mode 100644 (file)
index 0000000..1e4e074
--- /dev/null
@@ -0,0 +1,11 @@
+diff -urN newt-0.51.6.orig/textbox.c newt-0.51.6/textbox.c
+--- newt-0.51.6.orig/textbox.c 2003-01-03 12:54:45.000000000 -0800
++++ newt-0.51.6/textbox.c      2005-08-12 19:31:03.000000000 -0700
+@@ -418,6 +418,7 @@
+     int i;
+     struct textbox * tb = co->data;
+ 
++    if (tb->sb) tb->sb->ops->destroy(tb->sb);
+     for (i = 0; i < tb->numLines; i++) 
+       free(tb->lines[i]);
+     free(tb->lines);
diff --git a/dev-libs/newt/newt-0.51.6-r1.ebuild b/dev-libs/newt/newt-0.51.6-r1.ebuild
new file mode 100644 (file)
index 0000000..3a0e633
--- /dev/null
@@ -0,0 +1,67 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/newt/newt-0.51.6-r1.ebuild,v 1.1 2005/09/01 13:25:41 xmerlin Exp $
+
+inherit python toolchain-funcs eutils flag-o-matic
+
+DESCRIPTION="Redhat's Newt windowing toolkit development files"
+HOMEPAGE="http://www.redhat.com/"
+SRC_URI="mirror://gentoo/${P}.tar.gz
+       http://dev.gentoo.org/~xmerlin/misc/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="gpm"
+
+DEPEND=">=sys-libs/slang-1.4
+       >=dev-libs/popt-1.6
+       dev-lang/python
+       elibc_uclibc? ( sys-libs/ncurses )
+       gpm? ( sys-libs/gpm )"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+
+       epatch ${FILESDIR}/newt-gpm-fix.diff || die
+       epatch ${FILESDIR}/newt-0.51.4-fix-wstrlen-for-non-utf8-strings.patch || die
+       epatch ${FILESDIR}/${PN}-${PV}-newttextbox-memoryleak.patch || die
+
+       # bug 73850 
+       if use elibc_uclibc; then
+               sed -i -e 's:-lslang:-lslang -lncurses:g' ${S}/Makefile.in
+       fi
+
+       # use the correct compiler...
+       sed -i \
+               -e 's:gcc:$(CC):g' \
+               -e "s:\(libdir =\).*:\1 \$(prefix)/$(get_libdir):g" \
+               ${S}/Makefile.in || die "sed failed"
+
+       # avoid make cleaning up some intermediate files
+       # as it would rebuild them during install :-(
+       echo >>${S}/Makefile.in
+       echo '$(LIBNEWT): $(LIBOBJS)' >>${S}/Makefile.in
+}
+
+src_compile() {
+       python_version
+
+       econf \
+               $(use_with gpm gpm-support) \
+               || die
+
+       # not parallel safe
+       emake -j1 PYTHONVERS="python${PYVER}" RPM_OPT_FLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "make failure"
+}
+
+src_install () {
+       python_version
+       # the RPM_OPT_FLAGS="ERROR" is there to catch a build error
+       # if it fails, that means something in src_compile() didn't build properly
+       # not parallel safe
+       emake -j1 prefix="${D}/usr" PYTHONVERS="python${PYVER}" RPM_OPT_FLAGS="ERROR" install || die "make install failed"
+       dodoc CHANGES COPYING peanuts.py popcorn.py tutorial.sgml
+       dosym libnewt.so.${PV} /usr/$(get_libdir)/libnewt.so.0.50
+}