1 |
commit: ff277b921fc3cdb1a531522e8424d29f3d243490 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 29 17:12:56 2016 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 17:20:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff277b92 |
7 |
|
8 |
dev-util/duma: bump to EAPI 6 |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
12 |
|
13 |
dev-util/duma/duma-2.5.15-r2.ebuild | 93 +++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 93 insertions(+) |
15 |
|
16 |
diff --git a/dev-util/duma/duma-2.5.15-r2.ebuild b/dev-util/duma/duma-2.5.15-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000..f789883 |
19 |
--- /dev/null |
20 |
+++ b/dev-util/duma/duma-2.5.15-r2.ebuild |
21 |
@@ -0,0 +1,93 @@ |
22 |
+# Copyright 1999-2016 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI=6 |
27 |
+inherit toolchain-funcs versionator |
28 |
+ |
29 |
+MY_P=${PN}_$(replace_all_version_separators '_') |
30 |
+ |
31 |
+DESCRIPTION="DUMA (Detect Unintended Memory Access) is a memory debugging library" |
32 |
+HOMEPAGE="http://duma.sourceforge.net" |
33 |
+SRC_URI="mirror://sourceforge/duma/${MY_P}.tar.gz |
34 |
+ mirror://gentoo/${P}-GNUmakefile.patch.bz2" |
35 |
+ |
36 |
+LICENSE="GPL-2" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~ppc ~x86" |
39 |
+IUSE="examples" |
40 |
+ |
41 |
+S=${WORKDIR}/${MY_P} |
42 |
+ |
43 |
+PATCHES=( |
44 |
+ "${WORKDIR}"/${P}-GNUmakefile.patch |
45 |
+) |
46 |
+ |
47 |
+src_configure() { |
48 |
+ # other flags will break duma |
49 |
+ export CFLAGS="-O0 -Wall -Wextra -U_FORTIFY_SOURCE" |
50 |
+ tc-export AR CC CXX LD RANLIB |
51 |
+ |
52 |
+ case "${CHOST}" in |
53 |
+ *-linux-gnu) |
54 |
+ OS=linux;; |
55 |
+ *-solaris*) |
56 |
+ OS=solaris;; |
57 |
+ *-darwin*) |
58 |
+ OS=osx;; |
59 |
+ *-freebsd*) |
60 |
+ OS=freebsd;; |
61 |
+ *-netbsd*) |
62 |
+ OS=netbsd;; |
63 |
+ *-cygwin*) |
64 |
+ OS=cygwin;; |
65 |
+ **-irix**) |
66 |
+ OS=irix;; |
67 |
+ esac |
68 |
+ export OS="${OS}" |
69 |
+ elog "Detected OS is: ${OS}" |
70 |
+ |
71 |
+ if use amd64 && ! [ -n "${DUMA_ALIGNMENT}" ]; then |
72 |
+ export DUMA_ALIGNMENT=16 |
73 |
+ elog "Exported DUMA_ALIGNMENT=${DUMA_ALIGNMENT} for x86_64," |
74 |
+ fi |
75 |
+ |
76 |
+} |
77 |
+ |
78 |
+src_compile() { |
79 |
+ # The below must be run first if distcc is enabled, otherwise |
80 |
+ # the real build breaks on parallel makes. |
81 |
+ emake reconfig |
82 |
+ emake |
83 |
+} |
84 |
+ |
85 |
+src_test() { |
86 |
+ emake test |
87 |
+ |
88 |
+ elog "Please, see the output above to verify all tests have passed." |
89 |
+ elog "Both static and dynamic confidence tests should say PASSED." |
90 |
+} |
91 |
+ |
92 |
+src_install(){ |
93 |
+ emake prefix="${D}/usr" libdir="${D}/usr/$(get_libdir)" \ |
94 |
+ docdir="${D}/usr/share/doc/${PF}" install |
95 |
+ |
96 |
+ sed -i "s|LD_PRELOAD=./libduma|LD_PRELOAD=libduma|" "${D}"/usr/bin/duma \ |
97 |
+ || die "sed failed" |
98 |
+ |
99 |
+ dodoc CHANGELOG TODO GNUmakefile |
100 |
+ |
101 |
+ if use examples; then |
102 |
+ insinto /usr/share/doc/${PF}/examples |
103 |
+ doins example[1-6].cpp example_makes/ex6/Makefile |
104 |
+ fi |
105 |
+} |
106 |
+ |
107 |
+pkg_postinst() { |
108 |
+ elog "See the GNUmakefile which will be also installed at" |
109 |
+ elog "/usr/share/doc/${PF} for more options. You can now export" |
110 |
+ elog "varibles to the build system easily, e.g.:" |
111 |
+ elog "# export CPPFLAGS=\"-DFLAG\" (or by using append-cppflags)" |
112 |
+ elog "# export DUMA_ALIGNMENT=${DUMA_ALIGNMENT} (Default is 16 for x86_64)" |
113 |
+ elog "See more information about DUMA_ALIGNMENT from Readme.txt" |
114 |
+} |