summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2005-09-01 13:25:41 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2005-09-01 13:25:41 +0000
commite93eb3a6c0ade045fd2a02fcee5b72ecf93ece7f (patch)
tree0e9312fa2c65270aa63e3f2e46625e3c9ecb0c29 /dev-libs/newt/newt-0.51.6-r1.ebuild
parentInitial import (diff)
downloadgentoo-2-e93eb3a6c0ade045fd2a02fcee5b72ecf93ece7f.tar.gz
gentoo-2-e93eb3a6c0ade045fd2a02fcee5b72ecf93ece7f.tar.bz2
gentoo-2-e93eb3a6c0ade045fd2a02fcee5b72ecf93ece7f.zip
fixed a memory leak in newtTextbox. Thanks to Robert Gill <locke@twilightsilhouette.org>.
(Portage version: 2.0.51.19)
Diffstat (limited to 'dev-libs/newt/newt-0.51.6-r1.ebuild')
-rw-r--r--dev-libs/newt/newt-0.51.6-r1.ebuild67
1 files changed, 67 insertions, 0 deletions
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
index 000000000000..3a0e633ebf85
--- /dev/null
+++ b/dev-libs/newt/newt-0.51.6-r1.ebuild
@@ -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
+}