summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-11-02 23:59:28 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-11-02 23:59:28 +0000
commit4466919bc264a1fb43fd8db43600d09d4331df95 (patch)
tree9f1ea6fc979649fdf74f85dc1f91a0c15d191188 /dev-util/valgrind
parentvanilla-3.11.6 + genpatches-3.11-9 + grsecurity-2.9.1-3.11.6-201310292050 (diff)
downloadhistorical-4466919bc264a1fb43fd8db43600d09d4331df95.tar.gz
historical-4466919bc264a1fb43fd8db43600d09d4331df95.tar.bz2
historical-4466919bc264a1fb43fd8db43600d09d4331df95.zip
Version bump
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/ChangeLog8
-rw-r--r--dev-util/valgrind/Manifest33
-rw-r--r--dev-util/valgrind/files/valgrind-3.9.0-non-exec-stack.patch144
-rw-r--r--dev-util/valgrind/valgrind-3.9.0.ebuild103
4 files changed, 272 insertions, 16 deletions
diff --git a/dev-util/valgrind/ChangeLog b/dev-util/valgrind/ChangeLog
index edc7dfd58ee7..8a96e323bc8e 100644
--- a/dev-util/valgrind/ChangeLog
+++ b/dev-util/valgrind/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-util/valgrind
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.171 2013/06/18 21:16:33 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.172 2013/11/02 23:59:17 blueness Exp $
+
+*valgrind-3.9.0 (02 Nov 2013)
+
+ 02 Nov 2013; Anthony G. Basile <blueness@gentoo.org>
+ +files/valgrind-3.9.0-non-exec-stack.patch, +valgrind-3.9.0.ebuild:
+ Version bump
18 Jun 2013; Anthony G. Basile <blueness@gentoo.org>
-files/valgrind-3.4.1-glibc-2.10.1.patch,
diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest
index c4d5cf03f997..e84921d75932 100644
--- a/dev-util/valgrind/Manifest
+++ b/dev-util/valgrind/Manifest
@@ -12,27 +12,30 @@ AUX valgrind-3.7.0-respect-flags.patch 360 SHA256 6b1e5938ecafc29428a698296423c7
AUX valgrind-3.8.0-non-exec-stack.patch 5777 SHA256 05e91425416ca9faaf322bb11fd5ed3ff5e57410db17d0da01aa1c922161d670 SHA512 b9dee7a6fa38ac7f9d21489b2ff46b6d3602ac8b2e1f0504ee4adc5ae3184933098deb039725c891471ea33a44659814266f2e840dc948106a9deee79a403927 WHIRLPOOL 64a62ea23a7017d358c73625f276cc59c5eb51cb96367254f64dcdc65a351551f8bd8f8f1c75bb4896b47e401d7163df5fc3af7e6b75b8cdd450795b99b9a3ae
AUX valgrind-3.8.1-gcc-4.8-memmove.patch 1004 SHA256 38a2a3954dba93748d3e5877e902e891d68587604eb7c9979f8feab16d902b9d SHA512 ac225c3020d9c96a5d4f84b67491b094323a93de1ebb102cc74c1fc20bdccc7a9503039ff8a9366429495e76efd3c2d6840f77259e984cebd70a6b5c72dad088 WHIRLPOOL 249e356b43b2fda068362210a758960ccf52a38b9f7a94bc9d3771a8f12f250f70d973d64eb87dba89dc293324bffb0dbc92c4ce67f5713ff8fbc94c2f8ea6a5
AUX valgrind-3.8.1-glibc-2.17.patch 1001 SHA256 7d7c770691de9a732bfa62bb64a348bd2429464e7ca22e8726bac6746ffd8dc3 SHA512 d5486fff61846744ea4986bcda409ffca66a3514c1e62eac8e32080990bf19694129c3e6005028dfdcd6c966b6732e861dd859974d3a73c1f04e375b68124f84 WHIRLPOOL 72e48daaae834bd0c78451ec857b51c13385db952dc9a356e5af4c7c3b0a9de5ebf1967b032aa918c73a2bb74799b788fda8a78173e9104f1533d4559812d676
+AUX valgrind-3.9.0-non-exec-stack.patch 5843 SHA256 a47fb06d20270670e88c562662e16f0b1824c18fc3baa34aa739351044d294ce SHA512 1c052362bb35f66f904bffb851f342ef9313125fc0b43949b14baedeea41cc33bd96595508de7cb0ea6960abeb699233d7780e27753c80757f27f2ca979bf127 WHIRLPOOL fa0849ccc0a82c79b7ca50dc78dbba21d84873d5c29b895ecf0b8ab5afd93a4bb674e9416af98361af9185d869e79b31d9dfbcd3b41f3ea72d2bea367670dbbe
DIST valgrind-3.7.0.tar.bz2 6624216 SHA256 5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6 SHA512 0ccf6607fe6d26f0dc0f3d6e45f84645925d0a90ce4ecf6acfc6b4d374d3e909b2a628b03c0a964a45d2462cca6877f818a5f72b3e4a5bbf3a2d9b8a9a343d5f WHIRLPOOL 44bf8c423d6f3222f5e777333acc21e94dfa680509b2152289129961296d8afc090466b6407248b6e172b3c42da5448206f257bd63f8e44aba01007f92a6fde1
DIST valgrind-3.8.1.tar.bz2 7962963 SHA256 473be00576bed311a662b277a2bfbe97d9cca4058e68619a0e420c9fc19958db SHA512 ba31f5d43bd2d9533846bed6456a0eae40ac071ff8732201dd75c9e2cd7e9ce3224cb5928b9c8fc859a75ce6867a9b6a1fb2ba8ab62cd3944893d6d4156ab25c WHIRLPOOL 81e63bb649455ed29fcd60fc7f3cebde456a610118b9b24530d3b2e8aa4a7561369e992af86ffb158e1f7fc0db7b91738564402931a947a79bb789bd26a8e065
+DIST valgrind-3.9.0.tar.bz2 10003156 SHA256 e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf372ed6f0 SHA512 4b748f9f9a647df50db75fb56f83ee2f25bad9f1f4e4f05c4ac1d1e919e6cd954975c1f325dbedb509c44be1a8516ac2a5f269090946a0d728166ab183016c7b WHIRLPOOL e73c4dcdff829a34889f5654c5ec314f32d2c33f9e64bde3f811359a252749a6c677db80bf2aa2647f935cd38a0ccc19c0358a7b13198032c5d636f97e9e71de
EBUILD valgrind-3.7.0-r4.ebuild 3577 SHA256 f95fa83714c79d8c05f5c6f43b93ab91eb47c0a50e37faed055eab2cf5fd30ed SHA512 a4e2586606ab100d16cf3bad564aae5012796826a016c18fb85def0d8b72177ad8a4fa11bde322a8f8e9543f16ae874dc237d83c7efbb88db4a5676fb00d1364 WHIRLPOOL 16885e75e7383ee040ec825fa22bd68bf99fe8062d81e5ea008f84e573b0552d3514182c3c570b75cfa19313147de49e7557ba8d78687d875756b1c9c1251777
EBUILD valgrind-3.8.1-r1.ebuild 3533 SHA256 6bc0e374e2e226a0767e2da9fff2f6563403642c7e293bd3f7ca59f1335cc951 SHA512 d70c3cfb871b628a5ade6f6e401f0a07fec4856a80ab42fe9367f55cc3754b4efb36273a339c96f44db3eae82be4b26c4a88392bebb257349465e2f2a424aff7 WHIRLPOOL 06e384fab7bc29959c887bdc241148531e3d465fd26985b0f438c39e6e4f28b8bd396e2f309e2e87c8c06e048ca7ca454f2ae050443510b5ff3b8d5be5e59080
EBUILD valgrind-3.8.1.ebuild 3418 SHA256 9244f56a4e98ab7cc6738f98012aa30192535e4a0011e8b75eeadb6515da94e9 SHA512 5edfb5cd3fc18b6afe2476b753762ac806cb1968cac8ceb4d1a3552e046bd078aa9974f38bad61c24104b1997fb69197244d4404982f1cfbd815a284a82cf085 WHIRLPOOL d66919af12d551d1102a43ac1c9d5643304791a876e1f1bdb81bf4784640b0c7dffa2b6867e59aa6873a0736581ccc96bf7a962348cdd9358c23a615338a641b
-MISC ChangeLog 29042 SHA256 5d86fcd0b2e744b25a1871b53be591485574aa93ce5e9d2e307a705cb5ed5443 SHA512 63977e4abac45a29f7bcf90604690e6b54be3dd4fdb1d5cef3879bdba01408cb6495c24aa7f17780ee01651da0887efc7abf7106cf25eb0812beff2ec8209268 WHIRLPOOL 5a823bc6048c0287d9bdd49af075398cf9b2008ba5bb9930e144db257b43d5b1fbdbc2f57a16aa5af4f28719a802ec9b9d6c5b3c25ee45cd6b9d5d82748ee71b
+EBUILD valgrind-3.9.0.ebuild 3335 SHA256 2cd702e48c838666a07a92c422093e1639df0e55688dcb83b4fe59ea9846e403 SHA512 ef89c41036517ba1138f4defc8a19f74e6610a6eb8bd0e0bd76763f999e6ea901224ef193dd3d0c432eb96382b3ef6b8c6346331e1842f0d84da1cf2da466ff3 WHIRLPOOL ee9e341396bb05a66eb484eb4f9692ba0b3b053b3615067817a15cf57470e24dea4daa6e73a6c8d50026afa98d17df6f71e5779b626fb652a9324329c2262b1b
+MISC ChangeLog 29214 SHA256 a94f10e094eee4e17c2651c3f76c6ec077bf4fbab803699cbf33c46807f137f8 SHA512 8f91331c8448da07292c218b8c3b38e12dad43e47db1cd7c875e072e24a2c009e30555bbbea4757de7ac7bd9a9f3aef35a0104b26c72f3e67bcdbaad30afde5f WHIRLPOOL ab052bfac8872da21bfdb94e4ec90cba5eb462333f1d6513ddee050cee886493ad1039a6a9ed8cc620a0bdf6958a1a96ade6c5ee72ef9803ea4cb3827ec18bc8
MISC metadata.xml 1013 SHA256 69a104cb454bfa145365c6eb7740c8331851c1b1cf9c507a3a787995e5a47aa6 SHA512 8ed29082b4adbdde40d277f465d7e2faa404b537c5bd7d7812ef9632648750763f66506596d392d090286f5681047a60541c483195e3756d8ec7725f66de3457 WHIRLPOOL 93c2f17dfeb55910707e3789e028dc75b5efe7786dd8c785432c8cf50044d4b3b97975ed57f6cc26e8a6a259b462a0ad2784707e0969f02ff9b3614b78fc0536
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.20 (GNU/Linux)
+Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJRwM55AAoJEJOE+m71LUu6FCsP/j0YmeG9cybK/HpMGjkh07He
-uzMtRQa5F3AubB5eBsgULBVAcd8jp/KCXjB49wMfWx4td5vMoadgherneLsTTlMP
-684miFv8LtrXwOBHY5sDIvB1zoWP/ag0uujCQDpQ9lSmYAjkZR8zD22ZcMhY3VRY
-QLye8iknwJbNWdM0Pvm+dWTviByVE0AJpMDZunPJBC56bvkRQitYlo0l7Y1ntkcG
-7r0DmJ6jezKt80YjmmSO3kbMo0/Krm1VWLQmk4U6V9wbDiAWHeNgvUQ4BWTeCVuR
-JGasrn7kHK82uyPKrNhfs/pHWM3s/FwIuj2iRGenU4LTMfZvL+TCqnca/6rRtbjG
-2zyiBl/a//fejJULjwVUd9H24+gfrT8Z6GspcOyDcb+gpsyxWNzo+0rRgJyBpSpY
-YJPH5DZpWiMzxZq2TH/CX+frHZRERfdWXpSRhpTVXT3H1uxlcyNCyVwMzqssu3tV
-3zCvfJDStddfTY8E1/3JeQSNnIyYo7Lt64HlID+jnvdtbhCKjOXDc1qS9h1nHNUh
-OSkfJso/MM+9JDc+m2MSq78bc3u+IUDEni5TgVuaqVsjeie+mPI0nul8xTAdlapS
-9UwdMcHfxCAaAtqmx+MBw3P5LunZSNKhyPG2jHIuv0Zppm8g11OhHFs7rSyrGOHg
-4Dt/GS6hr19NORZ/VJCi
-=Tm53
+iQIcBAEBCAAGBQJSdZH/AAoJEJOE+m71LUu66XwP/2bacEdnWIftE4JTJYfdEJRc
+fHga4SzXklllF0QXoOF90kOo92AZ+K6Xv1izIKBtdrE3Mdzo+9g1/mSHPehExNvj
+iv6QJsexsnTS2w5EnPnllNFYEylMqE9IcMjRRMPS3eCacT7Hq/DBRDdizYlUIB8b
+tHjqzZ8jtmx9VM0a37HmFGn0OWkg+pnJARritFFg5o3kjdJNLoseceWBKopPCiP0
+JQvV4r2jBrpQ5GrWMSo3r2QZVqgzwx1usrE2XwnNB5w0V4hbTdm+tS2h2GL0YJMp
+vqtoCuo4IePmqmvn9tGnDUtXbfLVwW63uDiEYbWGr3PVjxRQiHXC7jcKr6F3hF+6
+7kgLey48FWsxvZsLCKNJSjxwfHtDAX0OMGyPSOJiEG81laHgNeJAyH3QYeGn3IID
+ZMF6U/CrT3X9p88RxGk/GfNyryJBKkE/e+/TJbWdPfUQVzSBBCVdyHR02gAL94hC
+qJE8QKn37u8wLBGf7nas6XHinOwWm+knO+V+2TqR8pVwydPgtX1QkUEWjYtujFQu
++ImZojq2Cru2Dep61Jfgh4DrMJIdAJUPWGJbUpDDrfqS9CndAJfz640+l7tXADgH
+9VR5UiRGimxDskhDhMLpbGU3n8W/Fss5+ccq6HHkc8mNjbeyE8kWCf/mj4BfHJ/q
+LRngi1SKatxdXbBYFP4i
+=p02V
-----END PGP SIGNATURE-----
diff --git a/dev-util/valgrind/files/valgrind-3.9.0-non-exec-stack.patch b/dev-util/valgrind/files/valgrind-3.9.0-non-exec-stack.patch
new file mode 100644
index 000000000000..41be42aca003
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.9.0-non-exec-stack.patch
@@ -0,0 +1,144 @@
+diff -Naur valgrind-3.9.0.orig/coregrind/Makefile.am valgrind-3.9.0/coregrind/Makefile.am
+--- valgrind-3.9.0.orig/coregrind/Makefile.am 2013-10-23 06:50:13.000000000 -0400
++++ valgrind-3.9.0/coregrind/Makefile.am 2013-11-02 19:41:26.984017770 -0400
+@@ -309,16 +309,6 @@
+ m_demangle/demangle.c \
+ m_demangle/dyn-string.c \
+ m_demangle/safe-ctype.c \
+- m_dispatch/dispatch-x86-linux.S \
+- m_dispatch/dispatch-amd64-linux.S \
+- m_dispatch/dispatch-ppc32-linux.S \
+- m_dispatch/dispatch-ppc64-linux.S \
+- m_dispatch/dispatch-arm-linux.S \
+- m_dispatch/dispatch-s390x-linux.S \
+- m_dispatch/dispatch-mips32-linux.S \
+- m_dispatch/dispatch-mips64-linux.S \
+- m_dispatch/dispatch-x86-darwin.S \
+- m_dispatch/dispatch-amd64-darwin.S \
+ m_gdbserver/inferiors.c \
+ m_gdbserver/m_gdbserver.c \
+ m_gdbserver/regcache.c \
+@@ -341,8 +331,6 @@
+ m_initimg/initimg-pathscan.c \
+ m_mach/mach_basics.c \
+ m_mach/mach_msg.c \
+- m_mach/mach_traps-x86-darwin.S \
+- m_mach/mach_traps-amd64-darwin.S \
+ m_replacemalloc/replacemalloc_core.c \
+ m_scheduler/scheduler.c \
+ m_scheduler/sema.c \
+@@ -358,16 +346,6 @@
+ m_sigframe/sigframe-mips64-linux.c \
+ m_sigframe/sigframe-x86-darwin.c \
+ m_sigframe/sigframe-amd64-darwin.c \
+- m_syswrap/syscall-x86-linux.S \
+- m_syswrap/syscall-amd64-linux.S \
+- m_syswrap/syscall-ppc32-linux.S \
+- m_syswrap/syscall-ppc64-linux.S \
+- m_syswrap/syscall-arm-linux.S \
+- m_syswrap/syscall-s390x-linux.S \
+- m_syswrap/syscall-mips32-linux.S \
+- m_syswrap/syscall-mips64-linux.S \
+- m_syswrap/syscall-x86-darwin.S \
+- m_syswrap/syscall-amd64-darwin.S \
+ m_syswrap/syswrap-main.c \
+ m_syswrap/syswrap-generic.c \
+ m_syswrap/syswrap-linux.c \
+@@ -389,6 +367,29 @@
+ m_ume/main.c \
+ m_ume/script.c
+
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S \
++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S
++
++if VGCONF_HAVE_PLATFORM_SEC
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S \
++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S
++endif
++
++if VGCONF_OS_IS_DARWIN
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-darwin.S \
++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-darwin.S \
++ m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S
++if VGCONF_HAVE_PLATFORM_SEC
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-darwin.S \
++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-darwin.S \
++ m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S
++endif
++endif
++
+ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
+ $(COREGRIND_SOURCES_COMMON)
+ nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
+diff -Naur valgrind-3.9.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.9.0/coregrind/m_dispatch/dispatch-amd64-linux.S
+--- valgrind-3.9.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S 2013-10-23 06:50:09.000000000 -0400
++++ valgrind-3.9.0/coregrind/m_dispatch/dispatch-amd64-linux.S 2013-11-02 19:31:54.688991721 -0400
+@@ -249,11 +249,11 @@
+
+ .size VG_(disp_run_translations), .-VG_(disp_run_translations)
+
++#endif // defined(VGP_amd64_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_amd64_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+diff -Naur valgrind-3.9.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.9.0/coregrind/m_dispatch/dispatch-x86-linux.S
+--- valgrind-3.9.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S 2013-10-23 06:50:09.000000000 -0400
++++ valgrind-3.9.0/coregrind/m_dispatch/dispatch-x86-linux.S 2013-11-02 19:31:54.688991721 -0400
+@@ -240,11 +240,11 @@
+
+ .size VG_(disp_run_translations), .-VG_(disp_run_translations)
+
++#endif // defined(VGP_x86_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_x86_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+diff -Naur valgrind-3.9.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.9.0/coregrind/m_syswrap/syscall-amd64-linux.S
+--- valgrind-3.9.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S 2013-10-23 06:50:12.000000000 -0400
++++ valgrind-3.9.0/coregrind/m_syswrap/syscall-amd64-linux.S 2013-11-02 19:31:54.689991721 -0400
+@@ -205,11 +205,11 @@
+ ML_(blksys_finished): .quad 5b
+ .previous
+
++#endif // defined(VGP_amd64_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_amd64_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+diff -Naur valgrind-3.9.0.orig/coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.9.0/coregrind/m_syswrap/syscall-x86-linux.S
+--- valgrind-3.9.0.orig/coregrind/m_syswrap/syscall-x86-linux.S 2013-10-23 06:50:12.000000000 -0400
++++ valgrind-3.9.0/coregrind/m_syswrap/syscall-x86-linux.S 2013-11-02 19:31:54.689991721 -0400
+@@ -165,11 +165,11 @@
+ ML_(blksys_finished): .long 5b
+ .previous
+
++#endif // defined(VGP_x86_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_x86_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
diff --git a/dev-util/valgrind/valgrind-3.9.0.ebuild b/dev-util/valgrind/valgrind-3.9.0.ebuild
new file mode 100644
index 000000000000..10e4ea482ece
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.9.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.9.0.ebuild,v 1.1 2013/11/02 23:59:17 blueness Exp $
+
+EAPI="4"
+inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils
+
+DESCRIPTION="An open-source memory debugger for GNU/Linux"
+HOMEPAGE="http://www.valgrind.org"
+SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="mpi"
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Correct hard coded doc location
+ sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
+
+ # Don't force multiarch stuff on OSX, bug #306467
+ sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
+
+ # Respect CFLAGS, LDFLAGS
+ epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
+
+ # Changing Makefile.all.am to disable SSP
+ epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
+
+ # Yet more local labels, this time for ppc32 & ppc64
+ epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch
+
+ # Don't build in empty assembly files for other platforms or we'll get a QA
+ # warning about executable stacks.
+ epatch "${FILESDIR}"/${PN}-3.9.0-non-exec-stack.patch
+
+ # Regenerate autotools files
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Respect ar, bug #468114
+ tc-export AR
+
+ # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
+ # while compiling insn_sse.c in none/tests/x86
+ # -fpie valgrind seemingly hangs when built with pie on
+ # amd64 (bug #102157)
+ # -fstack-protector more undefined references to __guard and __stack_smash_handler
+ # because valgrind doesn't link to glibc (bug #114347)
+ # -m64 -mx32 for multilib-portage, bug #398825
+ # -ggdb3 segmentation fault on startup
+ filter-flags -fomit-frame-pointer
+ filter-flags -fpie
+ filter-flags -fstack-protector
+ filter-flags -m64 -mx32
+ replace-flags -ggdb3 -ggdb2
+
+ if use amd64 || use ppc64; then
+ ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
+ fi
+
+ # Force bitness on darwin, bug #306467
+ use x86-macos && myconf="${myconf} --enable-only32bit"
+ use x64-macos && myconf="${myconf} --enable-only64bit"
+
+ # Don't use mpicc unless the user asked for it (bug #258832)
+ if ! use mpi; then
+ myconf="${myconf} --without-mpicc"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS FAQ.txt NEWS README*
+
+ pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_names on shared libraries, can't turn them into bundles,
+ # as dyld won't load them any more then, bug #306467
+ local l
+ for l in "${ED}"/usr/lib/valgrind/*.so ; do
+ install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
+ done
+ fi
+}
+
+pkg_postinst() {
+ elog "Valgrind will not work if glibc does not have debug symbols."
+ elog "To fix this you can add splitdebug to FEATURES in make.conf"
+ elog "and remerge glibc. See:"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
+}