diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-22 12:16:57 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-22 12:16:57 +0000 |
commit | ea12386a04768db37927098b4ecd8e43e3226d41 (patch) | |
tree | 94f6cd85df0eb13dc0562aaab6a4e1ca8c4894dc /media-libs | |
parent | Remove realtime-lsm as per bug #199011. (diff) | |
download | historical-ea12386a04768db37927098b4ecd8e43e3226d41.tar.gz historical-ea12386a04768db37927098b4ecd8e43e3226d41.tar.bz2 historical-ea12386a04768db37927098b4ecd8e43e3226d41.zip |
Backport maxmem sysconf() patch from jpeg-6b patchset.
Package-Manager: portage-2.2_rc38/cvs/Linux x86_64
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/jpeg/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/jpeg/Manifest | 5 | ||||
-rw-r--r-- | media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch | 50 | ||||
-rw-r--r-- | media-libs/jpeg/jpeg-7.ebuild | 7 |
4 files changed, 62 insertions, 6 deletions
diff --git a/media-libs/jpeg/ChangeLog b/media-libs/jpeg/ChangeLog index b60bfcf78092..ef6d1d0d51b6 100644 --- a/media-libs/jpeg/ChangeLog +++ b/media-libs/jpeg/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/jpeg # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg/ChangeLog,v 1.71 2009/08/22 10:29:58 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg/ChangeLog,v 1.72 2009/08/22 12:16:57 ssuominen Exp $ + + 22 Aug 2009; Samuli Suominen <ssuominen@gentoo.org> jpeg-7.ebuild, + +files/jpeg-7-maxmem_sysconf.patch: + Backport maxmem sysconf() patch from jpeg-6b patchset. *jpeg-7 (22 Aug 2009) diff --git a/media-libs/jpeg/Manifest b/media-libs/jpeg/Manifest index 1fc745ba9db3..e510bef9f30b 100644 --- a/media-libs/jpeg/Manifest +++ b/media-libs/jpeg/Manifest @@ -1,8 +1,9 @@ +AUX jpeg-7-maxmem_sysconf.patch 1440 RMD160 ba0b67b885c28ab2e56b6ed076555f43eaec19f3 SHA1 57c8d3a2a7d1c938434b10ea920cb92838b55ce4 SHA256 21e190b9bc8d0fd8ee884e02d81bc888f6adb5898443273dcd8a897e548477b2 DIST jpeg-6b-patches-1.6.tar.bz2 22573 RMD160 21290e71c116d8e543737ffd5e26b96f34e30f93 SHA1 b66629ad0380a318442be5b5b4ba945bf98035ff SHA256 23a07581f336a1e8c33f0efdb4b3ef728fe278459811b3b89258f8525dbbbcca DIST jpeg-7-extra.tar.bz2 4117 RMD160 e480de4c975fa342ea62479e9556445b8a623589 SHA1 2020925bd47efa38a7aa662c901a63081beb7ecb SHA256 edd1b18211cf27004204e19f7ee9c3af23e844ec9780497018f7461d291d743a DIST jpegsrc.v6b.tar.gz 613261 RMD160 18892206014fbb8cae2a44e281f4ed53feaf7882 SHA1 7079f0d6c42fad0cfba382cf6ad322add1ace8f9 SHA256 75c3ec241e9996504fe02a9ed4d12f16b74ade713972f3db9e65ce95cd27e35d DIST jpegsrc.v7.tar.gz 960379 RMD160 6049c5fee2682c0757d4b51740abd981d1b24487 SHA1 88cced0fc3dbdbc82115e1d08abce4e9d23a4b47 SHA256 50b7866206c5be044c4a2b0d7895898f5a58d31b50e16e79cf7dea3b90337ebf EBUILD jpeg-6b-r8.ebuild 1403 RMD160 4afdc4d2075bbc36b9c49e85618306cf0137e771 SHA1 c261e925d768138cd2b38cf75edae27476ab089a SHA256 f3da0a22522d50207fcc751f0560bae1a75a570fdb99818dc5a9b6642af10277 -EBUILD jpeg-7.ebuild 1175 RMD160 f8219b33bcb33728ddabc74ccccf22427279d67c SHA1 1c53403420dec6e3ce8240041190d43316c83137 SHA256 1804856be0fcb1f60274b71fec286a04ad7e614dca640ac7a01399926cb088b8 -MISC ChangeLog 8822 RMD160 235a0c3a248d1437b37ac5bf8c7a39071b8bc051 SHA1 e3dfddaa3ca7434e3090987b3dafca697c38f7c1 SHA256 0707a7e2c28f827b57e49d36fae845e041afe6087555acf3b428a99cff3a69cf +EBUILD jpeg-7.ebuild 1213 RMD160 95482caae9f410c62c2489ac2003aebd2caa1e82 SHA1 59f69b6ebde50ea30ad73946e67b2eff6947480e SHA256 fda04043ed7244ac3b86a4c9eff101e6ea7a9deb73960679941fca30f4026107 +MISC ChangeLog 8987 RMD160 00ab452b63cfece428a8cad66a246b87d45556b1 SHA1 8842def140bbf7dacc77f351169403eb4df71257 SHA256 c4cdd2bb328669c4fd6d00d2f47a87ba4e89de38ffeee453066be295826e83af MISC metadata.xml 224 RMD160 3a7dcbadaed2b7ed12e11152fe1fe2de0193fc29 SHA1 fa5078079869e963f3f51f80124cecf8ea6c1b67 SHA256 806818bba7ae36d62f16c1fe548a1eb2a360caf2d984aa8f47bba7b91ff73434 diff --git a/media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch b/media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch new file mode 100644 index 000000000000..95c207b09d36 --- /dev/null +++ b/media-libs/jpeg/files/jpeg-7-maxmem_sysconf.patch @@ -0,0 +1,50 @@ +# Make a reasonable guess about memory limits using sysconf(). +# includes 5% slop factor as suggested in documentation. + +diff -ur jpeg-7.orig/jmemansi.c jpeg-7/jmemansi.c +--- jpeg-7.orig/jmemansi.c 1996-01-06 19:29:46.000000000 +0200 ++++ jpeg-7/jmemansi.c 2009-08-22 14:47:35.000000000 +0300 +@@ -12,6 +12,15 @@ + * is shoved onto the user. + */ + ++#include <unistd.h> ++ ++#ifdef __FreeBSD__ ++# include <sys/types.h> ++# include <sys/sysctl.h> ++# include <sys/vmmeter.h> ++# include <vm/vm_param.h> ++#endif ++ + #define JPEG_INTERNALS + #include "jinclude.h" + #include "jpeglib.h" +@@ -157,7 +166,26 @@ + GLOBAL(long) + jpeg_mem_init (j_common_ptr cinfo) + { +- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ ++#ifdef _SC_AVPHYS_PAGES ++ long phys_size; ++ ++ if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1) ++ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ ++ if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0) ++ return DEFAULT_MAX_MEM; ++ return (long) (phys_size * 0.95); ++#elif defined(HAVE_SYSCTL) && defined(HW_PHYSMEM) ++ /* This works on *bsd and darwin. */ ++ unsigned int physmem; ++ size_t len = sizeof physmem; ++ static int mib[2] = { CTL_HW, HW_PHYSMEM }; ++ ++ if (sysctl (mib, ARRAY_SIZE (mib), &physmem, &len, NULL, 0) == 0 ++ && len == sizeof (physmem)) ++ return (long) (physmem * 0.95); ++#endif ++ ++ return DEFAULT_MAX_MEM; + } + + GLOBAL(void) diff --git a/media-libs/jpeg/jpeg-7.ebuild b/media-libs/jpeg/jpeg-7.ebuild index 3331ff5e0849..f5f904c4078f 100644 --- a/media-libs/jpeg/jpeg-7.ebuild +++ b/media-libs/jpeg/jpeg-7.ebuild @@ -1,14 +1,14 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg/jpeg-7.ebuild,v 1.2 2009/08/22 10:31:33 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg/jpeg-7.ebuild,v 1.3 2009/08/22 12:16:57 ssuominen Exp $ EAPI=2 -inherit libtool toolchain-funcs +inherit eutils libtool toolchain-funcs DESCRIPTION="Library to load, handle and manipulate images in the JPEG format" HOMEPAGE="http://www.ijg.org/" SRC_URI="http://www.ijg.org/files/${PN}src.v${PV}.tar.gz - http://dev.gentoo.org/~ssuominen/${P}-extra.tar.bz2" + mirror://gentoo/${P}-extra.tar.bz2" LICENSE="as-is" SLOT="0" @@ -20,6 +20,7 @@ DEPEND="${RDEPEND} sys-devel/libtool" src_prepare() { + epatch "${FILESDIR}"/${P}-maxmem_sysconf.patch elibtoolize } |