From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D43BA138332 for ; Thu, 29 Sep 2016 17:20:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 258B4E081C; Thu, 29 Sep 2016 17:20:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED31AE081C for ; Thu, 29 Sep 2016 17:20:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 67EBB33FECD for ; Thu, 29 Sep 2016 17:20:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AE6B5248B for ; Thu, 29 Sep 2016 17:20:43 +0000 (UTC) From: "Andrew Savchenko" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Savchenko" Message-ID: <1475169638.ff277b921fc3cdb1a531522e8424d29f3d243490.bircoph@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/duma/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/duma/duma-2.5.15-r2.ebuild X-VCS-Directories: dev-util/duma/ X-VCS-Committer: bircoph X-VCS-Committer-Name: Andrew Savchenko X-VCS-Revision: ff277b921fc3cdb1a531522e8424d29f3d243490 X-VCS-Branch: master Date: Thu, 29 Sep 2016 17:20:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 145f637d-4c0c-4577-b1b9-6e9faab354cd X-Archives-Hash: 25065e24fd4b59edc1201d8463a7f6c8 commit: ff277b921fc3cdb1a531522e8424d29f3d243490 Author: Andrew Savchenko gentoo org> AuthorDate: Thu Sep 29 17:12:56 2016 +0000 Commit: Andrew Savchenko gentoo org> CommitDate: Thu Sep 29 17:20:38 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff277b92 dev-util/duma: bump to EAPI 6 Package-Manager: portage-2.3.1 Signed-off-by: Andrew Savchenko gentoo.org> dev-util/duma/duma-2.5.15-r2.ebuild | 93 +++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/dev-util/duma/duma-2.5.15-r2.ebuild b/dev-util/duma/duma-2.5.15-r2.ebuild new file mode 100644 index 00000000..f789883 --- /dev/null +++ b/dev-util/duma/duma-2.5.15-r2.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit toolchain-funcs versionator + +MY_P=${PN}_$(replace_all_version_separators '_') + +DESCRIPTION="DUMA (Detect Unintended Memory Access) is a memory debugging library" +HOMEPAGE="http://duma.sourceforge.net" +SRC_URI="mirror://sourceforge/duma/${MY_P}.tar.gz + mirror://gentoo/${P}-GNUmakefile.patch.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${WORKDIR}"/${P}-GNUmakefile.patch +) + +src_configure() { + # other flags will break duma + export CFLAGS="-O0 -Wall -Wextra -U_FORTIFY_SOURCE" + tc-export AR CC CXX LD RANLIB + + case "${CHOST}" in + *-linux-gnu) + OS=linux;; + *-solaris*) + OS=solaris;; + *-darwin*) + OS=osx;; + *-freebsd*) + OS=freebsd;; + *-netbsd*) + OS=netbsd;; + *-cygwin*) + OS=cygwin;; + **-irix**) + OS=irix;; + esac + export OS="${OS}" + elog "Detected OS is: ${OS}" + + if use amd64 && ! [ -n "${DUMA_ALIGNMENT}" ]; then + export DUMA_ALIGNMENT=16 + elog "Exported DUMA_ALIGNMENT=${DUMA_ALIGNMENT} for x86_64," + fi + +} + +src_compile() { + # The below must be run first if distcc is enabled, otherwise + # the real build breaks on parallel makes. + emake reconfig + emake +} + +src_test() { + emake test + + elog "Please, see the output above to verify all tests have passed." + elog "Both static and dynamic confidence tests should say PASSED." +} + +src_install(){ + emake prefix="${D}/usr" libdir="${D}/usr/$(get_libdir)" \ + docdir="${D}/usr/share/doc/${PF}" install + + sed -i "s|LD_PRELOAD=./libduma|LD_PRELOAD=libduma|" "${D}"/usr/bin/duma \ + || die "sed failed" + + dodoc CHANGELOG TODO GNUmakefile + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins example[1-6].cpp example_makes/ex6/Makefile + fi +} + +pkg_postinst() { + elog "See the GNUmakefile which will be also installed at" + elog "/usr/share/doc/${PF} for more options. You can now export" + elog "varibles to the build system easily, e.g.:" + elog "# export CPPFLAGS=\"-DFLAG\" (or by using append-cppflags)" + elog "# export DUMA_ALIGNMENT=${DUMA_ALIGNMENT} (Default is 16 for x86_64)" + elog "See more information about DUMA_ALIGNMENT from Readme.txt" +}