summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/mpatrol/ChangeLog11
-rw-r--r--dev-libs/mpatrol/files/mpatrol-ldflags.diff38
-rw-r--r--dev-libs/mpatrol/mpatrol-1.4.8-r3.ebuild108
3 files changed, 155 insertions, 2 deletions
diff --git a/dev-libs/mpatrol/ChangeLog b/dev-libs/mpatrol/ChangeLog
index d958e8c1c45f..28338d8ce807 100644
--- a/dev-libs/mpatrol/ChangeLog
+++ b/dev-libs/mpatrol/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/mpatrol
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpatrol/ChangeLog,v 1.21 2009/09/23 17:25:21 patrick Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpatrol/ChangeLog,v 1.22 2010/08/15 19:52:09 hwoarang Exp $
+
+*mpatrol-1.4.8-r3 (15 Aug 2010)
+
+ 15 Aug 2010; Markos Chandras <hwoarang@gentoo.org>
+ +mpatrol-1.4.8-r3.ebuild, +files/mpatrol-ldflags.diff:
+ Apply patch from Dane Smith <smithdanea@gmail.com> to respect LDFLAGS and
+ fix multiple QA issues. Keyworded for amd64. Bug #332731
23 Sep 2009; Patrick Lauer <patrick@gentoo.org> mpatrol-1.4.8-r1.ebuild,
mpatrol-1.4.8-r2.ebuild:
diff --git a/dev-libs/mpatrol/files/mpatrol-ldflags.diff b/dev-libs/mpatrol/files/mpatrol-ldflags.diff
new file mode 100644
index 000000000000..21f5a8c603a0
--- /dev/null
+++ b/dev-libs/mpatrol/files/mpatrol-ldflags.diff
@@ -0,0 +1,38 @@
+--- Makefile 2010-08-15 01:18:10.000000000 -0400
++++ Makefile.ne 2010-08-15 01:18:22.000000000 -0400
+@@ -46,7 +46,8 @@
+ OFLAGS = ${OPT_FLAGS} -fno-inline-functions
+ SFLAGS = -fPIC
+ TFLAGS = -DMP_THREADS_SUPPORT
+-LDFLAGS = -shared
++LDFLAGS = -shared $(LDOPTS)
++LDOPTS =
+
+ MPATROL = mpatrol
+ MPALLOC = mpalloc
+@@ -192,20 +193,20 @@
+ -@ rm -f machine.s 2>&1 >/dev/null
+
+ mpatrol: mpatrol.o getopt.o version.o
+- $(CC) $(CFLAGS) $(OFLAGS) -o $@ mpatrol.o getopt.o version.o
++ $(CC) $(LDOPTS) $(OFLAGS) -o $@ mpatrol.o getopt.o version.o
+
+ mprof: mprof.o graph.o getopt.o list.o tree.o version.o
+- $(CC) $(CFLAGS) $(OFLAGS) -o $@ mprof.o graph.o getopt.o list.o tree.o version.o
++ $(CC) $(LDOPTS) $(OFLAGS) -o $@ mprof.o graph.o getopt.o list.o tree.o version.o
+
+ mptrace: mptrace.o getopt.o tree.o slots.o utils.o version.o
+ ifeq ($(GUISUP),true)
+- $(CC) $(CFLAGS) $(OFLAGS) -o $@ mptrace.o getopt.o tree.o slots.o utils.o version.o -L/usr/X11R6/lib -L/usr/X11R5/lib -L/usr/X11/lib -L/usr/X/lib -lXm -lXt -lXp -lXext -lX11
++ $(CC) $(LDOPTS) $(OFLAGS) -o $@ mptrace.o getopt.o tree.o slots.o utils.o version.o -L/usr/X11R6/lib -L/usr/X11R5/lib -L/usr/X11/lib -L/usr/X/lib -lXm -lXt -lXp -lXext -lX11
+ else
+- $(CC) $(CFLAGS) $(OFLAGS) -o $@ mptrace.o getopt.o tree.o slots.o utils.o version.o
++ $(CC) $(LDOPTS) $(OFLAGS) -o $@ mptrace.o getopt.o tree.o slots.o utils.o version.o
+ endif
+
+ mleak: mleak.o getopt.o tree.o version.o
+- $(CC) $(CFLAGS) $(OFLAGS) -o $@ mleak.o getopt.o tree.o version.o
++ $(CC) $(LDOPTS) $(OFLAGS) -o $@ mleak.o getopt.o tree.o version.o
+
+ all: $(ARCHIVE_MPATROL) $(SHARED_MPATROL) $(ARCHTS_MPATROL) $(SHARTS_MPATROL) \
+ $(ARCHIVE_MPALLOC) $(SHARED_MPALLOC) $(ARCHIVE_MPTOOLS) \
diff --git a/dev-libs/mpatrol/mpatrol-1.4.8-r3.ebuild b/dev-libs/mpatrol/mpatrol-1.4.8-r3.ebuild
new file mode 100644
index 000000000000..3e17136c8fd5
--- /dev/null
+++ b/dev-libs/mpatrol/mpatrol-1.4.8-r3.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mpatrol/mpatrol-1.4.8-r3.ebuild,v 1.1 2010/08/15 19:52:09 hwoarang Exp $
+
+inherit eutils flag-o-matic
+
+IUSE="X"
+
+DESCRIPTION="A link library for controlling and tracing dynamic memory allocation. Attempts to diagnose run-time errors that are caused by misuse of dynamically allocated memory. Simple integration via a single header."
+SRC_URI="http://www.cbmamiga.demon.co.uk/mpatrol/files/${PN}_${PV}.tar.gz"
+HOMEPAGE="http://www.cbmamiga.demon.co.uk/mpatrol/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~sparc"
+S="${WORKDIR}/${PN}"
+
+# To use X, mpatrol requires Motif
+DEPEND="!dev-lang/mercury
+ X? ( x11-libs/openmotif )"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch "${FILESDIR}/${P}-soname.patch"
+
+ #bug 272505
+ epatch "${FILESDIR}/${P}-gcc44-glibc210.patch"
+
+ cd ${S}/src
+ # [Bug 176592] textrel fix for dev-libs/mpatrol
+ epatch "${FILESDIR}/${PN}-textrel-fix.patch"
+
+ sed -i \
+ -e 's:#define MP_SYMBOL_LIBS , MP_LIBNAME(bfd), MP_LIBNAME(iberty):#define MP_SYMBOL_LIBS , MP_LIBNAME(bfd):' config.h \
+ || die "sed config.h failed"
+
+ cd ${S}/build/unix
+ sed -i \
+ -e 's:^OFLAGS.= -O3:OFLAGS = ${OPT_FLAGS}:' Makefile \
+ || die "sed Makefile for CFLAGS failed"
+
+ sed -i \
+ -e 's:$(LD) $(LDFLAGS) -o $@ $(SHARED_MPTOBJS):$(LD) $(LDFLAGS) -liberty -o $@ $(SHARED_MPTOBJS):' Makefile \
+ || die "sed Makefile for fixing -libiberty failed"
+
+ epatch "${FILESDIR}"/${PN}-ldflags.diff
+
+ if use X; then
+ sed -i \
+ -e 's:^GUISUP.= false:GUISUP = true:' Makefile \
+ || die "sed Makefile for GUISUP failed"
+ fi
+}
+
+src_compile() {
+ cd ${S}/build/unix
+ emake STRIPPROG=true OPT_FLAGS="${CFLAGS} -Wa,--noexecstack" LDOPTS="${LDFLAGS}" all || die "emake failed"
+}
+
+# **
+# ** The install is straightforward, but a bit on the odd side. The author
+# ** gives a list of things that need to be done, rather than attempt to
+# ** make an install target. --nj
+# **
+src_install () {
+ cd ${S}/build/unix
+ dobin mleak mpatrol mprof mptrace || die
+ dolib.so lib*.so.* || die
+ dolib.a lib*.a || die
+
+ # Each lib needs a symlink from the .so level
+ #for L in lib*.so.*; do
+ # dosym $L /usr/lib/`echo $L | sed 's:^\([^\.]*\.so\).*:\1:'`
+ #done
+
+ insinto /usr
+ cd ${S}/bin
+ dobin * || die
+
+ insinto /usr/include/
+ cd ${S}/src
+ doins mpatrol.h mpalloc.h mpdebug.h || die
+
+ insinto /usr/include/mpatrol
+ doins ${S}/tools/*.h || die
+
+ doman ${S}/man/man?/* || die
+
+ cd ${S}
+ dodoc AUTHORS ChangeLog NEWS README THANKS VERSION pkg/lsm/*lsm || die
+
+ cd ${S}/doc
+ dodoc *.dvi *.ps *.pdf *.txt || die
+ doinfo mpatrol.info || die
+ dohtml mpatrol.html || die
+
+ docinto images
+ dodoc images/*.{eps,pdf} || die
+
+ insinto /usr/share/doc/${PF}/html/images
+ doins images/*.jpg || die
+}
+
+pkg_postinst() {
+ elog " Please review the documentation in /usr/share/doc/$PF"
+}