diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-09-29 23:14:38 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-09-29 23:14:38 +0000 |
commit | d7bc962023d3c19e7560a2f5676a441f98356306 (patch) | |
tree | bacc244def3d414d2a17add65b6ac749ea7f0e7a /dev-cpp | |
parent | Use correct variable name. (diff) | |
download | gentoo-2-d7bc962023d3c19e7560a2f5676a441f98356306.tar.gz gentoo-2-d7bc962023d3c19e7560a2f5676a441f98356306.tar.bz2 gentoo-2-d7bc962023d3c19e7560a2f5676a441f98356306.zip |
Initial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>.
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'dev-cpp')
-rw-r--r-- | dev-cpp/threadpool/ChangeLog | 10 | ||||
-rw-r--r-- | dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch | 22 | ||||
-rw-r--r-- | dev-cpp/threadpool/metadata.xml | 9 | ||||
-rw-r--r-- | dev-cpp/threadpool/threadpool-0.2.5.ebuild | 47 |
4 files changed, 88 insertions, 0 deletions
diff --git a/dev-cpp/threadpool/ChangeLog b/dev-cpp/threadpool/ChangeLog new file mode 100644 index 000000000000..aecfb23f9833 --- /dev/null +++ b/dev-cpp/threadpool/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-cpp/threadpool +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-cpp/threadpool/ChangeLog,v 1.1 2012/09/29 23:14:37 robbat2 Exp $ + +*threadpool-0.2.5 (29 Sep 2012) + + 29 Sep 2012; Robin H. Johnson <robbat2@gentoo.org> + +files/threadpool-0.2.5-memleak.patch, +metadata.xml, + +threadpool-0.2.5.ebuild: + Initial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>. diff --git a/dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch b/dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch new file mode 100644 index 000000000000..886ce5836012 --- /dev/null +++ b/dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch @@ -0,0 +1,22 @@ +Fix memleak due circular references blocking garbage collection. + +http://www.cplusplus.com/forum/general/56971/ provides a testcase for a memory +leak with the threadpool due to shared_ptr usage. + +I really needed threadpool to work for me, so I traced & fixed it as best as +possible. When the threadpool is being destroyed, your threads should have +terminated already. Do so deliberately if not done yet, so that they free the +memory. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +--- threadpool-0_2_5-src/threadpool/boost/threadpool/detail/pool_core.hpp 2012-09-27 22:33:21.098626892 -0700 ++++ threadpool-0_2_5-src/threadpool/boost/threadpool/detail/pool_core.hpp 2012-09-27 22:51:12.291997839 -0700 +@@ -150,6 +150,7 @@ + /// Destructor. + ~pool_core() + { ++ terminate_all_workers(true); + } + + /*! Gets the size controller which manages the number of threads in the pool. diff --git a/dev-cpp/threadpool/metadata.xml b/dev-cpp/threadpool/metadata.xml new file mode 100644 index 000000000000..3da7d2b1eec1 --- /dev/null +++ b/dev-cpp/threadpool/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>robbat2@gentoo.org</email> +<name>Robin H. Johnson</name> +</maintainer> +</pkgmetadata> + diff --git a/dev-cpp/threadpool/threadpool-0.2.5.ebuild b/dev-cpp/threadpool/threadpool-0.2.5.ebuild new file mode 100644 index 000000000000..db6c2f34b7f6 --- /dev/null +++ b/dev-cpp/threadpool/threadpool-0.2.5.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-cpp/threadpool/threadpool-0.2.5.ebuild,v 1.1 2012/09/29 23:14:37 robbat2 Exp $ + +EAPI=4 + +inherit base + +DESCRIPTION="A cross-platform C++ thread pool library (built on top of Boost)" +HOMEPAGE="http://threadpool.sourceforge.net/" +MY_PV=${PV//./_} +MY_P=${PN}-${MY_PV} +SRC_URI_BASE="mirror://sourceforge/threadpool/threadpool/${PV}%20%28Stable%29" +SRC_URI="${SRC_URI_BASE}/${MY_P}-src.zip + doc? ( ${SRC_URI_BASE}/${MY_P}-doc.zip )" + +LICENSE="Boost-1.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +DEPEND="" +RDEPEND="dev-libs/boost" + +S="${WORKDIR}/${MY_P}-src/${PN}" + +PATCHES=( "${FILESDIR}/${P}-memleak.patch" ) + +src_prepare() { + base_src_prepare +} + +src_compile() { + # Do nothing + # The makefile just builds the documentation again + # Not even any install targets + : +} + +src_install() { + insinto /usr/include/ + doins -r boost + dodoc README TODO CHANGE_LOG + if use doc; then + dohtml -r "${WORKDIR}"/"${MY_P}"-doc/ + fi +} |