From a68a643cf25ffaadf0b1fd6cbd38a9e3ed3c3b3e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 18 Feb 2005 18:40:39 +0000 Subject: I want my memory! Resolves bug #82377 (Portage version: 2.0.51-r15) --- dev-java/batik/ChangeLog | 6 +++++- dev-java/batik/batik-1.5.1-r3.ebuild | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'dev-java/batik') diff --git a/dev-java/batik/ChangeLog b/dev-java/batik/ChangeLog index 2c65c4ec79d0..3a7b238c23ef 100644 --- a/dev-java/batik/ChangeLog +++ b/dev-java/batik/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-java/batik # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/batik/ChangeLog,v 1.18 2005/01/29 21:25:13 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/batik/ChangeLog,v 1.19 2005/02/18 18:40:39 compnerd Exp $ + + 18 Feb 2005; Saleem Abdulrasool + batik-1.5.1-r3.ebuild: + Added memory check; Resolves bug #82377 *batik-1.5.1-r3 (29 Jan 2005) diff --git a/dev-java/batik/batik-1.5.1-r3.ebuild b/dev-java/batik/batik-1.5.1-r3.ebuild index 1b1d29fc6e24..8e4f67d57660 100644 --- a/dev-java/batik/batik-1.5.1-r3.ebuild +++ b/dev-java/batik/batik-1.5.1-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/batik/batik-1.5.1-r3.ebuild,v 1.1 2005/01/29 21:25:13 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/batik/batik-1.5.1-r3.ebuild,v 1.2 2005/02/18 18:40:39 compnerd Exp $ inherit java-pkg @@ -31,6 +31,15 @@ src_unpack() { } src_compile() { + if [ $(memory) -lt 262144 ] ; then + echo + ewarn "To build batik, atleast 256MB of RAM is recommended." + ewarn "Your system has less than 256MB of RAM, continuing anyways." + echo + + export ANT_OPTS=-Xmx256m + fi + local antflags="jars" ant ${antflags} || die "compile problem" } @@ -48,3 +57,7 @@ src_install () { dobin ${PN} } + +function memory() { + cat /proc/meminfo | grep Memtotal | sed -r "s/[^0-9]*([0-9]+).*/\1/" +} -- cgit v1.2.3-65-gdbad