summaryrefslogtreecommitdiff
path: root/dev-libs/dmalloc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/dmalloc
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/dmalloc')
-rw-r--r--dev-libs/dmalloc/Manifest11
-rw-r--r--dev-libs/dmalloc/dmalloc-5.5.2-r4.ebuild76
-rw-r--r--dev-libs/dmalloc/dmalloc-5.5.2-r6.ebuild85
-rw-r--r--dev-libs/dmalloc/files/dmalloc-5.5.2-Makefile.in.patch343
-rw-r--r--dev-libs/dmalloc/files/dmalloc-5.5.2-ar.patch11
-rw-r--r--dev-libs/dmalloc/files/dmalloc-5.5.2-cxx.patch19
-rw-r--r--dev-libs/dmalloc/files/dmalloc-5.5.2-string-macros.patch18
-rw-r--r--dev-libs/dmalloc/files/dmalloc-5.5.2-threads.patch11
-rw-r--r--dev-libs/dmalloc/metadata.xml8
9 files changed, 582 insertions, 0 deletions
diff --git a/dev-libs/dmalloc/Manifest b/dev-libs/dmalloc/Manifest
new file mode 100644
index 000000000000..3db3d47c417c
--- /dev/null
+++ b/dev-libs/dmalloc/Manifest
@@ -0,0 +1,11 @@
+AUX dmalloc-5.5.2-Makefile.in.patch 13855 SHA256 2f7c44a1f8e48b90c255a6d72748d629a30aebcdf7adfedc50f1067a65dfa7fc SHA512 6a8bc9fabafc22b390696df5573d94a71080215627a1c67e45b5b8805fb240165c0961bd9175d6f7b2e5914aecf9dd680de14f744b099a750699f1ca391d86d7 WHIRLPOOL e7f5ae37c2b55088aa1eb1affd660a55958e1fd260043f38750eca9a8045a5822b0eb3a83ead5ce554a478b885f8ac3bc1336926a6d72b34c341b9a3dcbfa63e
+AUX dmalloc-5.5.2-ar.patch 390 SHA256 151f5402ac69f688b93c921c09218f2da14e9e012092efc73addddcf69b0c3d7 SHA512 79c1a2b4a0ffa43da2e3e49bb10ce0defe58a33f881bcb356ac72c386ad870903bb12c37ddb0e3fcd30ee60d74e8ddae69eb4f5eec1d080008cba3a1a40f9626 WHIRLPOOL d97c6df359c345a33b0d01a51e3b4eade62d39a901a70f86226e9ffe663b607dbb37c79beb7ac618fcf75d6e55e1b2a1553f33e7c05d9bb0124875a56d5a5ba3
+AUX dmalloc-5.5.2-cxx.patch 546 SHA256 f9aaa8905f4961667f19dcd429993ae2712004e1bc8413cd284f5edc76c7a13a SHA512 370ff73c4af16d7b4cb5e15a88f3cafcc16494df7df50c4494b1e34ed687f1385b774431cc94a9ba75ef96f2828f75501ee2d0addc9d3e34d4f718ac94ae5f6d WHIRLPOOL c04ae4f9896554422419b27f07408378d531a135120b18376f6f69bb3798d2c88753681ce6190f30c91c8f7b875502e53ece056dcbb3b83de03472690b7ccb5d
+AUX dmalloc-5.5.2-string-macros.patch 367 SHA256 b249ff54dc11c22667d006b3f36bd757f07826641cbfb87efba9036c27e3b169 SHA512 61d0015e7997ecad97e722a1b308ec90e996e9d53b9f475c911f1d9eb929d8007881e52699e9f3427c5cecb9f0b2d202d12a7d607d23434913afbef455f08617 WHIRLPOOL adfe6df6d75a7667f6746fad8b62669c40da8fe4e35a5c089de45947e6663411d5ce6c77023774c4f01c8418d8e1f1796bbaff69165f18ffad934e6c1e704508
+AUX dmalloc-5.5.2-threads.patch 165 SHA256 07db111964d4ad6ffd6d05764ebfd887023128098fa0946be61292a0070c2237 SHA512 b561c715c19604128c046b36bfe09794922176ce1cd12947da277631a410bbc19c5a1f7e998f0b61d7564e3b7516bee0fb4deddb13e036bb9e667f3502e56d0e WHIRLPOOL 5499a29d7b7b0cb6711418d14db843c8a085d5779041633d480bdc8694340e52c9b0377bfd588aa808dda6b13e99b4da6e461b635a4a8eb29664db24470a2d76
+DIST dmalloc-5.5.2.tgz 666608 SHA256 d3be5c6eec24950cb3bd67dbfbcdf036f1278fae5fd78655ef8cdf9e911e428a SHA512 96bb94aeb2bc3220f652b5294bdf8592b984cb2a53e5f02b2b8d52450c3396d18651f334644cdfff9c85a8c0d0cedc7f6a18b9d70497b2c6b5f85dbd1e827b93 WHIRLPOOL 4427dfb595b82bf4b7a3edd6a0a61da54fd7b7abf84a238dee3cef6ab3e0b9a27a34c7219ae938155da9908762c217cca52e9ac6710543bb37ca8dcf72749a73
+EBUILD dmalloc-5.5.2-r4.ebuild 1772 SHA256 c4a5713697e29259d906209c8ca083824f0597b605cd4a3cbba6a2435878c6da SHA512 fd498387c1f74667570d46ffa7dfd8cbb59ef004054c9296b889cad0a273e5d76825ec6ee5cf087015f1f6ca95edf62c44c65739225da425778d85325e4a4ac6 WHIRLPOOL 3bfdccf804ba4f1fa4edb4059762e59d48c2a89b644f00dc2f3cc0a149562aab5af6ff1c27e59e376c78a676d8b7869008ead6bb2ebe5e7952cc2c4bdb6073bc
+EBUILD dmalloc-5.5.2-r6.ebuild 1928 SHA256 2a02d3e4a5172cf095e1e855d83e8b4213352bc1f6637f4d9bba9583f284d6e2 SHA512 d9a5f066f82d21eae915fc33b2aa44edf559d4f2559e8ef7f46f882ed9f9cb75855f77196fa578248ed9456c0ae57771274c60899ff2a9f3947b428cbb4c9a70 WHIRLPOOL 7f22a84c509a7d0e9ca0bfe2b42bb2ce81a0df09b9125fa055487092e2b20d281a7a333da6926a8fcefc9f54e425aab7059ec81fde10c4d991cc0237062912f3
+MISC ChangeLog 2427 SHA256 fe2eebea90b5c22608cf25ad780a188c8f6d54d203d2354e8bebc1954eb9684b SHA512 73f33fddfe3996bddf367694ba278c71d058ed3e4f2199a0e88252345e18112902c9655bee0d5d9673e3eee98fdda3db3747a9fb1448e840c5edbbe04e4509ca WHIRLPOOL 9d35af4904d6e779914a526007398e0a1f83cbfc9d3512c2b8ffa10d61b3d8660f83a38a91fed0c19a437ab69a9887002cd97288af9cb743dff1efce9993b3b3
+MISC ChangeLog-2015 10492 SHA256 7062ddbd5c0901c306f892f45c3d9b210656689a1a9f88e9458f1426ec1d1579 SHA512 d407116ee3654fe01893529b9548db0859dc0f56f5b06422a60dadb9f63b0c656f6fcea000bf0b19fbb0fb8ffbdcf256d490eb6b684a04bebc1a1903b4920da0 WHIRLPOOL 78174b793ee7f44b9d52d9bbcdbcfe1c742e46b6bbab78c8d0c9a980f0148ec09da4146ce9f8607f020e52cf852d1716e6dc903853aeab22fab4b6ffc3088bef
+MISC metadata.xml 244 SHA256 a65bfec176330796e1eeb3bb589b78ff60a123b947537decd4705ea71ca4e906 SHA512 1da71f4fae0251c97a8fcfa1e13b0a3f8b95a856fa919ebd30bf4f2f1b8fa900841db09ebc2a0ae9fe0d91f786ac40b63290382668412fcb05bca15b0746f1db WHIRLPOOL 1164de6a99d8931ca3ae60cbb397be80b802eb473943ef777dbe8473d8d665a5f93d8b99175709bf09d8af856b3ea7aaf7c95a87aad37e48b85c06e618431a1f
diff --git a/dev-libs/dmalloc/dmalloc-5.5.2-r4.ebuild b/dev-libs/dmalloc/dmalloc-5.5.2-r4.ebuild
new file mode 100644
index 000000000000..cfc84a7048d0
--- /dev/null
+++ b/dev-libs/dmalloc/dmalloc-5.5.2-r4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools eutils multilib
+
+DESCRIPTION="A Debug Malloc Library"
+HOMEPAGE="http://dmalloc.com"
+SRC_URI="http://dmalloc.com/releases/${P}.tgz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs threads"
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+DOCS=( NEWS README docs/NOTES docs/TODO )
+
+src_prepare() {
+ # - Build objects twice, once -fPIC for shared.
+ # - Use DESTDIR.
+ # - Fix SONAME and NEEDED.
+ epatch "${FILESDIR}"/${P}-Makefile.in.patch
+ # - Broken test, always returns false.
+ epatch "${FILESDIR}"/${P}-cxx.patch
+ # - Add threads support.
+ use threads && epatch "${FILESDIR}"/${P}-threads.patch
+ # Respect CFLAGS/LDFLAGS. #337429
+ sed -i Makefile.in \
+ -e '/libdmalloc/ s:$(CC):& $(CFLAGS) $(LDFLAGS):g' \
+ || die "sed Makefile.in"
+ # - Run autoconf for -cxx.patch.
+ eautoconf
+}
+
+src_configure() {
+ econf --enable-cxx --enable-shlib $(use_enable threads)
+}
+
+src_compile() {
+ default
+
+ cd docs
+ makeinfo dmalloc.texi || die
+}
+
+src_test() {
+ emake heavy
+}
+
+src_install() {
+ default
+
+ newdoc ChangeLog.1 ChangeLog
+ insinto /usr/share/doc/${PF}
+ doins docs/dmalloc.pdf
+ dohtml RELEASE.html docs/dmalloc.html
+ doinfo docs/dmalloc.info
+
+ # add missing symlinks, lazy
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV%%.*}
+
+ for lib in cxx th thcxx; do
+ dosym lib${PN}${lib}.so.${PV} /usr/$(get_libdir)/lib${PN}${lib}.so
+ dosym lib${PN}${lib}.so.${PV} \
+ /usr/$(get_libdir)/lib${PN}${lib}.so.${PV%%.*}
+ done
+
+ if ! use static-libs; then
+ rm "${D}"/usr/$(get_libdir)/lib${PN}*.a || die
+ fi
+}
diff --git a/dev-libs/dmalloc/dmalloc-5.5.2-r6.ebuild b/dev-libs/dmalloc/dmalloc-5.5.2-r6.ebuild
new file mode 100644
index 000000000000..36f7026dcf31
--- /dev/null
+++ b/dev-libs/dmalloc/dmalloc-5.5.2-r6.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils multilib toolchain-funcs
+
+DESCRIPTION="A Debug Malloc Library"
+HOMEPAGE="http://dmalloc.com"
+SRC_URI="http://dmalloc.com/releases/${P}.tgz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="static-libs threads"
+
+DEPEND="sys-apps/texinfo"
+RDEPEND=""
+
+DOCS=( NEWS README docs/NOTES docs/TODO )
+
+src_prepare() {
+ # - Build objects twice, once -fPIC for shared.
+ # - Use DESTDIR.
+ # - Fix SONAME and NEEDED.
+ epatch "${FILESDIR}"/${P}-Makefile.in.patch
+
+ # - Broken test, always returns false.
+ epatch "${FILESDIR}"/${P}-cxx.patch
+ epatch "${FILESDIR}"/${P}-ar.patch
+
+ # - Add threads support.
+ use threads && epatch "${FILESDIR}"/${P}-threads.patch
+
+ # strdup() strndup() macros
+ epatch "${FILESDIR}"/${P}-string-macros.patch
+
+ # Respect CFLAGS/LDFLAGS. #337429
+ sed -i \
+ -e '/libdmalloc/ s:$(CC):& $(CFLAGS) $(LDFLAGS):g' \
+ -e 's|ar cr|$(AR) cr|g' \
+ Makefile.in || die
+
+ # Run autoconf for -cxx.patch.
+ eautoconf
+}
+
+src_configure() {
+ tc-export AR
+ econf --enable-cxx --enable-shlib $(use_enable threads)
+}
+
+src_compile() {
+ default
+
+ cd docs
+ makeinfo dmalloc.texi || die
+}
+
+src_test() {
+ emake heavy
+}
+
+src_install() {
+ default
+
+ newdoc ChangeLog.1 ChangeLog
+ insinto /usr/share/doc/${PF}
+ doins docs/dmalloc.pdf
+ dohtml RELEASE.html docs/dmalloc.html
+ doinfo docs/dmalloc.info
+
+ # add missing symlinks, lazy
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV%%.*}
+
+ for lib in cxx th thcxx; do
+ dosym lib${PN}${lib}.so.${PV} /usr/$(get_libdir)/lib${PN}${lib}.so
+ dosym lib${PN}${lib}.so.${PV} \
+ /usr/$(get_libdir)/lib${PN}${lib}.so.${PV%%.*}
+ done
+
+ if ! use static-libs; then
+ rm "${D}"/usr/$(get_libdir)/lib${PN}*.a || die
+ fi
+}
diff --git a/dev-libs/dmalloc/files/dmalloc-5.5.2-Makefile.in.patch b/dev-libs/dmalloc/files/dmalloc-5.5.2-Makefile.in.patch
new file mode 100644
index 000000000000..92b232eb58e9
--- /dev/null
+++ b/dev-libs/dmalloc/files/dmalloc-5.5.2-Makefile.in.patch
@@ -0,0 +1,343 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -41,7 +41,7 @@
+
+ # thread version of the library
+ LIB_TH = lib$(MODULE)th.a
+-LIB_TH_SL = lib$(MODULE)th.@shlibext@
++LIB_TH_SL = lib$(MODULE)th.@shlibext@.5.5.2
+ @TH_ON@BUILD_ALL_1 = threads
+ @TH_ON@INSTALL_LIB_1 = installth
+ @SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL)
+@@ -50,8 +50,8 @@
+ @TH_ON@@SL_ON@INSTALL_LIB_2 = installthsl
+
+ # C++ version of the library
+-LIB_CXX = lib$(MODULE)xx.a
+-LIB_CXX_SL = lib$(MODULE)xx.@shlibext@
++LIB_CXX = lib$(MODULE)cxx.a
++LIB_CXX_SL = lib$(MODULE)cxx.@shlibext@.5.5.2
+ @CXX_ON@BUILD_ALL_3 = $(LIB_CXX)
+ @CXX_ON@INSTALL_LIB_3 = installcxx
+ @SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL)
+@@ -61,7 +61,7 @@
+
+ # threads + C++
+ LIB_TH_CXX = lib$(MODULE)thcxx.a
+-LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@
++LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.5.5.2
+ @TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX)
+ @TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx
+ @TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX)
+@@ -76,7 +76,7 @@
+ @CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl
+
+ # shared versions of the libraries
+-LIB_SL = lib$(MODULE).@shlibext@
++LIB_SL = lib$(MODULE).@shlibext@.5.5.2
+ @SL_ON@BUILD_ALL_7 = $(LIB_SL)
+ @SL_ON@INSTALL_LIB_7 = installsl
+ @SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL)
+@@ -145,9 +145,13 @@
+
+ HFLS = dmalloc.h
+ OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o
++OBJS_SL = arg_check_sl.o compat_sl.o dmalloc_rand_sl.o dmalloc_tab_sl.o env_sl.o heap_sl.o
+ NORMAL_OBJS = chunk.o error.o malloc.o
++NORMAL_OBJS_SL = chunk_sl.o error_sl.o malloc_sl.o
+ THREAD_OBJS = chunk_th.o error_th.o malloc_th.o
++THREAD_OBJS_SL = chunk_th_sl.o error_th_sl.o malloc_th_sl.o
+ CXX_OBJS = dmallocc.o
++CXX_OBJS_SL = dmallocc_sl.o
+
+ CFLAGS = $(CCFLAGS)
+ TEST = $(MODULE)_t
+@@ -160,9 +164,9 @@
+
+ clean :
+ rm -f $(A_OUT) core *.o *.t
+- rm -f $(LIBRARY) $(LIB_TH) $(LIB_CXX) $(LIB_TH_CXX) $(TEST) $(TEST_FC)
+- rm -f $(LIB_TH_SL) $(LIB_CXX_SL) $(LIB_TH_CXX_SL) $(LIB_SL)
++ rm -f $(TEST) $(TEST_FC)
+ rm -f $(UTIL) dmalloc.h
++ rm -f lib$(MODULE)*.*
+
+ realclean : clean
+
+@@ -174,65 +178,65 @@
+ # rm -f configure
+
+ installdirs :
+- $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir)
+
+ installincs : $(HFLS)
+- $(srcdir)/mkinstalldirs $(includedir)
+- $(INSTALL_DATA) $(HFLS) $(includedir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
++ $(INSTALL_DATA) $(HFLS) $(DESTDIR)$(includedir)
+
+ installthsl : $(LIB_TH_SL)
+- $(srcdir)/mkinstalldirs $(libdir)
+- $(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
++ $(INSTALL) $(LIB_TH_SL) $(DESTDIR)$(shlibdir)
+
+ installth : $(INSTALL_THREADS)
+- $(srcdir)/mkinstalldirs $(libdir)
+- $(INSTALL_PROGRAM) $(LIB_TH) $(libdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
++ $(INSTALL) $(LIB_TH) $(DESTDIR)$(libdir)
+ @CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
+ @SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library"
+
+ installthcxxsl : $(LIB_TH_CXX_SL)
+- $(srcdir)/mkinstalldirs $(shlibdir)
+- $(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
++ $(INSTALL) $(LIB_TH_CXX_SL) $(DESTDIR)$(libdir)
+
+ installthcxx : $(INSTALL_TH_CXX)
+- $(srcdir)/mkinstalldirs $(libdir)
+- $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
++ $(INSTALL) $(LIB_TH_CXX) $(DESTDIR)$(libdir)
+ @SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library"
+
+ installcxxsl : $(LIB_CXX_SL)
+- $(srcdir)/mkinstalldirs $(libdir)
+- $(INSTALL_PROGRAM) $(LIB_CXX_SL) $(libdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
++ $(INSTALL) $(LIB_CXX_SL) $(DESTDIR)$(shlibdir)
+
+ installcxx : $(INSTALL_CXX)
+- $(srcdir)/mkinstalldirs $(libdir)
+- $(INSTALL_PROGRAM) $(LIB_CXX) $(libdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
++ $(INSTALL) $(LIB_CXX) $(DESTDIR)$(libdir)
+ @TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library"
+ @SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
+
+ installsl : $(LIB_SL)
+- $(srcdir)/mkinstalldirs $(shlibdir)
+- $(INSTALL_PROGRAM) $(LIB_SL) $(shlibdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(shlibdir)
++ $(INSTALL) $(LIB_SL) $(DESTDIR)$(shlibdir)
+ @CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library"
+ @TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library"
+
+ installlib : $(INSTALL_LIB)
+- $(srcdir)/mkinstalldirs $(libdir)
+- $(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
+- @RANLIB@ $(libdir)/$(LIBRARY)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
++ $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)
++ @RANLIB@ $(DESTDIR)$(libdir)/$(LIBRARY)
+ @SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
+ @CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library"
+ @TH_OFF@ @echo "Enter 'make installth' to install thread library"
+
+ installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \
+ $(srcdir)/docs/$(PDFFILE)
+- $(srcdir)/mkinstalldirs $(docdir)
+- $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir)
+- $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir)
+- $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir)
++ $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(DESTDIR)$(docdir)
++ $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(DESTDIR)$(docdir)
++ $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(DESTDIR)$(docdir)
+
+ install : installincs installlib $(UTIL)
+- $(srcdir)/mkinstalldirs $(bindir)
+- $(INSTALL_PROGRAM) $(UTIL) $(bindir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
++ $(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)$(bindir)
+ @echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)"
+
+ dmalloc.h.2 : $(srcdir)/configure
+@@ -255,10 +259,8 @@
+ # NOTE: you may have to edit the configure.ac script to get this to
+ # work on your operating system. Please send feedback to the author
+ # via: http://256.com/gray/email.html
+-$(LIB_SL) : $(LIBRARY)
+- rm -f $@ $@.t
+- @shlinkargs@ $(LIBRARY) $(OBJS) $(NORMAL_OBJS)
+- mv $@.t $@
++$(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL)
++ $(CC) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL)
+
+ $(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
+ ar cr $@ $?
+@@ -268,32 +270,26 @@
+ ar cr $@ $?
+ @RANLIB@ $@
+
+-$(LIB_TH_SL) : $(LIB_TH)
+- rm -f $@ $@.t
+- @shlinkargs@ $(LIB_TH) $(OBJS) $(THREAD_OBJS)
+- mv $@.t $@
++$(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL)
++ $(CC) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL)
+
+ $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
+ ar cr $@ $?
+ @RANLIB@ $@
+
+-$(LIB_CXX_SL) : $(LIB_CXX)
+- rm -f $@ $@.t
+- @shlinkargs@ $(LIB_CXX) $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
+- mv $@.t $@
++$(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
++ $(CC) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL)
+
+ $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
+ ar cr $@ $?
+ @RANLIB@ $@
+
+-$(LIB_TH_CXX_SL) : $(LIB_TH_CXX)
+- rm -f $@ $@.t
+- @shlinkargs@ $(LIB_TH_CXX) $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
+- mv $@.t $@
++$(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
++ $(CC) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL)
+
+-threadssl : $(LIB_TH_SL)
++threadssl : $(LIB_TH_SL)$(ver)
+
+-threadscxxsl : $(LIB_TH_CXX_SL)
++threadscxxsl : $(LIB_TH_CXX_SL)$(ver)
+
+ threadscxx : $(BUILD_TH_CXX)
+ @SL_OFF@ @echo "Enter 'make threadscxxsl' to build the threaded C++ shared-library"
+@@ -302,7 +298,7 @@
+ @CXX_OFF@ @echo "Enter 'make threadscxx' to build the threaded C++ library"
+ @SL_OFF@ @echo "Enter 'make threadssl' to build the threaded shared library"
+
+-cxxsl : $(LIB_CXX_SL)
++cxxsl : $(LIB_CXX_SL)$(ver)
+
+ cxx : $(BUILD_CXX)
+ @SL_OFF@ @echo "Enter 'make cxxsl' to build the cxx shared library"
+@@ -371,6 +367,11 @@
+ $(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
+ -o ./$@
+
++dmallocc_sl.o : $(srcdir)/dmallocc.cc
++ rm -f $@
++ $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \
++ -o ./$@
++
+ #
+ # auto configure settings - uncomment if you are doing configure
+ # development on the library
+@@ -395,38 +396,109 @@
+
+ arg_check.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
+ dmalloc_loc.h error.h arg_check.h
++arg_check_sl.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \
++ dmalloc_loc.h error.h arg_check.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ chunk.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
+ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
+ error_val.h heap.h
++chunk_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
++ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
++ error_val.h heap.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
++compat_sl.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
+ debug_tok.h dmalloc_loc.h env.h error_val.h version.h
++dmalloc_sl.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \
++ debug_tok.h dmalloc_loc.h env.h error_val.h version.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
+ dmalloc_argv_loc.h compat.h
++dmalloc_argv_sl.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \
++ dmalloc_argv_loc.h compat.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
+ dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
++dmalloc_fc_t_sl.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \
++ dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ dmalloc_rand.o: dmalloc_rand.c dmalloc_rand.h
++dmalloc_rand_sl.o: dmalloc_rand.c dmalloc_rand.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ dmalloc_t.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
+ dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
+ error_val.h heap.h
++dmalloc_t_sl.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \
++ dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \
++ error_val.h heap.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ dmalloc_tab.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
+ dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
++dmalloc_tab_sl.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \
++ dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ env.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
+ debug_tok.h env.h error.h
++env_sl.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \
++ debug_tok.h env.h error.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ error.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
+ dmalloc_loc.h env.h error.h error_val.h version.h
++error_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
++ dmalloc_loc.h env.h error.h error_val.h version.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
+ dmalloc_loc.h error.h error_val.h heap.h
++heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
++ dmalloc_loc.h error.h error_val.h heap.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ malloc.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
+ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
+ malloc_funcs.h return.h
++malloc_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
++ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
++ malloc_funcs.h return.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
+ heap.h protect.h
++protect_sl.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \
++ heap.h protect.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ chunk_th.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
+ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
+ error_val.h heap.h
++chunk_th_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \
++ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \
++ error_val.h heap.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ error_th.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
+ dmalloc_loc.h env.h error.h error_val.h version.h
++error_th_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
++ dmalloc_loc.h env.h error.h error_val.h version.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
+ malloc_th.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
+ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
+ malloc_funcs.h return.h
++malloc_th_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \
++ debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
++ malloc_funcs.h return.h
++ rm -f $@
++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@
diff --git a/dev-libs/dmalloc/files/dmalloc-5.5.2-ar.patch b/dev-libs/dmalloc/files/dmalloc-5.5.2-ar.patch
new file mode 100644
index 000000000000..56be2fa3ef4e
--- /dev/null
+++ b/dev-libs/dmalloc/files/dmalloc-5.5.2-ar.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -131,7 +132,7 @@
+ AC_MSG_CHECKING([shared library link args])
+ AC_COMPILE_IFELSE([ int foo(int val) { return val + 1; } ],[
+ # so now we try to create an archive from the compiled .o file
+- (ar cr conftest.a conftest.o) 2>&5
++ ($AR cr conftest.a conftest.o) 2>&5
+ # see which shared-library ld commands work
+ #
+ # Darwin/Mac OS X - Terry Teague
diff --git a/dev-libs/dmalloc/files/dmalloc-5.5.2-cxx.patch b/dev-libs/dmalloc/files/dmalloc-5.5.2-cxx.patch
new file mode 100644
index 000000000000..0fa01e105c53
--- /dev/null
+++ b/dev-libs/dmalloc/files/dmalloc-5.5.2-cxx.patch
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,11 +55,12 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+
++# fixme. always returns false.
+ # see if we actually have a CXX program
+-if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then
+- AC_MSG_WARN(could not find C++ compiler $ac_cv_prog_CXX)
+- enable_cxx=no
+-fi
++#if test "$ac_cv_prog_CXX" = "" -o ! -x "$ac_cv_prog_CXX"; then
++# AC_MSG_WARN(could not find C++ compiler $ac_cv_prog_CXX)
++# enable_cxx=no
++#fi
+
+ # hopefully we have a stdc c-compiler
+ if test "$ac_cv_prog_cc_stdc" = "no" ; then
diff --git a/dev-libs/dmalloc/files/dmalloc-5.5.2-string-macros.patch b/dev-libs/dmalloc/files/dmalloc-5.5.2-string-macros.patch
new file mode 100644
index 000000000000..e3d4eb78fe52
--- /dev/null
+++ b/dev-libs/dmalloc/files/dmalloc-5.5.2-string-macros.patch
@@ -0,0 +1,18 @@
+--- a/dmalloc.h.3
++++ b/dmalloc.h.3
+@@ -405,6 +405,7 @@
+ *
+ * string -> String we are duplicating.
+ */
++#undef strdup
+ extern
+ char *strdup(const char *string);
+ #endif /* ifndef DMALLOC_STRDUP_MACRO */
+@@ -429,6 +430,7 @@
+ *
+ * len -> Length of the string to duplicate.
+ */
++#undef strndup
+ extern
+ char *strndup(const char *string, const DMALLOC_SIZE len);
+
diff --git a/dev-libs/dmalloc/files/dmalloc-5.5.2-threads.patch b/dev-libs/dmalloc/files/dmalloc-5.5.2-threads.patch
new file mode 100644
index 000000000000..c3cbd90aa9f5
--- /dev/null
+++ b/dev-libs/dmalloc/files/dmalloc-5.5.2-threads.patch
@@ -0,0 +1,11 @@
+--- a/settings.dist
++++ b/settings.dist
+@@ -409,7 +409,7 @@
+ */
+
+ #ifndef LOCK_THREADS
+-#define LOCK_THREADS 0
++#define LOCK_THREADS 1
+ #endif
+
+ #if LOCK_THREADS
diff --git a/dev-libs/dmalloc/metadata.xml b/dev-libs/dmalloc/metadata.xml
new file mode 100644
index 000000000000..f8bd6f3f34f9
--- /dev/null
+++ b/dev-libs/dmalloc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>