mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-09 06:37:10 -08:00
Move {dev-util → dev-debug}/duma
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DIST duma-2.5.15-GNUmakefile.patch.bz2 4618 BLAKE2B 506127ce1f8f3d01d0443ab1240c585aa734bf3756ae632ccec8ff88f33fc0ffc5113705d5c3c31c14bf52a2cf3c82132669c2c14d24f0c6df17b8e802c8ef40 SHA512 6d83294897a60c6d0ebac388c8f791adc6a199b2c9838497bcfff39502262014c8437a331e08e3526568d3ef755a7dfdc2557771bdae89c58cd5f714eae70df2
|
||||
DIST duma_2_5_15.tar.gz 240479 BLAKE2B c79f47ba418e22a65a2ad2d4cbff796c2a620ec5f36743d543fe1260e61ec700c648033ac3c91e71be3f3e1129a1c12e9f83a91277244962cfbd494d9588d681 SHA512 0e2abdb08cfbaf9fd0a6be348c831a83ac4ee86d2297dcd1c4d625ddb4b2c1c73eef05e2b895e291d5b8076b1baea559c89d475f30e409210df4ab69b71b6345
|
||||
@@ -0,0 +1,88 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit flag-o-matic 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
|
||||
"${FILESDIR}"/${P}-gcc6.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
# other flags will break duma
|
||||
export CFLAGS="-O0 -Wall -Wextra -U_FORTIFY_SOURCE"
|
||||
tc-export AR CC CXX LD RANLIB
|
||||
|
||||
# bug #789708
|
||||
append-cxxflags -std=c++14
|
||||
|
||||
case "${CHOST}" in
|
||||
*-linux-gnu)
|
||||
OS=linux;;
|
||||
*-solaris*)
|
||||
OS=solaris;;
|
||||
*-darwin*)
|
||||
OS=osx;;
|
||||
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
|
||||
docinto examples
|
||||
dodoc 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"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--- duma_2_5_15/dumapp.cpp.old 2016-09-21 19:28:01.286332961 -0400
|
||||
+++ duma_2_5_15/dumapp.cpp 2016-09-21 19:28:06.722907238 -0400
|
||||
@@ -190,7 +190,9 @@
|
||||
* (11) = (a) ; ASW
|
||||
*/
|
||||
void * DUMA_CDECL operator new( DUMA_SIZE_T size )
|
||||
+#if __cplusplus < 201103L
|
||||
throw(std::bad_alloc)
|
||||
+#endif
|
||||
{
|
||||
return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_UK);
|
||||
}
|
||||
@@ -254,7 +256,9 @@
|
||||
* (21) = (a) ; AAW
|
||||
*/
|
||||
void * DUMA_CDECL operator new[]( DUMA_SIZE_T size )
|
||||
+#if __cplusplus < 201103L
|
||||
throw(std::bad_alloc)
|
||||
+#endif
|
||||
{
|
||||
return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_UK);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>bircoph@gentoo.org</email>
|
||||
<name>Andrew Savchenko</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
DUMA is an open-source library (under GNU General Public License) to
|
||||
detect buffer overruns and under-runs in C and C++ programs. This
|
||||
library is a fork of Buce Perens Electric Fence library and adds
|
||||
some new features to it.</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="sourceforge">duma</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user