summaryrefslogtreecommitdiff
path: root/dev-debug/duma
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-19 20:08:27 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-19 20:08:27 +0000
commit2b2f431a0021b4787ca3c028cefb30ad81347778 (patch)
tree951e0155f53027c8fd29eaba26df4f08292668d5 /dev-debug/duma
parentd725480af7cbc67d784e5d96f973fa41e9030123 (diff)
gentoo auto-resync : 19:01:2024 - 20:08:27
Diffstat (limited to 'dev-debug/duma')
-rw-r--r--dev-debug/duma/Manifest5
-rw-r--r--dev-debug/duma/duma-2.5.15-r2.ebuild88
-rw-r--r--dev-debug/duma/files/duma-2.5.15-gcc6.patch22
-rw-r--r--dev-debug/duma/metadata.xml16
4 files changed, 131 insertions, 0 deletions
diff --git a/dev-debug/duma/Manifest b/dev-debug/duma/Manifest
new file mode 100644
index 000000000000..0a4a0ac2640a
--- /dev/null
+++ b/dev-debug/duma/Manifest
@@ -0,0 +1,5 @@
+AUX duma-2.5.15-gcc6.patch 599 BLAKE2B 7fa6c2d42b9c1191e40854aae2bfee236b0c9f9e5360f8c59a32d9b4a89c1a5351812dadce8943848478751ce49db30d5374251a759fa5af9ce28420be64ddbe SHA512 9577e34e97b6f63654a8fa5b6ad26f54733cdd758a2a96b99c2771f9593436501b09ade40e8b20ff61da033e64c635a29b4884a6e4ea3b62fa9a4c12587cf947
+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
+EBUILD duma-2.5.15-r2.ebuild 2164 BLAKE2B 350d182db6009a3ee6b84ec03a9dd9b703282e26600cbe00710dc8ac07cf1136d54d9782d1c9ae31a1ab1ae970cd7b658d9db5b9125b83564e97108d63c3bbd0 SHA512 64dfeb411018292ccfcfdf784d35db370a69e03fab1867d0dfcd8c66d0c16249e49f7dab8834e98a3c2aa825da9679adb33f8f45d7b3f61a5e72b0354d462b51
+MISC metadata.xml 601 BLAKE2B 1ae26b4db7d716fdbefebb00f48fbd98d61370ac262db216fd8ecece69fd2965dffcc65f6ce424ef017217da320789ca36a354e7a78bf07aca8dfface6af9d1b SHA512 9ce897f1db885fe7909d582d3b3dc12d8e4ca97822d2b1fdf3c062fa3f4982145d01d120832edb1bd9927f7fe66cf2282b6028497bc88dc8c975aa0531d9dd7a
diff --git a/dev-debug/duma/duma-2.5.15-r2.ebuild b/dev-debug/duma/duma-2.5.15-r2.ebuild
new file mode 100644
index 000000000000..64f1d18d48b8
--- /dev/null
+++ b/dev-debug/duma/duma-2.5.15-r2.ebuild
@@ -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"
+}
diff --git a/dev-debug/duma/files/duma-2.5.15-gcc6.patch b/dev-debug/duma/files/duma-2.5.15-gcc6.patch
new file mode 100644
index 000000000000..7cffef2b4e2c
--- /dev/null
+++ b/dev-debug/duma/files/duma-2.5.15-gcc6.patch
@@ -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);
+ }
diff --git a/dev-debug/duma/metadata.xml b/dev-debug/duma/metadata.xml
new file mode 100644
index 000000000000..92eeebf5b18b
--- /dev/null
+++ b/dev-debug/duma/metadata.xml
@@ -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>