summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-03-14 04:07:49 -0400
committerMike Frysinger <vapier@gentoo.org>2015-03-14 04:07:49 -0400
commit9f98764ca0fa26c76e633a0043fb225477509400 (patch)
tree5365a92a0492ab98ed36c24d777c72f6f60f536c
parentbinutils: move old versions from main tree (diff)
downloadtoolchain-9f98764ca0fa26c76e633a0043fb225477509400.tar.gz
toolchain-9f98764ca0fa26c76e633a0043fb225477509400.tar.bz2
toolchain-9f98764ca0fa26c76e633a0043fb225477509400.zip
gdb: move old versions from main tree
-rw-r--r--sys-devel/gdb/Manifest21
-rw-r--r--sys-devel/gdb/gdb-6.6-r2.ebuild82
-rw-r--r--sys-devel/gdb/gdb-6.7.1-r3.ebuild84
-rw-r--r--sys-devel/gdb/gdb-6.8-r1.ebuild86
-rw-r--r--sys-devel/gdb/gdb-6.8-r2.ebuild88
-rw-r--r--sys-devel/gdb/gdb-7.0.1.ebuild103
-rw-r--r--sys-devel/gdb/gdb-7.1.ebuild103
-rw-r--r--sys-devel/gdb/gdb-7.2.ebuild129
-rw-r--r--sys-devel/gdb/gdb-7.3.1-r1.ebuild183
-rw-r--r--sys-devel/gdb/gdb-7.3.1.ebuild145
-rw-r--r--sys-devel/gdb/gdb-7.3.ebuild145
-rw-r--r--sys-devel/gdb/gdb-7.4.1.ebuild186
-rw-r--r--sys-devel/gdb/gdb-7.4.ebuild186
13 files changed, 1541 insertions, 0 deletions
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index f6bfebd..6959081 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -1,3 +1,24 @@
+DIST gdb-6.6-patches-1.3.tar.bz2 15697 SHA256 7911134ce63ede4e1a45488481cf7cdc1b69ab00c8b3a432983344ff95a0051e SHA512 05f479ad62b4a92ef888f760f07c77f69eeffabb3f8cadc17cd72774e3f3c7c59fd44821cff107639986e0af54626dd8bf0f4ed64bffc5fc0c1f4dd2ed83d186 WHIRLPOOL d2dfc5631e7367baaffdac15bf84af0f3087a95c1bb18ba71a8f7df8e3efb9bc5d4d657bd0ac258abd8e6bf139ee483437c309659fde5af3a68315231bb85634
+DIST gdb-6.6.tar.bz2 14535755 SHA256 6e602987298db5ddb479bbb84ce653eabd9c304957a49552245f65cdc70d43bd SHA512 e3f75bd4fd788021564f09069c7872fe1c9f6fc4262f3b0b12829f55cb9e1df20ee1fb708efed01cfe4a069245ef3c3766dc6ddbb57bf43f5bc7d1fd7f38d10b WHIRLPOOL 97cdbf237f8d37a5394ea4e8b7707e4b6a3533d5da4230f26bfe58c7ff390631bbcd6a87c28f09b24eadae8e1f6226152b290e0d4efca4fee580b242dee8a0ae
+DIST gdb-6.7.1-patches-1.3.tar.bz2 109192 SHA256 8d614d6ecdb343310904e293bc86f154550829cb45c5b5bd3bff9c26543f9132 SHA512 dd7577a8a900ca35e0a8d1b16c900350dea63bff989529d01697917dc51065f4438ed77386e53c6deffebad8a7bf1acdde1b79eec63268e12223b82ef0a66c3e WHIRLPOOL bbc8bf4df2166d9296df79d4c919d8e42823305a20f59018023d2151605dd9b3e536a9d147ec747f30e8ac6535f5894a1073b0d2057e6c6c5f6330773c11a783
+DIST gdb-6.7.1.tar.bz2 15080950 SHA256 f98cec38420f4f1ce3da2f16e6045f086d24dfcf05996b2d74f8620691442f62 SHA512 16a69765e138a95427dfa27f89c851cc88a39c925b66596a6506f67c69fbec4c5cccf0b9c36d88df59ef48e30e3b03e37c22cab8f1f3672cfd3877315741b3e7 WHIRLPOOL 14c12bbf0aabb3288989d3688a9453d3c42fc21973c55665efe47dd4d0ec7c88a013c36927324aa68e10b2589118c06547fe4a037b97bc0bb75cb619f23d5ba5
+DIST gdb-6.8-patches-1.4.tar.lzma 122922 SHA256 83121b238df52e4556ea197112f6103b34965b8e1773ab1af2949baf53f8dde4 SHA512 1f7b17a44049b37a0f056382c0604a2f96cfba29f5ec1233b00ae005b42d1812272e2346e958d7503cd53b06017c96a9f7969ec766bc378afccfc43307cb7dac WHIRLPOOL acb6ee4ccbb15e57de4ffad9342ae5efe580856810d93754e3e5d38683d5dce9c50d767a3e7b24c885aa56e5ea037d05f24c6a67c3bc0c165e927f6a520efc9b
+DIST gdb-6.8-patches-1.5.tar.lzma 125348 SHA256 e503204a517992595b37f49e6cb115bcb1c210845197d54d974ffd53bc55647b SHA512 c7b9c81bad82b347b5ec5d87652434553f1ad97c84b977e09340e193f0b85b71bfcf8e374bcfe573adedfccda9dc7e780495009708049e58d6b9fd95ba4d5212 WHIRLPOOL 266b3461ec44c4bb4a44af78f7fc9237466b6c797faa7a777a2e9a58f790db701502d22606de3868adafa22a30dc5a6d96dc2928df54d74c23fe7d4ac00dba75
+DIST gdb-6.8.tar.bz2 15581509 SHA256 eedffd586bf41cf2ae2f77e6819545d6eb1e5062052320a27332fdfaaebdf818 SHA512 c4647142e712d19b8d032e14e09a2293f8f3a75199d7139f2a1d856d335a50d6dd630cd032d5928cbe76906b801aa314cc817476ab889966113efc3a866e02d8 WHIRLPOOL 3e4aac4fe7511a6f0e0800da5747dfa4dbd6d9c9b241b0e58948bee4b7a9b9abbd608d0cc9af41d4c1d41d6cb27e9660f611d2b6074bfce4fcd92c7499cf121a
+DIST gdb-7.0.1-patches-1.tar.lzma 11216 SHA256 711d6fb705a0ede2ede6adb036def73f8c7c4fbc9b5a4f27d829800af4d84292 SHA512 65ed2b8b9e793e399d915c8c48cfa8f4ce59f5902dfd8e13729189d959ba3ad7fe06bcae4749d395e500d51b04ae93b11a187cd6c35ffa609c0236d20feccfc4 WHIRLPOOL e29df6569d192a2a0b7768cd979d832a6b6d4faf3bbf35545896746a8ffbb61190cc91cf0376708132355b46964cb38b0bbfb5f1d3f6cc587d9c97305a09c567
+DIST gdb-7.0.1.tar.bz2 17614682 SHA256 560c3fd0053ade6549e71bd045f70282feb88db73b35e401bbad601a311e3c1b SHA512 358abaf38614d16505a8a3b11c87384788affedf6c10ad0f818a22d8803a00e0b366fc6dbad047384291fc249a23d539b050aafbb48acca83cb559ad83c6f776 WHIRLPOOL 4ddf7dc9e721ba455feb38f1c17d93bbb48a8c7b7154b54213cd545787fbf7489b24300a97c3b6e3f98ed2c297314f950ba37c1c54bd4625b986775bbd74c607
+DIST gdb-7.1-patches-1.tar.lzma 9207 SHA256 d2efe1ee66110e4e0c55bbe4365380bdb6e159c45ea849a1e329ac293b4e7e3c SHA512 a181a44b55c62f9c8f9d1a006182c0a09f75517f5d3e47e07afba97da5220c9e01be79f6fb9c2dc525ca8a80a4e6b9b92517ced61e1681a5b81558227701cd00 WHIRLPOOL 6a5e6896f72d98e07e3921df781c3360c86f0c0202465270affea6ff5e99ed9bc38d9d1ba328fd81a830534d24c8ebd306d52ee2ccbebbb82d5189a3daa40e6a
+DIST gdb-7.1.tar.bz2 17977195 SHA256 142c27d7970a4e652dc225d61d887777ae00cf22fdd75cd1e8e4e13bfbd85352 SHA512 5edf1568c268e5f94c392bb031d134b89692f265e4e121f29c19c371b96dd835dbb1ab18fdc99bb29da811797187cef87f5a0cacb8a05e8b5a90bcfc673b3d89 WHIRLPOOL 6aeb05f33a54cdb06138d086fd853323ad0fa56b862f5ff66a87ca95fcdcf859ff3416ffeec40eea15580fbc9166663b1f679b5c46f417279079bf4b45ad2e82
+DIST gdb-7.2-patches-1.tar.xz 8908 SHA256 c091d46b869aec70ea507d93936d85e134002766808e38cc29d0a6f1f4898fab SHA512 2daf753acffc20f470050e326c3b11650bd7833d23f5b4b6c011646ab9afe5cbc90d98525d62188947880990e20a08f6b656bdc55f47346661d030630c0d2459 WHIRLPOOL e26bdb93c9ac54d14dc15d8e9ece0871c0f3e3082b89b32afc2d4b4107a104c8a29e6e4839d120403983161d9f959280d7d1762ed067e29f9ec704b60a5f471c
+DIST gdb-7.2.tar.bz2 18530613 SHA256 bf444b88ab845243364c3d410be9e3f43a57f96ff594d65a37842ea03c3410f0 SHA512 af453ea7b1dbaf9eca35bd58fbe72f09e24e2b467af1d0d883c222310a81f8f96c288bb476a9c96a129c487ceadca858031f3440cad6a9b11a964058140f0dd1 WHIRLPOOL 0056b41be90a0a9c3c0f91e3245c4a421b03fe744f63531eb78d6d0e6e095f2ef4b1035e3ffcea8c21af01eb9bf0f90b62ead5fad200653a36cb847eef118caf
+DIST gdb-7.3-patches-1.tar.xz 8192 SHA256 9b6cd79b0a769a1c3575830702c151859f1188d162699edaf4779e54dc13b6ed SHA512 0a09811a27fe534d98fe1123d8891b738f5283cda57d46c81dc0fffef0cab1f7b72c0bc0854ce8c20a44867dc2956f5b37e94b9bbc5e0e3a9506abb91160bcec WHIRLPOOL 9ed7389900cd57b4fc932071b4f353528c7fd8a2e53ad76d3eefe47ee514dfb853216dcc6bcd1bd9f8ac2ab755c4fa856f0b6a98f05b048da97de2f7edef3b57
+DIST gdb-7.3.1-patches-2.tar.xz 17344 SHA256 8dc91c665025faaa716a47404a1645086c5a9db3ee6b38beb564607fa0ef6e69 SHA512 9ab6cfed095128333883b3e8ebfffc724dba21116940397c87107a6eec90b5765e8fb94e5756eac85aaed3b5c2bdd7dcccf4f9b10301cc9196bcace9791f3ecb WHIRLPOOL ac0221711239c49bb0c9ddb620e1ac328a7f570ef62b1d08a25ce0653d3989a47db35d8f784547a6521f918f063a477356c06f32d62d151903f5b5924043cc60
+DIST gdb-7.3.1.tar.bz2 19500995 SHA256 6d7bff716fde98d03866a1b747c0929ee7dba49bca13e01d975e0b0fa9b33a28 SHA512 69d7318a3f6bf3c95804e6526d886348333d85c4f63c19e7575052792851a296073e36e1b54c63151c2db8ca0bfead36693f4513f2fd9dec962870408e8e71d9 WHIRLPOOL 5332eb8bd5a24cac710c39c6948e1d2373939c647ddfb1cae893cafef910e346c880e2ee4f9fa10211e60319fd648176e36362f9a5f3fdd6db7fb967500a0d5f
+DIST gdb-7.3.tar.bz2 19091650 SHA256 f9edc83ed921660b77aa2b2fc168b81639aab0f49a94d4b38f2f01bf51d5d2ba SHA512 b7195913c652243f4577bac58adfe80dc90ec9d68fbf316830b1394d13248734178182ba5649ef317411145f57b32a35004b52bcec14886917da340cdf9a2b87 WHIRLPOOL de7b49ad1c09a58c6a5556ab12479729695aa5ffd47b941cb8e834057495835b0ecf3dd063dfb65a75fbb59977034e2dfa168a3b19715ff2e0d7c0b4509d426f
+DIST gdb-7.4-patches-1.tar.xz 8192 SHA256 c4349847c80f314c603dd9465b90cda2b3565cac4f8024a4287f756eda9d138b SHA512 936e921ab523bd74e8c8b300346f3d861d3dbc11ec6e659b0eb08c45dc91f98bc4ff9140459f663ffb91d67e2cc51d65891a25a79d5565ff9031ba579dca4282 WHIRLPOOL 86d245c25edaa72d6eca9bd83059cf74eca7da86e137b927b7a44abe4bef3f8322430a27bd44c7de53e37f5c86fcc121e758b8e3242cc3bce69738ed46e34d45
+DIST gdb-7.4.1-patches-2.tar.xz 10944 SHA256 2c57b6edcc3f1cb3915e0bd88f2789eec2a773bb7d115abfc98aa8d55ca03b02 SHA512 4455f68aa345ac04a61547a10f87f11874912227a4e46d836fe1e78bb7754d6bf778b3f52c8bce15492625aac0b238996234fcbff4549c523354187b2729def2 WHIRLPOOL 9b24f6af94266747eb8711fd4b189d9b7a4990a3a19b68561b00c38704a9cb8e7e76ac47d40131619e466cb67cde06f2cee9da248bbfafc53adbeb285464b781
+DIST gdb-7.4.1.tar.bz2 20619200 SHA256 a081343c017732ab4dd30a4730da83667aa01b0b37d1ad3700c3f05a5da0f9f6 SHA512 86a2f19f161da558afdb5b6179ba11e9124651b5e10915dd3e703fc8e54cf68dba5ffa86f5c3c3c595bc8841728e220741c9fa20889f548725dbd034f3456114 WHIRLPOOL 3de6e0b4e3d17a7d97cb804a6ca49761197d9e1230fb686ec84b8c5d68b6bc578ade873493cc8545d2f96f0f7061fedd9cdc7c42dc5d1cd279025dc4f4cb2069
+DIST gdb-7.4.tar.bz2 20614020 SHA256 de7e2db7f0475eca7f9ffa9251abaddd3d37e0eed0b3759f71abfd810a3fd20f SHA512 9a5e8b04be6e8a746cb0e6a8b524ec0fa1fa3a971633c54646d722d2ff9200304e36f80cdf30d5a8ba69b5d188f7c1b2baad40d11881c416a3a54e7dee8cc724 WHIRLPOOL f8b0a046071da405194d2bd07007b044e2fd037852493ba6ab6f9fc81400b85583f36b6d6c13d4f1f04e5dafc7d324404606b235e1b962ea7f80b955141cd6c2
DIST gdb-weekly-7.3.50.20111129.tar.bz2 21632339 SHA256 d8dd66e50c014bfc5d1a83501615ea9e83c6bd7b504f4fdb434fffed362f9211
DIST gdb-weekly-7.3.50.20111206.tar.bz2 21710785 SHA256 1169ccb5cc300ccdb2f3d3088ce44a4abcdd5945cbb987686a442a43649100dc
DIST gdb-weekly-7.3.50.20111213.tar.bz2 21725949 SHA256 01ce3897be48245dd7af2abf130adbeab5cd3c0d8df264f1dc409ff3ab419327
diff --git a/sys-devel/gdb/gdb-6.6-r2.ebuild b/sys-devel/gdb/gdb-6.6-r2.ebuild
new file mode 100644
index 0000000..f72baed
--- /dev/null
+++ b/sys-devel/gdb/gdb-6.6-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.6-r2.ebuild,v 1.17 2015/02/27 08:14:05 vapier Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+PATCH_VER="1.3"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-fbsd"
+IUSE="nls test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+DEPEND="${RDEPEND}
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ ! use vanilla && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_test() {
+ make check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme includedir=/nukeme \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+}
diff --git a/sys-devel/gdb/gdb-6.7.1-r3.ebuild b/sys-devel/gdb/gdb-6.7.1-r3.ebuild
new file mode 100644
index 0000000..c095bdd
--- /dev/null
+++ b/sys-devel/gdb/gdb-6.7.1-r3.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.7.1-r3.ebuild,v 1.13 2015/02/27 08:14:05 vapier Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+PATCH_VER="1.3"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-fbsd"
+IUSE="nls test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline"
+DEPEND="${RDEPEND}
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ ! use vanilla && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+ strip-unsupported-flags
+ econf \
+ --disable-werror \
+ --with-system-readline \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_test() {
+ make check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme/pretty/pretty/please includedir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+}
diff --git a/sys-devel/gdb/gdb-6.8-r1.ebuild b/sys-devel/gdb/gdb-6.8-r1.ebuild
new file mode 100644
index 0000000..7bd4b1f
--- /dev/null
+++ b/sys-devel/gdb/gdb-6.8-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.8-r1.ebuild,v 1.15 2015/02/27 08:14:05 vapier Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+PATCH_VER="1.4"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.lzma"
+
+LICENSE="GPL-2 LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-fbsd"
+IUSE="multitarget nls test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline"
+DEPEND="${RDEPEND}
+ || ( app-arch/xz-utils app-arch/lzma-utils )
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ ! use vanilla && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+ strip-unsupported-flags
+ econf \
+ --disable-werror \
+ $(has_version '=sys-libs/readline-5*:0' && echo --with-system-readline) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ || die
+ emake || die
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme/pretty/pretty/please includedir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+}
diff --git a/sys-devel/gdb/gdb-6.8-r2.ebuild b/sys-devel/gdb/gdb-6.8-r2.ebuild
new file mode 100644
index 0000000..8ad954f
--- /dev/null
+++ b/sys-devel/gdb/gdb-6.8-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.8-r2.ebuild,v 1.9 2015/02/27 08:14:05 vapier Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+PATCH_VER="1.5"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.lzma"
+
+LICENSE="GPL-2 LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
+IUSE="expat multitarget nls test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )"
+DEPEND="${RDEPEND}
+ || ( app-arch/xz-utils app-arch/lzma-utils )
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ ! use vanilla && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+ strip-unsupported-flags
+ econf \
+ --disable-werror \
+ $(has_version '=sys-libs/readline-5*:0' && echo --with-system-readline) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ $(use_with expat) \
+ || die
+ emake || die
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme/pretty/pretty/please includedir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+}
diff --git a/sys-devel/gdb/gdb-7.0.1.ebuild b/sys-devel/gdb/gdb-7.0.1.ebuild
new file mode 100644
index 0000000..83542e6
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.0.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.0.1.ebuild,v 1.12 2015/02/27 08:14:05 vapier Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+PATCH_VER="1"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.lzma}"
+
+LICENSE="GPL-2 LGPL-2"
+is_cross \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-fbsd"
+IUSE="expat multitarget nls python test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( dev-lang/python )"
+DEPEND="${RDEPEND}
+ || ( app-arch/xz-utils app-arch/lzma-utils )
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_compile() {
+ strip-unsupported-flags
+ econf \
+ --with-pkgversion="$(gdb_branding)" \
+ --with-bugurl='http://bugs.gentoo.org/' \
+ --disable-werror \
+ $(has_version '=sys-libs/readline-5*:0' && echo --with-system-readline) \
+ $(is_cross && echo --with-sysroot=/usr/${CTARGET}) \
+ $(use_with expat) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ $(use_with python) \
+ || die
+ emake || die
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme/pretty/pretty/please includedir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+}
diff --git a/sys-devel/gdb/gdb-7.1.ebuild b/sys-devel/gdb/gdb-7.1.ebuild
new file mode 100644
index 0000000..b953954
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.1.ebuild,v 1.6 2015/02/27 08:14:05 vapier Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+PATCH_VER="1"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.lzma}"
+
+LICENSE="GPL-2 LGPL-2"
+is_cross \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
+IUSE="expat multitarget nls python test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( dev-lang/python )"
+DEPEND="${RDEPEND}
+ || ( app-arch/xz-utils app-arch/lzma-utils )
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_compile() {
+ strip-unsupported-flags
+ econf \
+ --with-pkgversion="$(gdb_branding)" \
+ --with-bugurl='http://bugs.gentoo.org/' \
+ --disable-werror \
+ --with-system-readline \
+ $(is_cross && echo --with-sysroot=/usr/${CTARGET}) \
+ $(use_with expat) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ $(use_with python) \
+ || die
+ emake || die
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme/pretty/pretty/please includedir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${D}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+}
diff --git a/sys-devel/gdb/gdb-7.2.ebuild b/sys-devel/gdb/gdb-7.2.ebuild
new file mode 100644
index 0000000..52ee83b
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.2.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.2.ebuild,v 1.18 2015/02/27 08:14:05 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+if [[ ${PV} == *.*.*.*.*.* ]] ; then
+ inherit versionator rpm
+ # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+ gvcr() { get_version_component_range "$@"; }
+ MY_PV=$(gvcr 1-4)
+ RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+else
+ MY_PV=${PV}
+ RPM=
+fi
+
+PATCH_VER="1"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+if [[ -n ${RPM} ]] ; then
+ SRC_URI="http://mirrors.kernel.org/fedora/development/source/SRPMS/${RPM}"
+else
+ SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+fi
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+is_cross \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-fbsd ~x64-macos ~x86-macos"
+IUSE="expat multitarget nls python test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( =dev-lang/python-2* )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/yacc
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_configure() {
+ strip-unsupported-flags
+ econf \
+ --with-pkgversion="$(gdb_branding)" \
+ --with-bugurl='http://bugs.gentoo.org/' \
+ --disable-werror \
+ --enable-64-bit-bfd \
+ --with-system-readline \
+ $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) \
+ $(use_with expat) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ libdir=/nukeme/pretty/pretty/please includedir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${ED}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb/gdb-7.3.1-r1.ebuild b/sys-devel/gdb/gdb-7.3.1-r1.ebuild
new file mode 100644
index 0000000..930b051
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.3.1-r1.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v 1.11 2015/02/27 08:14:05 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+*.*.*.*.*.*)
+ # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+ inherit versionator rpm
+ gvcr() { get_version_component_range "$@"; }
+ MY_PV=$(gvcr 1-4)
+ RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+ SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
+ ;;
+*.*.50.*)
+ # weekly snapshots
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
+ ;;
+9999*)
+ # live git tree
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
+ inherit git-2
+ SRC_URI=""
+ ;;
+*)
+ # Normal upstream release
+ SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+ ;;
+esac
+
+PATCH_VER="2"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+if [[ ${PV} != 9999* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="+client expat multitarget nls +python +server test vanilla zlib"
+
+RDEPEND="!dev-util/gdbserver
+ >=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( =dev-lang/python-2* )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/yacc
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ local myconf=(
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='http://bugs.gentoo.org/'
+ --disable-werror
+ $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET})
+ )
+
+ if use server && ! use client ; then
+ # just configure+build in the gdbserver subdir to speed things up
+ cd gdb/gdbserver
+ myconf+=( --program-transform-name='' )
+ else
+ # gdbserver only works for native targets (CHOST==CTARGET).
+ # it also doesn't support all targets, so rather than duplicate
+ # the target list (which changes between versions), use the
+ # "auto" value when things are turned on.
+ is_cross \
+ && myconf+=( --disable-gdbserver ) \
+ || myconf+=( $(use_enable server gdbserver auto) )
+ fi
+
+ if ! ( use server && ! use client ) ; then
+ # if we are configuring in the top level, then use all
+ # the additional global options
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --with-system-readline
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with expat)
+ $(use_enable nls)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+ $(use_with zlib)
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ use server && ! use client && cd gdb/gdbserver
+ emake DESTDIR="${D}" install || die
+ use client && { find "${ED}"/usr -name libiberty.a -delete || die ; }
+ cd "${S}"
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${ED}"/usr/share
+ return 0
+ fi
+ # Install it by hand for now:
+ # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
+ # Only install if it exists due to the twisted behavior (see
+ # notes in src_configure above).
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; }
+
+ dodoc README
+ if use client ; then
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ fi
+ docinto sim
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
+ if use server ; then
+ docinto gdbserver
+ dodoc gdb/gdbserver/{ChangeLog,README}
+ fi
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${EROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb/gdb-7.3.1.ebuild b/sys-devel/gdb/gdb-7.3.1.ebuild
new file mode 100644
index 0000000..72715a0
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.3.1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1.ebuild,v 1.17 2015/02/27 08:14:05 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+*.*.*.*.*.*)
+ # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+ inherit versionator rpm
+ gvcr() { get_version_component_range "$@"; }
+ MY_PV=$(gvcr 1-4)
+ RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+ SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
+ ;;
+*.*.50.*)
+ # weekly snapshots
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
+ ;;
+9999*)
+ # live git tree
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
+ inherit git-2
+ SRC_URI=""
+ ;;
+*)
+ # Normal upstream release
+ SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+ ;;
+esac
+
+PATCH_VER="2"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+is_cross \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+if [[ ${PV} != 9999* ]] ; then
+ KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="expat multitarget nls +python test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( =dev-lang/python-2* )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/yacc
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_configure() {
+ strip-unsupported-flags
+ econf \
+ --with-pkgversion="$(gdb_branding)" \
+ --with-bugurl='http://bugs.gentoo.org/' \
+ --disable-werror \
+ --enable-64-bit-bfd \
+ --with-system-readline \
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug \
+ $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) \
+ $(use_with expat) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ {include,lib}dir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${ED}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb/gdb-7.3.ebuild b/sys-devel/gdb/gdb-7.3.ebuild
new file mode 100644
index 0000000..f9146de
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.3.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.ebuild,v 1.11 2015/02/27 08:14:05 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+*.*.*.*.*.*)
+ # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+ inherit versionator rpm
+ gvcr() { get_version_component_range "$@"; }
+ MY_PV=$(gvcr 1-4)
+ RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+ SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
+ ;;
+*.*.50.*)
+ # weekly snapshots
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
+ ;;
+9999*)
+ # live git tree
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
+ inherit git-2
+ SRC_URI=""
+ ;;
+*)
+ # Normal upstream release
+ SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+ ;;
+esac
+
+PATCH_VER="1"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+is_cross \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+if [[ ${PV} != 9999* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~x64-macos ~x86-macos"
+fi
+IUSE="expat multitarget nls python test vanilla"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( =dev-lang/python-2* )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/yacc
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_configure() {
+ strip-unsupported-flags
+ econf \
+ --with-pkgversion="$(gdb_branding)" \
+ --with-bugurl='http://bugs.gentoo.org/' \
+ --disable-werror \
+ --enable-64-bit-bfd \
+ --with-system-readline \
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug \
+ $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) \
+ $(use_with expat) \
+ $(use_enable nls) \
+ $(use multitarget && echo --enable-targets=all) \
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ {include,lib}dir=/nukeme/pretty/pretty/please \
+ install || die
+ rm -r "${D}"/nukeme || die
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${ED}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${ROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb/gdb-7.4.1.ebuild b/sys-devel/gdb/gdb-7.4.1.ebuild
new file mode 100644
index 0000000..face20d
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.4.1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.4.1.ebuild,v 1.8 2015/02/27 08:14:05 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+*.*.*.*.*.*)
+ # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+ inherit versionator rpm
+ gvcr() { get_version_component_range "$@"; }
+ MY_PV=$(gvcr 1-4)
+ RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+ SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
+ ;;
+*.*.50.*)
+ # weekly snapshots
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
+ ;;
+9999*)
+ # live git tree
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
+ inherit git-2
+ SRC_URI=""
+ ;;
+*)
+ # Normal upstream release
+ SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+ ;;
+esac
+
+PATCH_VER="2"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+if [[ ${PV} != 9999* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="+client expat multitarget nls +python +server test vanilla zlib"
+
+RDEPEND="!dev-util/gdbserver
+ >=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( =dev-lang/python-2* )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/yacc
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ local sysroot="${EPREFIX}"/usr/${CTARGET}
+ local myconf=(
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='http://bugs.gentoo.org/'
+ --disable-werror
+ $(is_cross && echo \
+ --with-sysroot="${sysroot}" \
+ --includedir="${sysroot}/usr/include")
+ )
+
+ if use server && ! use client ; then
+ # just configure+build in the gdbserver subdir to speed things up
+ cd gdb/gdbserver
+ myconf+=( --program-transform-name='' )
+ else
+ # gdbserver only works for native targets (CHOST==CTARGET).
+ # it also doesn't support all targets, so rather than duplicate
+ # the target list (which changes between versions), use the
+ # "auto" value when things are turned on.
+ is_cross \
+ && myconf+=( --disable-gdbserver ) \
+ || myconf+=( $(use_enable server gdbserver auto) )
+ fi
+
+ if ! ( use server && ! use client ) ; then
+ # if we are configuring in the top level, then use all
+ # the additional global options
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --with-system-readline
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with expat)
+ $(use_enable nls)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+ $(use_with zlib)
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ use server && ! use client && cd gdb/gdbserver
+ emake DESTDIR="${D}" install || die
+ use client && { find "${ED}"/usr -name libiberty.a -delete || die ; }
+ cd "${S}"
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${ED}"/usr/share
+ return 0
+ fi
+ # Install it by hand for now:
+ # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
+ # Only install if it exists due to the twisted behavior (see
+ # notes in src_configure above).
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; }
+
+ dodoc README
+ if use client ; then
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ fi
+ docinto sim
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
+ if use server ; then
+ docinto gdbserver
+ dodoc gdb/gdbserver/{ChangeLog,README}
+ fi
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${EROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb/gdb-7.4.ebuild b/sys-devel/gdb/gdb-7.4.ebuild
new file mode 100644
index 0000000..a3431f0
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.4.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.4.ebuild,v 1.8 2015/02/27 08:14:05 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+*.*.*.*.*.*)
+ # fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+ inherit versionator rpm
+ gvcr() { get_version_component_range "$@"; }
+ MY_PV=$(gvcr 1-4)
+ RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+ SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
+ ;;
+*.*.50.*)
+ # weekly snapshots
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
+ ;;
+9999*)
+ # live git tree
+ EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
+ inherit git-2
+ SRC_URI=""
+ ;;
+*)
+ # Normal upstream release
+ SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+ ;;
+esac
+
+PATCH_VER="1"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+if [[ ${PV} != 9999* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="+client expat multitarget nls +python +server test vanilla zlib"
+
+RDEPEND="!dev-util/gdbserver
+ >=sys-libs/ncurses-5.2-r2
+ sys-libs/readline
+ expat? ( dev-libs/expat )
+ python? ( =dev-lang/python-2* )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/yacc
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+ ! use vanilla && [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+ printf "Gentoo ${PV} "
+ if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
+ printf "p${PATCH_VER}"
+ else
+ printf "vanilla"
+ fi
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ local sysroot="${EPREFIX}"/usr/${CTARGET}
+ local myconf=(
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='http://bugs.gentoo.org/'
+ --disable-werror
+ $(is_cross && echo \
+ --with-sysroot="${sysroot}" \
+ --includedir="${sysroot}/usr/include")
+ )
+
+ if use server && ! use client ; then
+ # just configure+build in the gdbserver subdir to speed things up
+ cd gdb/gdbserver
+ myconf+=( --program-transform-name='' )
+ else
+ # gdbserver only works for native targets (CHOST==CTARGET).
+ # it also doesn't support all targets, so rather than duplicate
+ # the target list (which changes between versions), use the
+ # "auto" value when things are turned on.
+ is_cross \
+ && myconf+=( --disable-gdbserver ) \
+ || myconf+=( $(use_enable server gdbserver auto) )
+ fi
+
+ if ! ( use server && ! use client ) ; then
+ # if we are configuring in the top level, then use all
+ # the additional global options
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --with-system-readline
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with expat)
+ $(use_enable nls)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+ $(use_with zlib)
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ emake check || ewarn "tests failed"
+}
+
+src_install() {
+ use server && ! use client && cd gdb/gdbserver
+ emake DESTDIR="${D}" install || die
+ use client && { find "${ED}"/usr -name libiberty.a -delete || die ; }
+ cd "${S}"
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${ED}"/usr/share
+ return 0
+ fi
+ # Install it by hand for now:
+ # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
+ # Only install if it exists due to the twisted behavior (see
+ # notes in src_configure above).
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; }
+
+ dodoc README
+ if use client ; then
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ fi
+ docinto sim
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
+ if use server ; then
+ docinto gdbserver
+ dodoc gdb/gdbserver/{ChangeLog,README}
+ fi
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ dodoc "${WORKDIR}"/extra/gdbinit.sample
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+ # portage sucks and doesnt unmerge files in /etc
+ rm -vf "${EROOT}"/etc/skel/.gdbinit
+
+ if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
+ ewarn "gdb is unable to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}