public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ian Stakenvicius" <axs@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/axs:master commit in: dev-libs/boost/files/, dev-libs/boost/
Date: Tue,  4 Sep 2012 16:57:54 +0000 (UTC)	[thread overview]
Message-ID: <1346777851.efda2163b4c1845f1ed4fa0624d7b47f8e1b2619.axs@gentoo> (raw)

commit:     efda2163b4c1845f1ed4fa0624d7b47f8e1b2619
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  4 16:57:31 2012 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Tue Sep  4 16:57:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/axs.git;a=commit;h=efda2163

added initial boost sub-slot support

---
 dev-libs/boost/Manifest                            |   68 +++
 dev-libs/boost/boost-1.35.0-r2.ebuild              |  268 +++++++++
 dev-libs/boost/boost-1.35.0-r5.ebuild              |  334 +++++++++++
 dev-libs/boost/boost-1.37.0-r1.ebuild              |  428 ++++++++++++++
 dev-libs/boost/boost-1.39.0.ebuild                 |  422 ++++++++++++++
 dev-libs/boost/boost-1.41.0-r3.ebuild              |  473 +++++++++++++++
 dev-libs/boost/boost-1.42.0-r1.ebuild              |  491 ++++++++++++++++
 dev-libs/boost/boost-1.42.0-r2.ebuild              |  492 ++++++++++++++++
 dev-libs/boost/boost-1.42.0.ebuild                 |  490 ++++++++++++++++
 dev-libs/boost/boost-1.45.0.ebuild                 |  486 ++++++++++++++++
 dev-libs/boost/boost-1.46.1-r1.ebuild              |  495 ++++++++++++++++
 dev-libs/boost/boost-1.47.0-r1.ebuild              |  487 ++++++++++++++++
 dev-libs/boost/boost-1.47.0.ebuild                 |  487 ++++++++++++++++
 dev-libs/boost/boost-1.48.0-r2.ebuild              |  615 ++++++++++++++++++++
 dev-libs/boost/boost-1.49.0-r1.ebuild              |  613 +++++++++++++++++++
 dev-libs/boost/boost-1.50.0-r2.ebuild              |  595 +++++++++++++++++++
 dev-libs/boost/boost-1.50.0.ebuild                 |  613 +++++++++++++++++++
 .../files/1.35-remove-hardlink-creation.patch      |   21 +
 .../files/boost-1.37.0-darwin-long-double.patch    |   14 +
 ...-fix-CRC-on-x64-during-gzip-decompression.patch |   24 +
 ...st-1.41.0-iostreams-missing-include-guard.patch |   20 +
 ...-1.41.0-mpi_process_group-missing-include.patch |   12 +
 .../boost-1.41.0-parameter-needs-python.patch      |  106 ++++
 ....41.0-spirit-fixed-include-guard-conflict.patch |   13 +
 .../boost/files/boost-1.42.0-gcc45-python.patch    |   15 +
 .../boost-1.42.0-parameter-needs-python.patch      |  106 ++++
 .../files/boost-1.42.0-template_arity-gcc45.patch  |   28 +
 .../boost/files/boost-1.45.0-lambda_bind.patch     |   42 ++
 dev-libs/boost/files/boost-1.46.1-python32.patch   |   16 +
 dev-libs/boost/files/boost-1.47.0-exceptions.patch |   22 +
 .../boost/files/boost-1.48.0-BOOST_FOREACH.patch   |   69 +++
 .../files/boost-1.48.0-disable_icu_rpath.patch     |   29 +
 .../boost-1.48.0-disable_libboost_python3.patch    |   62 ++
 dev-libs/boost/files/boost-1.48.0-gcc47.patch      |   14 +
 .../boost/files/boost-1.48.0-mpi_python3.patch     |   95 +++
 .../boost-1.48.0-no_strict_aliasing_python2.patch  |   23 +
 .../boost/files/boost-1.48.0-python_linking.patch  |   24 +
 .../boost-1.48.0-respect_python-buildid.patch      |   69 +++
 ...ost-1.48.0-support_dots_in_python-buildid.patch |   22 +
 dev-libs/boost/files/buildid-fix.patch             |   23 +
 .../boost/files/point_release_naming_fix.patch     |   14 +
 dev-libs/boost/files/random-Jamfile                |   15 +
 dev-libs/boost/files/random-Jamfile-1.45.0         |   15 +
 dev-libs/boost/files/random-Jamfile-1.46.1         |   15 +
 dev-libs/boost/files/random-Jamfile-1.47.0         |   15 +
 dev-libs/boost/files/remove-toolset-1.41.0.patch   |   11 +
 dev-libs/boost/files/remove-toolset-1.42.0.patch   |   11 +
 dev-libs/boost/files/remove-toolset-1.45.0.patch   |   11 +
 dev-libs/boost/files/remove-toolset-1.46.1.patch   |   11 +
 dev-libs/boost/files/remove-toolset-1.47.0.patch   |   11 +
 dev-libs/boost/files/remove-toolset-1.48.0.patch   |   11 +
 .../files/remove_toolset_from_targetname.patch     |   11 +
 52 files changed, 8877 insertions(+), 0 deletions(-)

diff --git a/dev-libs/boost/Manifest b/dev-libs/boost/Manifest
new file mode 100644
index 0000000..68fde09
--- /dev/null
+++ b/dev-libs/boost/Manifest
@@ -0,0 +1,68 @@
+AUX 1.35-remove-hardlink-creation.patch 547 SHA256 9b0515f343f0c8f7f0ce51e2c6f243edae0f3d5ce5df5b9f77a46b00041a134e SHA512 540a4dfdd56763a311ab6d8c56da276a11f37db87dbe29b37e622890c3151132a79380b6c87e8a02944f60aae78ad778ec34039246ebf1d76c9cc997cb4be15e WHIRLPOOL 71e8666b6c49532305916e4b25be429a2c8fc4bf1d8a1d1400bfbe4c7204b3922f20c850ee28ce028260ceab63826b28eb4f17587143cf3c205529e91fb10414
+AUX boost-1.37.0-darwin-long-double.patch 556 SHA256 0beb2bf9ae43ad86c307873ab19b049152ef7798ba17523638cdb78017642c31 SHA512 ffb492e4d309cec365a446bdf4f62e0f2f8d650035ca439e0b070ae2b6bfa06e7ef17a508f5af9d7a12db5d015500934ec25dec2b0ee57a6c34c3a14fc591fc8 WHIRLPOOL 96a89ad8a9471931eb1b106fe13aab126e774dc86ec68113f2112b5cc98537cb7446450e1fb407d436b9181c4af99d832388a051ee3ad72cb227a7b7fc262fc0
+AUX boost-1.41.0-fix-CRC-on-x64-during-gzip-decompression.patch 1030 SHA256 4b935fe0b3c9f3a2b1fcedda048b0ebc518531aa143f95cdd1b7fa51de1133d4 SHA512 4920ff78494f4f98a52be75f97bfba9d86cf87df387499a8564fc7f2dc64d3f0d88b9970bffe8db97feb98b4a2e54e33ef82e3a46a7c872b69760baa94976c14 WHIRLPOOL acd2560ccd5961a247dc1940e89ecb389c6f562fedff59cd939e2c0deba4c41d91042bd9aec5b9d08c015cf1f43fbcd91443aa06fa60d5c4adfcd74b3d560b3b
+AUX boost-1.41.0-iostreams-missing-include-guard.patch 813 SHA256 5b495a10b9cfca17c5d5f5de6e9f10527e67e999145d115349cc87721f2f3613 SHA512 7b65c558b7bc92993ce585bd72d5172636411763683c56cae477b2d2cac852e67af407698e664712d28b0e803c7679170c468d45d056d629954e1fc2b7a83a2f WHIRLPOOL edf70b5b172b5581dfa0ac2c05b35d32de1436bc0b9d810841db2a0414566cd75a7193fa2bde3645c934e11279a5b4505b3928c31b7bbd8a8ddbbaa40b065d14
+AUX boost-1.41.0-mpi_process_group-missing-include.patch 448 SHA256 0d5a09e3dc170afd4756fbb296f1a0c30438cc7fb4a771dc7b91763c88e8f88d SHA512 e81655412ee02ace60a993f389cb7248bb5ad24db25dbbdd0f4365a04e99a7d1ff991973d35f47df4d63a77f6d988a45dd387843bd7de17ba0e6e0e5a1b68276 WHIRLPOOL 5e29c081c4a66ce774723914c098df83bb38dea10cb33570ac1217466da8734d94ca9992d07c52e9eb75edf4aca97250ee9de585c089f8cd336e1197ca252edc
+AUX boost-1.41.0-parameter-needs-python.patch 3037 SHA256 0d0e47ef2582da43c40ccf8b5b58435a2d42e2236d29ea7883e1b1ecd1aaa439 SHA512 84cd0bf02a4f69c008ca0da864b99c25805a54eb1b9d85b8e21d18e45291070c2a65d337a265d9e0f02af50775735203276e84d28ed6a75d0da539e3c544e016 WHIRLPOOL 57f740face54bd0ea5ff83a77a93ee027bb884b0a5788d35db1c72389d2e9eb7d4280e96035754b116908ccc7840fdc55cd3b4c8e27d992d9dc065b87b972b15
+AUX boost-1.41.0-spirit-fixed-include-guard-conflict.patch 613 SHA256 83c7b2b00225433f82a78c86e3959e56e8529443d769ba35ebef02b4c2c26888 SHA512 80fac3e2d5c07c63b4116f0b6def46bd415e645948e9b50addc998b8b798ced05945d8b8f0a510ad4bc1d5858c33d17a95921a85203d2c7bc88adf00174e70dc WHIRLPOOL 9de74d7780ba9994b81c7f8d4256a0bd4036cd1b2f94e4293c92ac18bfc7a295ea22a0e1910f0e77dc16c3307d301f68e7eb72281a921e267edc45e0fec2bfaf
+AUX boost-1.42.0-gcc45-python.patch 628 SHA256 5ab528cfc9beb940d6cfa94ff1b39b0e29c6adc3c1d1906f31cfabaf94232761 SHA512 62e27e94af331e7ced1b7e41fb680dac92c352100998fe472c3462627d8bfc81eaf529d9d20ac16cf1fe2ad2b5d71f5f703bbafba869f377e199ca6d1222be91 WHIRLPOOL dc522396be307cc5694f721084909b85641b7e5a08abce585832e045845ccda41ae7c9f4eadc673d326bf985bb3da4dd64e6167ff3c13c9fe2b5ca281874dcbf
+AUX boost-1.42.0-parameter-needs-python.patch 3037 SHA256 0d0e47ef2582da43c40ccf8b5b58435a2d42e2236d29ea7883e1b1ecd1aaa439 SHA512 84cd0bf02a4f69c008ca0da864b99c25805a54eb1b9d85b8e21d18e45291070c2a65d337a265d9e0f02af50775735203276e84d28ed6a75d0da539e3c544e016 WHIRLPOOL 57f740face54bd0ea5ff83a77a93ee027bb884b0a5788d35db1c72389d2e9eb7d4280e96035754b116908ccc7840fdc55cd3b4c8e27d992d9dc065b87b972b15
+AUX boost-1.42.0-template_arity-gcc45.patch 970 SHA256 e289a56bed08914704fad58bc4779ce9f327b4acac8ebd6a93bc6dd09f9a6e98 SHA512 06be8b52263617453a630abd60aa423172159d80e076ea7e78c7d7792aadda96336c2f5d502408cd2827b01bcbe31a81a8d705a3daf4672e39c9366fa2ef3dc5 WHIRLPOOL 6adfb699927de4e96b999c8103e53849f7762ab767a7b1f303270dcfbe0f6b8e13cc549674eab2b83cda2972c152f5f346dcf8121fc89d79004a8e6a9266419f
+AUX boost-1.45.0-lambda_bind.patch 1607 SHA256 0ff6a7bf481d5311ec57be1eeaafdd0c0e9e0c09b896700d40295f67bf77be0b SHA512 b42c37f9b4985a9de6a6f083d9eb362d0754b69ee3c14eb63b72b88782b3b101cd5bf7974bd96a185ce974a06f59e94ab72df83faffee474a54664b469340d1f WHIRLPOOL b2a6b46e9843498a5977672b069a21a335f87877b6eed17556e8f3e8e3405c71b39f762b07ff89e489e9aaccb17618a7dfda149e37acf76d5f8fed17c16229e0
+AUX boost-1.46.1-python32.patch 579 SHA256 6227eb2692777b70896fe63a6726b630239b07845f4ae1ae57d2e83a062dc57e SHA512 fc63b9b31977eb4d6bf8152b7160558e2d5a5f83731200119cf35a536c7035c649ae5e3ebc0bf7a34792ed5c992af447d2a9118e4a1981589bfcd8fdcc8d4006 WHIRLPOOL 51154e59673fc82fbbb9d94fd0978fd47c7a12dbb73cb6eca14e40295b6ca07b13d3b5068614eabcd78a9a5ac0162b6b1bf601b42cedaad7891987698b29de04
+AUX boost-1.47.0-exceptions.patch 748 SHA256 c19d6043851692c03d3c04d96f1a75b2c054322de0a20910262eab2bab643ecf SHA512 dab1068cd5763938dfaa0413f82b2b76e104f4744413a3198b016dbe5468cffc2d7ff2a4dddb4bb9f4891386b39358fb5c842db4bf07972d830739019e520242 WHIRLPOOL fa75bb2f5c97bc602d390cf85128391a901f4bb80de5c13d34f72e6af4f43433093e063a5717b371f377a9baa49f02f07c331ca36cee3fdde2466681fa042951
+AUX boost-1.48.0-BOOST_FOREACH.patch 1889 SHA256 4a82e034a59645d0ab407ca9cd91ee99ec9249c8b323c8b0e0e46e399253cc2d SHA512 e2a9fc7b11cc099144e6123ce0f4b59931bcb25a24eddf35dc95fc258801e6ce0a808b1838c5ee3d600e0aea76523fdf88b4b66602ded16413e1369fdd4ceb2e WHIRLPOOL 0c43f13786a4b589f5d71d2a8d0c0c8b06a70fd36cbfabea2a319c506c829cba9ebae188e531c212a97e1b19c49e41df1ec3a1bd2a2197b6e0d4f3cd6776541e
+AUX boost-1.48.0-disable_icu_rpath.patch 1073 SHA256 e1c947d20f0864e22f6dd2b091da6948bb51aec0d3323c37fe4264ddf57204b4 SHA512 efb62b65dbcb52258dcca074997a0380dfc52f48161777a8b6f9672179247e534e098784dcbb574826f495981fd2189290c7fe733d943bba2b668bb62ef50087 WHIRLPOOL 6f9a142e15bf3674114f2b07c8708055888e74cda4c3c775ca5470e8f54c921aa12660a1f905a370ec5f44f16b73f05025d3ff1ccad557d379ff55ad3ad0a8f0
+AUX boost-1.48.0-disable_libboost_python3.patch 1509 SHA256 0b229762863b72a5faa39ea57538f757548abc492325e6458d3801fd49e4804e SHA512 5aa0eb72365a0674d7d654b924c3189501495c22cc1eb50dc1ce7aaee941ba418c17857475ebbcc4d8f8102100d889aa1c059e3782dbff9eb03ff101bea2ffbb WHIRLPOOL 5710ac3ecf1f6d18db0307f07c720d12646666ec83adde2b2464cb87c901d57088e98801720efb176420f9728967c8752382b15ca69f632b00852d51be412795
+AUX boost-1.48.0-gcc47.patch 606 SHA256 8f1dca1e57e94d7f61ecc7f8056f055e526bfffd64e3a617c5f88ca953ec2895 SHA512 3321d7713bbf91c63b262095c2e687c890676d8f9b40641ffd4cc358ac241e60a57a05a8b24646bdae2c1ab2021e4269eb322eac0266e8b173587eb550e52641 WHIRLPOOL 2cf58152f78789d78ceaacee4b223246de317507603a93e913ab4bfccb1932daa24b9325409c4a5890f4a14a9d535be76d4c609955a1ab890663776c65294940
+AUX boost-1.48.0-mpi_python3.patch 2549 SHA256 9120a660469fba15554e790150e03a665ea5497e94a79469053506147bd7dad1 SHA512 7c8aa497ceba42319194dd6400ea8af883656c79e4f697d87c5e825cfdef5733bce91c3e930b504b264cae80f582c85f2c2b29d5f8db11ebcabeb744c888096e WHIRLPOOL 1b740f102467c787bd45813ecf085297171892c1126675f1abd501c11dc9a56506d0cb32222239f4e4bb1e6913533b3884acd2a749633f781c53a6529106264c
+AUX boost-1.48.0-no_strict_aliasing_python2.patch 741 SHA256 d11db74992a7a692f655b36c1cd78355fcec6703007fde522b6a82c88f171689 SHA512 cd06ba8bf5623a5ca590cbd024ba27fae14d1d2a193ccd4baf91b06c5d41b6442f40561fa49b5ba14deb0c156d5773fc4a15890a85b6cea35cab91d54e94aa6e WHIRLPOOL 1b5cce1374f56d702213d7479beb90d15413c90010442a37a46821f383afa371aac3de49e657e7623d6e9079d1e3b07353233aa40218b760042161effedd813a
+AUX boost-1.48.0-python_linking.patch 1278 SHA256 5bb937bd4423e039aa406ee4a366c61542a8067ec96b22dbcc48e8826bb7b1f8 SHA512 d588d9391c654a0c3cd49078933563705da4157cd79929ac2ff2021a2e86eec1b87ed85f5ec6d2028b76974abe7e947bd379d78aa60d97da9dc23a6f74c77ec2 WHIRLPOOL 879318dd228ca01841dd3ef0d8020810357c4699fbd1d9f164b0db07319b599634bd823f0e06dd462157d81550bc9f101506d0a7469ad2352d4b1b366bb7fb00
+AUX boost-1.48.0-respect_python-buildid.patch 1648 SHA256 996395941b5518dd2782cb18ed937273ccb256d5c5e64301b1d152dc81be39cd SHA512 b53432893fb390354dfd98a88a7905b523e528780c349e3d0da2b019255cbc58b3b987065fdef903d4959387994fdf240f7cd87c53f801e485a0811a2da56316 WHIRLPOOL 72ef562edf844944c9d7bf7931819522984dcffb7af43ef8c9d7a41fd0272ef1ebca99fffdd67654ab4564e8899aa6e0acafa27f72c8f7c06e582a0d211dfd91
+AUX boost-1.48.0-support_dots_in_python-buildid.patch 625 SHA256 da1a6c1b501f6c3bd152b2d13ec690adc2566b159f0e489723ea84865d43b88d SHA512 3a8c3efd11eba1097312dd3141f8846e23578a0386701348ebc77279a02fecf4b715de2231c998bd426b0b63f3f1875f5f47833835a4b41b8e0723b9b5b35399 WHIRLPOOL cf9ad2c82ff1c68ce4ac6a685875e53b00d5f88aa0c562007c4dbe73610811eeaf9ce93a706d0fad46aea4322fe10e9b0bc4a73659d8b98540ebf96bb5288adb
+AUX buildid-fix.patch 1045 SHA256 42a2aa4c0f4d8579a501d6133f55852acbd1d7b497598983c50bdebaa17df17f SHA512 dcd835d51f33470b3b1a4528335d789e5077c90f0aa80ca08da0b9bd86dd619cb89722287fb7511b2a4cc735d3a876d9ea56e85bdd434b0ff046859cb7e05474 WHIRLPOOL 58fa87ba947d9ae03d4c146450f32486681d0f51fcec2b9b741b6e495836aacaccc32cc6c32036fbc5d7ae31b9bb5c0e3cc30ce445286dcbcce9e64782b15bdc
+AUX point_release_naming_fix.patch 379 SHA256 9369cf6effe61948c3ec6536172c97474b37a84311171a23189189b6c03b86d8 SHA512 fcf4982a4b7dac019fddc790bf5d2129a71e7166173514ba01a92d456c1dcdfb99c03c07bf51377e253da8624ed928de4dd9d28826e05cdba6a0d83c20a7d13d WHIRLPOOL 019bb917476eaa4e9185da7abd5b1c1f5d0747000b090328ef51cdc68e39135698b28644769d0fcc01f1bfd0ada8371e7afec6929a65bfdcd203f9e6b9fed085
+AUX random-Jamfile 355 SHA256 7dc71ab8b862ccd5ea9c21c42557adfe0c711ea7fbe7faa47328a37aa84bc096 SHA512 1c5c2fc8fbc720ab07c1345efd92160c8fc67990da778ad0f2564de1ff1692f5bd3a54b77a672b1b6e87c5ef7e0cb07b74765348ef518a0b2a6cd2c11f1fd906 WHIRLPOOL dfe9dda5f2405b01edcf5947a41e6f05b8ed78e3be2c4fb1e21d73cfb0580a4efacb66eb74ea56343056961595b8acf377fd58177c245eea2dc82186f8192c57
+AUX random-Jamfile-1.45.0 358 SHA256 412c26f915db9d2664305d596406f6a75132d8cfe1827b42f17dc083dc632f00 SHA512 61905d1c3d8fbc51a3775b768fb85ac45b94b27861d06298114494eca0b92983d024a09d0fd44ada064fa6ae2913f1139562c1389b9ff25502de9c1ae0ad1005 WHIRLPOOL 1cfd034cd07dcb6ec1d0ec5c39b21af8e6faef8fdcadb40ba834c6800da67ddebcbb20e36005ad31e41c2ce71fb5245ee3ed230e16b432fa5cbed9d74ec5e609
+AUX random-Jamfile-1.46.1 358 SHA256 412c26f915db9d2664305d596406f6a75132d8cfe1827b42f17dc083dc632f00 SHA512 61905d1c3d8fbc51a3775b768fb85ac45b94b27861d06298114494eca0b92983d024a09d0fd44ada064fa6ae2913f1139562c1389b9ff25502de9c1ae0ad1005 WHIRLPOOL 1cfd034cd07dcb6ec1d0ec5c39b21af8e6faef8fdcadb40ba834c6800da67ddebcbb20e36005ad31e41c2ce71fb5245ee3ed230e16b432fa5cbed9d74ec5e609
+AUX random-Jamfile-1.47.0 358 SHA256 412c26f915db9d2664305d596406f6a75132d8cfe1827b42f17dc083dc632f00 SHA512 61905d1c3d8fbc51a3775b768fb85ac45b94b27861d06298114494eca0b92983d024a09d0fd44ada064fa6ae2913f1139562c1389b9ff25502de9c1ae0ad1005 WHIRLPOOL 1cfd034cd07dcb6ec1d0ec5c39b21af8e6faef8fdcadb40ba834c6800da67ddebcbb20e36005ad31e41c2ce71fb5245ee3ed230e16b432fa5cbed9d74ec5e609
+AUX remove-toolset-1.41.0.patch 465 SHA256 e1b3c77d5116722df5c5a48973f95307fd46fea675d53d268d60548b7ac4bd2b SHA512 4acfeee14d49eeb3d1b3667dc93b0eb26c55b0412297859b7acb90612519bef9c73712681add8ae50968f87f071993d4dbb5a888af8d72a12b65ecf8fe20504a WHIRLPOOL c12a6b54e62ffc85cb5ba4666553f85d2f26eecd88af0e414bd95d6bc57e9722ea01f4b237bbced810de78baaa8d8510742f6a4a5b7a71a691a0d192aac70cc6
+AUX remove-toolset-1.42.0.patch 465 SHA256 e1b3c77d5116722df5c5a48973f95307fd46fea675d53d268d60548b7ac4bd2b SHA512 4acfeee14d49eeb3d1b3667dc93b0eb26c55b0412297859b7acb90612519bef9c73712681add8ae50968f87f071993d4dbb5a888af8d72a12b65ecf8fe20504a WHIRLPOOL c12a6b54e62ffc85cb5ba4666553f85d2f26eecd88af0e414bd95d6bc57e9722ea01f4b237bbced810de78baaa8d8510742f6a4a5b7a71a691a0d192aac70cc6
+AUX remove-toolset-1.45.0.patch 465 SHA256 c1cc35cd5e25160e481912dcdd1e45a86d518bb0ac009ad50bd3811b097226b7 SHA512 42c68ecfed8235a9b2d8f70849d57f4e34f6759a2709a50aca94dd9b997d82966556cda0d22abd0f19adf4818b3e6faae6e89cb23d53f456cddb86ed8b0173f6 WHIRLPOOL b785f9fa1db52d4bc947b4313ef34358e3f1f0335b1fe045451b1c4784e5c1166e11a852f72f2f38420a2706b2872119835abc0deac0cfc716b512a16a0d26e6
+AUX remove-toolset-1.46.1.patch 465 SHA256 c1cc35cd5e25160e481912dcdd1e45a86d518bb0ac009ad50bd3811b097226b7 SHA512 42c68ecfed8235a9b2d8f70849d57f4e34f6759a2709a50aca94dd9b997d82966556cda0d22abd0f19adf4818b3e6faae6e89cb23d53f456cddb86ed8b0173f6 WHIRLPOOL b785f9fa1db52d4bc947b4313ef34358e3f1f0335b1fe045451b1c4784e5c1166e11a852f72f2f38420a2706b2872119835abc0deac0cfc716b512a16a0d26e6
+AUX remove-toolset-1.47.0.patch 475 SHA256 c16838de102445b12c6fc3818d1b1c82adddeb639f05fb3493c15a25ce8b48fa SHA512 19c711f4d4e35f4d592f43cec3c5226a405d03b0a3087bb4902ffbd67c0b2a34ec6128c60be05b7097ab9e4d03e75b6149b98aebfea796f2f7a9bfe2923d6401 WHIRLPOOL 2f0feffadb2e362c82828d6720b9bb654305712874facc2cd16a5f0a871bdc2e284187616d98b4f99997cb363fcbbd78a5153780f37fa61d54df188c14c48f5b
+AUX remove-toolset-1.48.0.patch 396 SHA256 59af4c05d71def0b14e22a7a5f756a054ca82e3f9686b7668335af7d9bed28fa SHA512 bbb01be2e4b4807eeb19faf13fc6c73e3cb8843953586312076a15c67ad5c5cac683fc3fb26f4e2902c60ab7930e83922f4d499756a85f78a20ac53399329f61 WHIRLPOOL 2490dac69a45b3f48e2513b4f21d75dc7cf5361411541dde96f027c66ca459df5390708902c86f11577d1129410f52d20de1ff275524fb51083a17eee6adc332
+AUX remove_toolset_from_targetname.patch 490 SHA256 5c5c6fea3c1e20e290d15a68f91b6c084cc5b34daae338e3aa0879a3fd5b9fb5 SHA512 b250b4df95207239ebbee1714c26c5572ea4f0e9ef419528b485d372110a8cc6c4880888f922d4f95e75a2563c2c956f91bbfcb100b06c3ef96d94b35091423f WHIRLPOOL 601e9ad51a33999811e6f7ad19550a95e09aa15aa62ee2dadc4eb8a4cad47795897df68f07cd0d491f795a1c6a9f1c021582178c614fbf8bf29da9e7a6bb80a4
+DIST boost-patches-1.35.0-3.tbz2 4521 SHA256 e6360a99de6daa43daa3a605d1e2eeee2bf3a8bb4bf0128fc17b4e9d3f9348b8 SHA512 6c7765bccffa355afb9ea860977c8b24f032c19801023a06652f0326ac676f3553ec6730f2ae536c806355cda7f782b72fded94fe08b32563f5468aa5022db02 WHIRLPOOL 4ddcee099e72b9d479ec04e62c65c4b13b5615e0a4ffd93e03adfe83f1432bfd7a9814be5ad4bbe8c5d6628f9a662dfdedbb6b70970e74a171e648377e20a529
+DIST boost-patches-1.35.0-5.tbz2 5537 SHA256 9d8d6c61d6915cb7629f5f1537054949b616301ecd1f1cfe1d0e2a5a7a676e11 SHA512 e9a308f3cdec856ad92f443081415d7de1702edc98a50a51991f0a4bbb261090ee7d070bdbafdf444e94d98813065f4096e7c08a2d2b118d88cfb0e8bec20cbf WHIRLPOOL 5f728a7e1775120e1c9dbf3af1653dd6e8c719f2d592b0edfcb4ed7c35a7253505480e19588598731bb6f66aec92d615130ccd77c09d5f4b46da5bead7cb9f2b
+DIST boost-patches-1.37.0-1.tbz2 1207 SHA256 a10e3de954a812a181835f62b410c53b9ff21b8e7a063850fc70c0cf58804b37 SHA512 6af9e904be129183287bd61babd984cd6abb9cbc0200cdb18506b8e61ee2c40540c3768171ace6046b4d7f205eed905dd1e5696370bd6a7d8ab1b49977ca39be WHIRLPOOL 90f01073a2e7ab3cd23169afa6d99669f29b472839c32dfc50530884de540503e4c89f88cce00efb24c21ec82c2256cf8daa97484d75a7787fd276c03d32cb86
+DIST boost-patches-1.39.0-1.tbz2 1113 SHA256 f98f4ed539425b46de47a14b8b9ca06a69bb3248f966342999a73a619db8fec3 SHA512 f311c2818d36dc9314adff1911756e58c8f5b941cf8e6976a76e1831cbf744a55aa118f0029f0ee774d9f83d9afcf198cd1f04ad63a8663c1a91f1e657fa7c1e WHIRLPOOL 23e1c7dc714c47c2024e3887783da7de31e25afa6a05d6585615988c53ef71071026eb6020805169fe13f35a9f12b978da3a081954929f67ea20e5f02e7eb7f5
+DIST boost_1_35_0.tar.bz2 23416747 SHA256 f8bf7368a22ccf2e2cf77048ab2129744be4c03f8488c76ad31c0aa229b280da SHA512 90ed283492550cae1b2ac1d0e6f0580a8a95c5dc039e8733e68ca9507b78ef5e2fddefd4b21773908fb088be923750a88b487396705c968e461dbda4e8c51de5 WHIRLPOOL 848886d74b9560a375976cc64fad920f6c531fe710bacefb24bc84575144201bfab7322bb9a44d8700cb09e0e5a80052bb2c6b9e03145ea32f161f6ff635f006
+DIST boost_1_37_0.tar.bz2 29435646 SHA256 d52ef49f70b1b9addc4e0d1a3a2a1966227f0d173c3301bac3e6d399eeac5472 SHA512 20d3394fea7025b359208712fad1454390c6cc6e29000de9f3ddd9fbf88684ffb917495bb034bf582df112040a02dabc1e019a8c7381a4c7839b3435d2ea1395 WHIRLPOOL 0d1b9af4ab3271980d8213d60bfcd1342da6136f3e37c168ec17c97b34da6400df9afda4ab3ac458feac24fa7acb914b8528b73e6aebcf656f4b305df9463571
+DIST boost_1_39_0.tar.bz2 29408537 SHA256 44785eae8c6cce61a29a8a51f9b737e57b34d66baa7c0bcd4af188832b8018fd SHA512 473a3da235f954487f7f8150f4892b5be5df187d688e3c1324189809b0110374ed6bfcafe89f41bb02f1339522a571e8cc022971d42104be2cd3cdb3db95874a WHIRLPOOL ce9f43bb954e7c0241f001492037a84c64a10ae61452209bddfb2e835be449e7bf0207e73e1fb6b6ec10fddd394f11ebdb78e716f2aa0e841aa5fc27cf4781c5
+DIST boost_1_41_0.tar.bz2 33348161 SHA256 1ef94e6749eaf13318284b4f629be063544c7015b45e38113b975ac1945cc726 SHA512 5e035c15d963f90cf0624dfbf4b67253d4aedbb42496a7b94928e2b8e717e6a6ba0e4d5f7d67a7dbc4bc917e09a1845619128b2343b013c8de2c517e7c679b64 WHIRLPOOL 714f32808c7e50afcd732a50f9ee3b1ad789776183e736b826532f900f4f7c8bdeebf97c2d2c0c95ed72f95865ae220c5542cdf9cead54e8c13f9301e3b396f6
+DIST boost_1_42_0.tar.bz2 33426755 SHA256 4b1eb95bd250ce15ac66435d6167f225b072b0d3a7eb72477a31847a9ca9e609 SHA512 f3edbe7c52f6da16ccdb29afdb016a4e5b2f1ffd1fb8c9fea6e27c4ead2da17ccc5e31e1b509e207473dbd095eef492a141ccad673e3ccfe6293f3dc786e1503 WHIRLPOOL 1a7ca29227e89ea68c24c3a2fba5095dd43a95f13b10da4f26c6ea8b033eafdb9a64d8aaecd8f4ce22e925f598bca6f4870ce2640b4c826c26056c950398db31
+DIST boost_1_45_0.tar.bz2 39330184 SHA256 55ed3ec51d5687e8224c988e22bef215dacce04e037d9f689569a80c4377a6d5 SHA512 835d4f8b02847a83d0acd35a8cab98ecf811ba2bc04a0f83349941d23071cd9ce3a92bcbb16474e98221b6b4aa8d9cfee4c4c28db303e4e64f234e421c962425 WHIRLPOOL 1e009cbe6ed29bbb17ab47d2eea8cf5c90f8933240c186e7f20565c50485c9edc6fea2310fe349e4b26d91ce026385339aab0a92d5501f6a67bf3c29163c63dd
+DIST boost_1_46_1.tar.bz2 42001335 SHA256 e1dfbf42b16e5015c46b98e9899c423ca4d04469cbeee05e43ea19236416d883 SHA512 e7cc4383bb960cb59eecd29ef66e2c53466fe5f126bde58f50ba104ee8ab220771db5f7b35e4b9856e9f257d1def5a9b7ea48e1d2757976a89c5a2e3f1fdc327 WHIRLPOOL 4d8d94821c996475ec2bab962b92ec061b890a318897cab695e66daef3f9c8687990450fb26fd783fd0c5be35ccb71616994ef0c8e41c555312ae5383e3649cf
+DIST boost_1_47_0.tar.bz2 45952657 SHA256 815a5d9faac4dbd523fbcf3fe1065e443c0bbf43427c44aa423422c6ec4c2e31 SHA512 ce7a1839edd2424f70e7109dc9f15900aceeba247cf73389a7301b8b769c426230c1d56a289746a35136ca19056a2de86d972c687b5069fe4678dfa5ad8d74b5 WHIRLPOOL 46ce4827719be5693ab1c2e70e62d1435c549b1ae3cf4d3c7208bf8a8c729a5c830350a53588acc85bdab0bba8a41304cf17cef6093c4ace56b2aa8e5cd7617b
+DIST boost_1_48_0.tar.bz2 48236989 SHA256 1bf254b2d69393ccd57a3cdd30a2f80318a005de8883a0792ed2f5e2598e5ada SHA512 f8188d65a47f1f6b34d154eb84ec3afb4ce8730fac0adc2bce629db4eb6994bb1192330b8e18a4d3509ff533a6f2bd91f59f4cb5d5c82b0453a99b2289c754e1 WHIRLPOOL a74ecca3fb611ebe7b3627aefe6a651ba2da8a8095ee1fa6e49b57fe6510cd947d81e5aea7ebb7523667a33aa9aa2783e182e39fc5f79f2bddc5faec80cff0e2
+DIST boost_1_49_0.tar.bz2 48499961 SHA256 dd748a7f5507a7e7af74f452e1c52a64e651ed1f7263fce438a06641d2180d3c SHA512 9f6198270659df112a57731afe31cbf1012d103ba36ed82f6c3f1bdc0185ddb89dcc42c5dfb9ee3f95973d52999aad6c7509dc61125420d45146e39ebf20219d WHIRLPOOL c049b4212307b0208d0b37ac870a7cfb8562d2b685ce505e1971af7bc68ae9746b06ea80ddc52599ed4cbd6dc3305b5f8051cd771387412aaa1d2f8e939a48ba
+DIST boost_1_50_0.tar.bz2 50786885 SHA256 c9ace2b8c81fa6703d1d17c7e478de3bc51101c5adbdeb3f6cb72cf3045a8529 SHA512 5909a2eca520a28af31de6a36c51f57b11fddcc0a51493a1e500ade00d9c4e78175c4892c04857ee385f3874f96e561b74b6427e1a155102e926421067d889fe WHIRLPOOL f5f5d9bc2e321da270dbaab04e0ec898240010720e77b362fac7266896a67b1eaa2e71a1d0e948057f55578dca5998e4faf8dc300e2c92608ee06316092bd08c
+EBUILD boost-1.35.0-r2.ebuild 7044 SHA256 4ba3c784bcf376934da015560896047753c1d855ced8389af0a05acf923566a3 SHA512 4c6aba43c3dbfaa856c948b7c138694e7d2c4a9181e8d12de144bdae80316fe9bb585211ce1867aeda08c64b5d187e9b700b61ee60599b2864fc1dde32d1b05d WHIRLPOOL 35f695700f5017a7368e89faf4d0f298c8139bf82e8b4ab677e38ea5ee6c7e4d1f2ef9ef46e9fcae722792900c61ebc82613b3cc4f576fb7192dc06e77896877
+EBUILD boost-1.35.0-r5.ebuild 9542 SHA256 d2d2da1df8fededcfff4e1950481f377dea9094ba3ae31bcc33b82bae8acd8d1 SHA512 a8aef40a9670686e99d484a4de52b357bf5ad5cfd58866236343dcfcfe14f4108e2f3de7f94ad793fd21d3c81a7a5b288e497c3edc3cd14bf0f55cd62d010fb2 WHIRLPOOL 8cff31104117ba012da613f509b3eab255630f04bd5323475ff1e8a3e96965c1e8c28e7af1bddf7211a523356b82b5b73de774c00301bbefbe1a9040b2ac580b
+EBUILD boost-1.37.0-r1.ebuild 13015 SHA256 13960c13c1a53ba4fe13694ed0a19672e1a341d2674966884f316acf84fed9f2 SHA512 88bc807f5952a79f502bb19f82f3d3b520295f29a321b5cf2c4b61896d8f4ee7197e10eb51e93a1ae98897179d6dc02db1cfee9218b4443e238a3020d10155a8 WHIRLPOOL 157098c9446d7e6a34529fcbd8db91eccfc38a9c4a8f3f663e340aadca759a5b01e76aedcf6df560df882c8a2955a5edf77930a4314d5ba51694ed6a602c8ec2
+EBUILD boost-1.39.0.ebuild 12823 SHA256 fbba447bf7a5161d593c43b7fe20243447d91f5e9127eb5272f54e856928afcd SHA512 8f8d06b27cc47beb3afd1c70910cc3219f4feb22bcd805dad4ad21f9590b7dc8e82413ee7994f3697ba5c3bb4b03da9e24f603687649cbe330bfdf0d8fcf2aaf WHIRLPOOL 96064358693b32fb93ea7fbe8c26f991ed5695f725cbfa31e5f27c38b12d274bdafd39304141dac1439ed9465ef84fab6efd83f02c870b18039b65f2b6f868c4
+EBUILD boost-1.41.0-r3.ebuild 15410 SHA256 0ece4586b3abba665d50da499b7d8a8a6c46625205b55cd08bd7377043f8c876 SHA512 a35114a7001f4dc54817a0b7cdffa2678901b74adac1f08cad7682c6269444bf5ce42124e1ccab131482f7fd8ee3088191b7a2b257a78dcdf1728e65a0ed051f WHIRLPOOL 28ffe5d09e93977397f68901df16ed6bed199c3a31dc9fbc3a6c32385701c461ff0291444c0bfae5394831b48cdb784483ba79d872d55ae363effa1904b98413
+EBUILD boost-1.42.0-r1.ebuild 16019 SHA256 ff35a765a6a6396fa99ff6d200be3e2ff92507431ab8538d9fb49aa117875fd0 SHA512 ab8705aa5e21cbb92020318dd4062f9b19a8fa24b6ae53e4b666b07d57393fa0e74c82ece9a5c9e8b1237ef5bef3208ebc2bd7d3a485aa95ab39d59a64a69776 WHIRLPOOL 21a97e89af4ba6c5d6b0c4b226b23eec4ba8f2c27ce8d46a312d82998e9a943fc545cfc877b1d4e1f942f053a71b8667cc93e15dac5a02b5f27657db01fabe9c
+EBUILD boost-1.42.0-r2.ebuild 16055 SHA256 3a08feb186339ba561e9b39a67f3e57503a91aad102c0035432afcc81ce1dddb SHA512 784bbcf3577003cea026c4adf1f5a330495951f3a2440311d42c46ff6cd2c9717d64c55f455b38dbdb25fdc8b111c2c301490cb4b53e07a8414ccfa7e9c46758 WHIRLPOOL 1df52a6d1d3458659c67616f1a0c7d63131281d2a1ddcac2bbaec1eeefd4fff05760e0aff3c108d699aa11e3f4028b9c43551693a6be6024258f5da48cbbcb93
+EBUILD boost-1.42.0.ebuild 15962 SHA256 e94acc42984ae3977d20627fbff76f61988904cc63cef7b95ba3ef604d2b444b SHA512 324bc6dfa5530bababdb7ef1da7110564afca62e61cefd029985cd62771ed77e8de2697edd4bd3dc0e4bc9d8698177f72c4abe3c37f3a10fab8fe491af0cf6a3 WHIRLPOOL 468e9eaa254dc10b00971c0ddd4fec4daaabdb5b6b6d7a006d4198dcff52bf01d5a7a16c8672b2aa2dfc53304022d2b08078d7eb8312e6dac3cae239566ae315
+EBUILD boost-1.45.0.ebuild 15793 SHA256 39b094accb2886d4c6a26b6db144c50ac2c5d1c72dc0dfe99f5e507f2974cee7 SHA512 894d57ec96b0143393f1082286a9e99b52c4d06d316b8c5fc5bbc63bfce8162648fc53229eeb36eaf120c34cc2df02e3b46893a5d160d2d8a2777db0e7df9f92 WHIRLPOOL 99f2400c0036da4eb5679df9d5cdd1997b645b8bb57cc7a0197d757bd79ef08030c2d14987865e9806eba2be2c17b20fdbab1da38bf8b89f96d155086346ed5a
+EBUILD boost-1.46.1-r1.ebuild 16224 SHA256 9d7726f12645e301fcc9174880e45e44c9d1ae19d7a338da0503ce388e08138b SHA512 bef793e7689e32566139ebbfe5e3c9fe14896674543107e2c1edb1dc467e61f3f65483fb10fd67db3523eee3163c441fd0caea2f48f6bdd6ebcf72fbdc152273 WHIRLPOOL 1d232360ed7a515a9324f297017b71508619c8232543b92c3739d1463085598321016df10f4d2311e88da2b8edca19f9f03cb18a521ae1b9364d65e4ec2045dc
+EBUILD boost-1.47.0-r1.ebuild 15910 SHA256 f29520bcbd74fa8d75acfc6a1cd7f30329b401cc35b1197e67fc6da39e14ac00 SHA512 def45bb3289e0e2676169edce1423840e310e0d6de5680099cbf3bfb6422b56e97bc57a04a730179b2d52b0ebf1a280ecc111b735851cb23d332f15ae2d1e83f WHIRLPOOL 58b926d3c34f116c252de63a6002ce29fa29c1ff58e0d86e3b25ad3900425841ffe23005a2ec092320acfd854831625a193f03bde675b72cc921b33c62a3efac
+EBUILD boost-1.47.0.ebuild 15907 SHA256 e79d396d32d06b5e3353664d3c95de05448b935d5a36a6df83d32b01047b7c46 SHA512 4ddc6f2cbac138e5f4a12359a945da7c70536d8580a2cddd5f0271d5a8de69080843eb9bc547f6726ca5016e01b504a175e1de55854074ff7c4131f5138eda95 WHIRLPOOL 86c566793087c5a4e3ceaa94744715bd118126019212ad4a0d596ec0373e3354e449272d5902a44d8a824d2ef1f738c17038e17bd69a33b07719475da688bb10
+EBUILD boost-1.48.0-r2.ebuild 19816 SHA256 091978c03cab0e7aec14e5d8b2497f8154f39a9d82c5ba46316843e7f54ff4cc SHA512 e13208a107284e6b02f1818c564b67473a3dcc92c9d8b7668151d9387b2f65e2e2deb399db5e3cd7e3d9af6f3fbe0db55422e5dc2c869c14a8c53d4d199a728e WHIRLPOOL 6ef132bcccd71363eaeb39b4c879e2e577d1dd61e339d14734d8f8d4fe7133c0d8e3952839a53c70c555c8c2498f95ee2a8c6243bb3f781ff886f64ef9f900af
+EBUILD boost-1.49.0-r1.ebuild 19773 SHA256 05b623588f09f19ba2ad66254d02c88614a39a5191d981d9b8745d8cf267fb7a SHA512 14768718e5dbda164300491a5d4a9e8d1286974a1e14c5ad653d40f37e7c482aacb56104d6040b6ce2f1347cc2da05563df93b87bb5c115736a98b49db64171a WHIRLPOOL 9011f2b8efcdf01c4668cd515d893460cf10e95af5a0c40fd66a53fec345763f855e6de682c41f278aa7e034885279d75da5fd84590438d9affe637e5a1f6504
+EBUILD boost-1.50.0-r2.ebuild 19122 SHA256 af8ea45685df83d4b0e32805d14d096ba8095c3e64ef05b20396bb9b3fda3791 SHA512 4d3f760e10e6bf6624d2c3b8fb16580b99bfa51a837b8a1e760d2b90df64908183ec26ed4a57e894af55465b69fcca226e9a8f39c76b0cc4f3d44302f1b1717a WHIRLPOOL ffba07badb6d11cc56dd2c28b16cecf13c29e642acfdfe4cc552da56d11beb804df195bc9a61d33bc0d2d92c7a84bf7f3ae6538c3654468ff63858393456c3b8
+EBUILD boost-1.50.0.ebuild 19776 SHA256 5784495e11e762df839067b6d34bdfc1b29da28e8909c93ca341a689b1c8bb45 SHA512 03c431a64dcb109b6c3ea3e33ca0bf7a7eaf9a848dc1148ae57a8f2e0aed186f67fa376f37c3c706e5b0a6908b1ced631f6d0aa87be581c1574f68675421fafc WHIRLPOOL d5037fca0172a70e55c35d812da36073fd2321c2caffccf00fac4e8cf8e4fd141ba30d79200f2fb394716d5bbe42613ed74df2f8e4bc0cc99c7a9be8b8127b94
+MISC ChangeLog 41440 SHA256 a65e581b240de71610cbc788e3e51af97d4d07765cb60ba2906fc035dff66ad7 SHA512 824fb73c4973a7049d48b060fb156b55989b0567a16f93eecec00c3b8068d9a86c71061d6d347df74507afa93bbf3fea2c71e57fbde40baae17fc8ed86acc5e7 WHIRLPOOL 24ad56108678a0ea9c004e56007f26fb3ea996b17f38588310affd51f741cb9249f3bc730ea314a65f3f1e0e2635eb2a986434f4f593f86679a388bdc8ed41a1
+MISC metadata.xml 800 SHA256 1548f999ea7e95dde34ab9f91a668268c9bd8609e761b2d88956a7af77f3b8d0 SHA512 a2e4693965189e90920cbced7dc066b7b58f5010c00fa4ac9db3f2c95a49bbdd65ce39a9c32394209e9e11259d3f1243c95a5d934dfd64eca4cd455040c35686 WHIRLPOOL a50e849d490475a4276593fecb274f55b1af18be0cc8a784b0f0459e180414afd056bf38f23e4136476ca5636df1ac1c4b7bf0eaae72c5c5bcb9054fe76e1515

diff --git a/dev-libs/boost/boost-1.35.0-r2.ebuild b/dev-libs/boost/boost-1.35.0-r2.ebuild
new file mode 100644
index 0000000..0961212
--- /dev/null
+++ b/dev-libs/boost/boost-1.35.0-r2.ebuild
@@ -0,0 +1,268 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.35.0-r2.ebuild,v 1.17 2012/06/06 20:29:00 jer Exp $
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 s390 sh sparc x86"
+
+MY_P=${PN}_$(replace_all_version_separators _)
+PATCHSET_VERSION="${PV}-3"
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2
+	mirror://gentoo/boost-patches-${PATCHSET_VERSION}.tbz2"
+LICENSE="Boost-1.0"
+SLOT="0"
+IUSE="debug doc expat icu mpi test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	expat? ( dev-libs/expat )
+	mpi? ( || ( sys-cluster/openmpi sys-cluster/mpich2 ) )
+	sys-libs/zlib
+	dev-lang/python"
+DEPEND="${RDEPEND}
+	=dev-util/boost-build-${PV}-r1"
+
+S=${WORKDIR}/${MY_P}
+
+# Maintainer Information
+# ToDo:
+# - write a patch to support /dev/urandom on FreeBSD and OSX (see below)
+
+pkg_setup() {
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+}
+
+src_unpack() {
+	unpack ${A}
+
+	cd "${S}"
+
+	EPATCH_SOURCE="${WORKDIR}/patches"
+	EPATCH_SUFFIX="patch"
+	epatch
+
+	# This enables building the boost.random library with /dev/urandom support
+	if ! use userland_Darwin ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+	fi
+}
+
+generate_options() {
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more information.
+
+	BUILDNAME="gentoorelease"
+	use debug && BUILDNAME="gentoodebug"
+
+	OPTIONS="${BUILDNAME}"
+
+	use icu && OPTIONS="${OPTIONS} -sICU_PATH=/usr"
+	if use expat ; then
+		OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
+	fi
+
+	if ! use mpi ; then
+		OPTIONS="${OPTIONS} --without-mpi"
+	fi
+
+	OPTIONS="${OPTIONS} --user-config=${S}/user-config.jam --boost-build=/usr/share/boost-build"
+}
+
+generate_userconfig() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+		append-ldflags -ldl
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none <debug-symbols>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+using python : $(python_get_version) : /usr : $(python_get_includedir) : $(python_get_libdir) ;
+
+__EOF__
+
+	if use mpi ; then
+		echo "using mpi ;" >> "${S}/user-config.jam"
+	fi
+}
+
+src_compile() {
+
+	NUMJOBS=$(sed -e 's/.*\(\-j[ 0-9]\+\) .*/\1/' <<< ${MAKEOPTS})
+
+	generate_userconfig
+	generate_options
+
+	elog "Using the following options to build: "
+	elog "  ${OPTIONS}"
+
+	export BOOST_ROOT=${S}
+
+	bjam ${NUMJOBS} -q \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared,static \
+		--prefix="${D}/usr" \
+		--layout=system \
+		|| die "building boost failed"
+
+	if use tools; then
+		cd "${S}/tools/"
+		# We have to set optimization to -O0 or -O1 to work around a gcc-bug
+		# optimization=off adds -O0 to the compiler call and overwrites our settings.
+		bjam ${NUMJOBS} -q \
+			${OPTIONS} \
+			--prefix="${D}/usr" \
+			--layout=system \
+			|| die "building tools failed"
+	fi
+}
+
+src_install () {
+
+	generate_options
+
+	export BOOST_ROOT=${S}
+
+	bjam -q \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared,static \
+		--prefix="${D}/usr" \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		--layout=system \
+		install || die "install failed for options '${OPTIONS}'"
+
+	# Move the mpi.so to the right place
+	if use mpi; then
+		mkdir -p "${D}$(python_get_sitedir)"
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)"
+	fi
+
+	if use doc ; then
+		find libs -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	cd "${D}/usr/$(get_libdir)"
+
+	# If built with debug enabled, all libraries get a 'd' postfix,
+	# this breaks linking other apps against boost (bug #181972)
+	if use debug ; then
+		for lib in $(ls -1 libboost_*) ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-d\././' -e 's/d\././' <<< ${lib})"
+		done
+	fi
+
+	for lib in $(ls -1 libboost_thread-mt.*) ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	if use tools; then
+		cd "${S}/dist"
+		dobin bin/*
+		insinto /usr
+		doins -r share
+	fi
+
+	cd "${S}/status"
+	if [ -f regress.log ]; then
+		docinto status
+		dohtml *.{html,gif} ../boost.png
+		dodoc regress.log
+	fi
+}
+
+src_test() {
+	generate_options
+
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build"
+	bjam -q \
+		${OPTIONS} \
+		--prefix="${D}/usr" \
+		--layout=system \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status"
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	bjam \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/${BUILDNAME}/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/${BUILDNAME}/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|../boost.png|boost.png|' *.html
+}

diff --git a/dev-libs/boost/boost-1.35.0-r5.ebuild b/dev-libs/boost/boost-1.35.0-r5.ebuild
new file mode 100644
index 0000000..9523459
--- /dev/null
+++ b/dev-libs/boost/boost-1.35.0-r5.ebuild
@@ -0,0 +1,334 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.35.0-r5.ebuild,v 1.18 2012/06/06 20:29:00 jer Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs eutils
+
+KEYWORDS="alpha amd64 arm ia64 ~mips ppc ~ppc64 s390 sh sparc x86"
+
+MY_P=${PN}_$(replace_all_version_separators _)
+PATCHSET_VERSION="${PV}-5"
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2
+	mirror://gentoo/boost-patches-${PATCHSET_VERSION}.tbz2
+	http://www.gentoo.org/~dev-zero/distfiles/boost-patches-${PATCHSET_VERSION}.tbz2"
+LICENSE="Boost-1.0"
+SLOT="0"
+IUSE="doc +eselect expat icu mpi python test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	expat? ( dev-libs/expat )
+	mpi? ( sys-cluster/openmpi[cxx] )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	>=dev-util/boost-build-1.35.0-r2:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+# Maintainer Information
+# ToDo:
+# - write a patch to support /dev/urandom on FreeBSD and OSX (see below)
+
+# manually setting it for this major version
+MAJOR_PV=1_35
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/1.35/default"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/1.35/${2}"
+	fi
+}
+
+pkg_setup() {
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+}
+
+src_prepare() {
+	EPATCH_SOURCE="${WORKDIR}/patches"
+	EPATCH_SUFFIX="patch"
+	epatch
+
+	epatch \
+		"${FILESDIR}/remove_toolset_from_targetname.patch"
+
+	# This enables building the boost.random library with /dev/urandom support
+	if ! use userland_Darwin ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+	fi
+
+	epatch "${FILESDIR}/1.35-remove-hardlink-creation.patch"
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+		append-ldflags -ldl
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Huge number of strict-aliasing warnings cause a build failure w/ >= GCC 4.4 bug #252287
+	[[ $(gcc-version) > 4.3 ]] && append-flags -Wno-strict-aliasing
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use expat && OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	OPTIONS="${OPTIONS} --user-config=${S}/user-config.jam --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=${D}/usr --layout=versioned"
+
+}
+
+src_compile() {
+
+	NUMJOBS=$(sed -e 's/.*\(\-j[ 0-9]\+\) .*/\1/; s/--jobs=\?/-j/' <<< ${MAKEOPTS})
+
+	einfo "Using the following options to build: "
+	einfo "  ${OPTIONS}"
+
+	export BOOST_ROOT="${S}"
+
+	${BJAM} ${NUMJOBS} -q \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared,static \
+		|| die "building boost failed"
+
+	if use tools; then
+		cd "${S}/tools/"
+		${BJAM} ${NUMJOBS} -q \
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	einfo "Using the following options to install: "
+	einfo "  ${OPTIONS}"
+
+	export BOOST_ROOT="${S}"
+
+	${BJAM} -q \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared,static \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python*
+
+	dodir /usr/share/boost-eselect/profiles/1.35
+	touch "${D}/usr/share/boost-eselect/profiles/1.35/default"
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}"
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/"
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py"
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	cd "${D}/usr/$(get_libdir)"
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 *.{a,so} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}"
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+	for lib in libboost_thread-mt-${MAJOR_PV}{.a,.so} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		for lib in libboost_mpi-mt-${MAJOR_PV}{.a,.so} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	for f in libboost_*.{a,so} ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin"
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist"
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}"
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status"
+	if [ -f regress.log ] ; then
+		docinto status
+		dohtml *.{html,gif} ../boost.png
+		dodoc regress.log
+	fi
+
+	use python && python_need_rebuild
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build"
+	${BJAM} -q \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status"
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|../boost.png|boost.png|' *.html
+}
+
+pkg_postinst() {
+	use eselect && eselect boost update
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update
+	fi
+}

diff --git a/dev-libs/boost/boost-1.37.0-r1.ebuild b/dev-libs/boost/boost-1.37.0-r1.ebuild
new file mode 100644
index 0000000..932e93c
--- /dev/null
+++ b/dev-libs/boost/boost-1.37.0-r1.ebuild
@@ -0,0 +1,428 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.37.0-r1.ebuild,v 1.17 2011/04/05 05:23:28 ulm Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+MY_P=${PN}_$(replace_all_version_separators _)
+PATCHSET_VERSION="${PV}-1"
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2
+	mirror://gentoo/boost-patches-${PATCHSET_VERSION}.tbz2
+	http://www.gentoo.org/~dev-zero/distfiles/boost-patches-${PATCHSET_VERSION}.tbz2"
+LICENSE="Boost-1.0"
+SLOT="1.37"
+IUSE="debug doc +eselect expat icu mpi python test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	expat? ( dev-libs/expat )
+	mpi? ( sys-cluster/openmpi[cxx] )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+# Maintainer Information
+# ToDo:
+# - write a patch to support /dev/urandom on FreeBSD and OSX (see below)
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	EPATCH_SOURCE="${WORKDIR}/patches"
+	EPATCH_SUFFIX="patch"
+	epatch
+
+	epatch \
+		"${FILESDIR}/remove_toolset_from_targetname.patch" \
+		"${FILESDIR}/buildid-fix.patch" \
+		"${FILESDIR}"/${P}-darwin-long-double.patch
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+		# yeah, we WANT it to work on non-Linux too
+		sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Huge number of strict-aliasing warnings cause a build failure w/ >= GCC 4.4 bug #252287
+	[[ $(gcc-version) > 4.3 ]] && append-flags -Wno-strict-aliasing
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use expat && OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	OPTIONS="${OPTIONS} --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+}
+
+src_compile() {
+
+	NUMJOBS=$(sed -e 's/.*\(\-j[ 0-9]\+\) .*/\1/; s/--jobs=\?/-j/' <<< ${MAKEOPTS})
+
+	einfo "Using the following options to build: "
+	einfo "  ${OPTIONS}"
+
+	export BOOST_ROOT="${S}"
+
+	${BJAM} ${NUMJOBS} -q \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared,static \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		${BJAM} ${NUMJOBS} -q \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi link=shared,static runtime-link=shared,static \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		${BJAM} ${NUMJOBS} -q \
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	einfo "Using the following options to install: "
+	einfo "  ${OPTIONS}"
+
+	export BOOST_ROOT="${S}"
+
+	${BJAM} -q \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared,static \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		${BJAM} -q \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi link=shared,static runtime-link=shared,static \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python*
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT}
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+	use debug && touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}"
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/"
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py"
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	cd "${D}/usr/$(get_libdir)"
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 *{.a,$(get_libname)} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}"
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+	for lib in libboost_thread-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		for lib in libboost_mpi-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug ; then
+		for lib in libboost_thread-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi ; then
+			for lib in libboost_mpi-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 *{.a,$(get_libname)} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		for f in $(ls -1 *{.a,$(get_libname)} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin"
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist"
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}"
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status"
+	if [ -f regress.log ] ; then
+		docinto status
+		dohtml *.{html,gif} ../boost.png
+		dodoc regress.log
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build"
+	${BJAM} -q \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status"
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html
+}
+
+pkg_postinst() {
+	use eselect && eselect boost update
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update
+	fi
+}

diff --git a/dev-libs/boost/boost-1.39.0.ebuild b/dev-libs/boost/boost-1.39.0.ebuild
new file mode 100644
index 0000000..aef488d
--- /dev/null
+++ b/dev-libs/boost/boost-1.39.0.ebuild
@@ -0,0 +1,422 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.39.0.ebuild,v 1.11 2011/04/05 05:23:28 ulm Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+MY_P=${PN}_$(replace_all_version_separators _)
+PATCHSET_VERSION="${PV}-1"
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2
+	mirror://gentoo/boost-patches-${PATCHSET_VERSION}.tbz2
+	http://www.gentoo.org/~dev-zero/distfiles/boost-patches-${PATCHSET_VERSION}.tbz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect expat icu mpi python test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	expat? ( dev-libs/expat )
+	mpi? ( sys-cluster/openmpi[cxx] )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	EPATCH_SOURCE="${WORKDIR}/patches"
+	EPATCH_SUFFIX="patch"
+	epatch
+
+	epatch \
+		"${FILESDIR}/remove_toolset_from_targetname.patch"
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+		# yeah, we WANT it to work on non-Linux too
+		sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Huge number of strict-aliasing warnings cause a build failure w/ >= GCC 4.4 bug #252287
+	[[ $(gcc-version) > 4.3 ]] && append-flags -Wno-strict-aliasing
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use expat && OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	OPTIONS="${OPTIONS} --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+}
+
+src_compile() {
+
+	NUMJOBS=$(sed -e 's/.*\(\-j[ 0-9]\+\) .*/\1/; s/--jobs=\?/-j/' <<< ${MAKEOPTS})
+
+	einfo "Using the following options to build: "
+	einfo "  ${OPTIONS}"
+
+	export BOOST_ROOT="${S}"
+
+	${BJAM} ${NUMJOBS} -q \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		${BJAM} ${NUMJOBS} -q \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi link=shared,static runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		${BJAM} ${NUMJOBS} -q \
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	einfo "Using the following options to install: "
+	einfo "  ${OPTIONS}"
+
+	export BOOST_ROOT="${S}"
+
+	${BJAM} -q \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		${BJAM} -q \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi link=shared,static runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python*
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT}
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+	use debug && touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}"
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/"
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py"
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	cd "${D}/usr/$(get_libdir)"
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 *{.a,$(get_libname)} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}"
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+	for lib in libboost_thread-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		for lib in libboost_mpi-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug ; then
+		for lib in libboost_thread-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi ; then
+			for lib in libboost_mpi-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 *{.a,$(get_libname)} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		for f in $(ls -1 *{.a,$(get_libname)} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin"
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist"
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}"
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status"
+	if [ -f regress.log ] ; then
+		docinto status
+		dohtml *.{html,gif} ../boost.png
+		dodoc regress.log
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build"
+	${BJAM} -q \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status"
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html
+}
+
+pkg_postinst() {
+	use eselect && eselect boost update
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update
+	fi
+}

diff --git a/dev-libs/boost/boost-1.41.0-r3.ebuild b/dev-libs/boost/boost-1.41.0-r3.ebuild
new file mode 100644
index 0000000..9935dc9
--- /dev/null
+++ b/dev-libs/boost/boost-1.41.0-r3.ebuild
@@ -0,0 +1,473 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.41.0-r3.ebuild,v 1.14 2011/07/15 16:27:59 mattst88 Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect expat icu mpi python test tools"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	expat? ( dev-libs/expat )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+
+	 # bug 291660
+	epatch "${FILESDIR}/boost-${PV}-parameter-needs-python.patch"
+
+	# http://thread.gmane.org/gmane.comp.lib.boost.devel/196471
+	epatch "${FILESDIR}/boost-${PV}-mpi_process_group-missing-include.patch"
+
+	# https://svn.boost.org/trac/boost/ticket/3010
+	epatch "${FILESDIR}/boost-${PV}-iostreams-missing-include-guard.patch"
+
+	# bug 297163
+	# https://svn.boost.org/trac/boost/ticket/3352
+	epatch "${FILESDIR}/boost-${PV}-fix-CRC-on-x64-during-gzip-decompression.patch"
+
+	# bug 297500
+	# https://svn.boost.org/trac/boost/ticket/3724
+	epatch "${FILESDIR}/boost-${PV}-spirit-fixed-include-guard-conflict.patch"
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+		# yeah, we WANT it to work on non-Linux too
+		sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use expat && OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi link=shared,static runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi link=shared,static runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi link=shared,static runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi link=shared,static runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi link=shared,static runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi link=shared,static runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi link=shared,static runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python*
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT}
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+	use debug && touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}"
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/"
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py"
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	cd "${D}/usr/$(get_libdir)"
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 *{.a,$(get_libname)} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}"
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+	for lib in libboost_thread-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		for lib in libboost_mpi-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug ; then
+		for lib in libboost_thread-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi ; then
+			for lib in libboost_mpi-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 *{.a,$(get_libname)} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		for f in $(ls -1 *{.a,$(get_libname)} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin"
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist"
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}"
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status"
+	if [ -f regress.log ] ; then
+		docinto status
+		dohtml *.html ../boost.png
+		dodoc regress.log
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build"
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status"
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update
+	fi
+}

diff --git a/dev-libs/boost/boost-1.42.0-r1.ebuild b/dev-libs/boost/boost-1.42.0-r1.ebuild
new file mode 100644
index 0000000..5584483
--- /dev/null
+++ b/dev-libs/boost/boost-1.42.0-r1.ebuild
@@ -0,0 +1,491 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.42.0-r1.ebuild,v 1.4 2011/07/15 16:27:59 mattst88 Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+
+	 # bug 291660
+	epatch "${FILESDIR}/boost-${PV}-parameter-needs-python.patch"
+	epatch "${FILESDIR}"/${P}-template_arity-gcc45.patch
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+		# yeah, we WANT it to work on non-Linux too
+		sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.42.0-r2.ebuild b/dev-libs/boost/boost-1.42.0-r2.ebuild
new file mode 100644
index 0000000..0603f5a
--- /dev/null
+++ b/dev-libs/boost/boost-1.42.0-r2.ebuild
@@ -0,0 +1,492 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.42.0-r2.ebuild,v 1.12 2011/07/15 16:27:59 mattst88 Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+
+	 # bug 291660
+	epatch "${FILESDIR}/boost-${PV}-parameter-needs-python.patch"
+	epatch "${FILESDIR}"/${P}-template_arity-gcc45.patch
+	epatch "${FILESDIR}"/${P}-gcc45-python.patch
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+		# yeah, we WANT it to work on non-Linux too
+		sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.42.0.ebuild b/dev-libs/boost/boost-1.42.0.ebuild
new file mode 100644
index 0000000..aa9035a
--- /dev/null
+++ b/dev-libs/boost/boost-1.42.0.ebuild
@@ -0,0 +1,490 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.42.0.ebuild,v 1.6 2011/07/15 16:27:59 mattst88 Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="1024"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+
+	 # bug 291660
+	epatch "${FILESDIR}/boost-${PV}-parameter-needs-python.patch"
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
+		# yeah, we WANT it to work on non-Linux too
+		sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc more people wiki || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.45.0.ebuild b/dev-libs/boost/boost-1.45.0.ebuild
new file mode 100644
index 0000000..1d4a79b
--- /dev/null
+++ b/dev-libs/boost/boost-1.45.0.ebuild
@@ -0,0 +1,486 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.45.0.ebuild,v 1.8 2012/01/08 11:42:28 hwoarang Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="15G"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+	epatch "${FILESDIR}/${P}-lambda_bind.patch"
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build
+		cp "${FILESDIR}/random-Jamfile-${PV}" libs/random/build/Jamfile.v2
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.46.1-r1.ebuild b/dev-libs/boost/boost-1.46.1-r1.ebuild
new file mode 100644
index 0000000..985602f
--- /dev/null
+++ b/dev-libs/boost/boost-1.46.1-r1.ebuild
@@ -0,0 +1,495 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.46.1-r1.ebuild,v 1.7 2012/01/08 11:42:28 hwoarang Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="bjam-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="15G"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+	epatch "${FILESDIR}/${PN}-1.45.0-lambda_bind.patch"
+
+	# Compile against python 3.2. Bug #367245
+	epatch "${FILESDIR}"/${P}-python32.patch
+
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build || die
+		cp "${FILESDIR}/random-Jamfile-${PV}" libs/random/build/Jamfile.v2 || die
+	fi
+
+	# Ensure that the include dir and the libraries always have X_Y in their name if the boost version is X.Y.Z.
+	# By default the build system changes this to X_Y_Z if Z > 0, which breaks eselect-boost and some ebuilds.
+	epatch "${FILESDIR}/point_release_naming_fix.patch"
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use icu || OPTIONS="--disable-icu"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+		doins -r more || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.47.0-r1.ebuild b/dev-libs/boost/boost-1.47.0-r1.ebuild
new file mode 100644
index 0000000..a22644a
--- /dev/null
+++ b/dev-libs/boost/boost-1.47.0-r1.ebuild
@@ -0,0 +1,487 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.47.0-r1.ebuild,v 1.2 2012/01/08 11:42:28 hwoarang Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="b2-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="15G"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+	epatch "${FILESDIR}/${P}-exceptions.patch"
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build || die
+		cp "${FILESDIR}/random-Jamfile-${PV}" libs/random/build/Jamfile.v2 || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use icu || OPTIONS="--disable-icu"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor and libboost_exception
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+		doins -r more || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.47.0.ebuild b/dev-libs/boost/boost-1.47.0.ebuild
new file mode 100644
index 0000000..5f2eebf
--- /dev/null
+++ b/dev-libs/boost/boost-1.47.0.ebuild
@@ -0,0 +1,487 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.47.0.ebuild,v 1.3 2012/01/08 11:42:28 hwoarang Exp $
+
+EAPI="2"
+
+inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	python? ( dev-lang/python )
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.3"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="b2-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [ -z "$2" ] ; then
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
+		use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
+	else
+		echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+pkg_setup() {
+	# It doesn't compile with USE="python mpi" and python-3 (bug 295705)
+	if use python && use mpi ; then
+		if [[ "$(python_get_version --major)" != "2" ]]; then
+			eerror "The Boost.MPI python bindings do not support any other python version"
+			eerror "than 2.x. Please either use eselect to select a python 2.x version or"
+			eerror "disable the python and/or mpi use flag for =${CATEGORY}/${PF}."
+			die "unsupported python version"
+		fi
+	fi
+
+	if use test ; then
+		CHECKREQS_DISK_BUILD="15G"
+		check_reqs
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler/-version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+		ebeep 5
+
+	fi
+
+	if use debug ; then
+		ewarn "The debug USE-flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug-symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+	epatch "${FILESDIR}/${P}-exceptions.patch"
+	# This enables building the boost.random library with /dev/urandom support
+	if [[ -e /dev/urandom ]] ; then
+		mkdir -p libs/random/build || die
+		cp "${FILESDIR}/random-Jamfile-${PV}" libs/random/build/Jamfile.v2 || die
+	fi
+}
+
+src_configure() {
+	einfo "Writing new user-config.jam"
+
+	local compiler compilerVersion compilerExecutable mpi
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		compiler=darwin
+		compilerVersion=$(gcc-fullversion)
+		compilerExecutable=$(tc-getCXX)
+		# we need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation
+		append-ldflags -Wl,-headerpad_max_install_names
+	else
+		compiler=gcc
+		compilerVersion=$(gcc-version)
+		compilerExecutable=$(tc-getCXX)
+	fi
+
+	# Using -fno-strict-aliasing to prevent possible creation of invalid code.
+	append-flags -fno-strict-aliasing
+
+	# bug 298489
+	if use ppc || use ppc64 ; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi;
+
+	use mpi && mpi="using mpi ;"
+
+	if use python ; then
+		pystring="using python : $(python_get_version) : /usr :	$(python_get_includedir) : $(python_get_libdir) ;"
+	fi
+
+	cat > "${S}/user-config.jam" << __EOF__
+
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+${pystring}
+
+${mpi}
+
+__EOF__
+
+	# Maintainer information:
+	# The debug-symbols=none and optimization=none
+	# are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our
+	# CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add
+	# "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild
+	# for more infomration.
+
+	use icu && OPTIONS="-sICU_PATH=/usr"
+	use icu || OPTIONS="--disable-icu"
+	use mpi || OPTIONS="${OPTIONS} --without-mpi"
+	use python || OPTIONS="${OPTIONS} --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS="${OPTIONS} --disable-long-double"
+	fi
+
+	OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
+
+	if use static-libs ; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		#there is no dynamicly linked version of libboost_test_exec_monitor and libboost_exception
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
+
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to build: "
+	einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
+
+	${BJAM} ${NUMJOBS} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		|| die "building boost failed"
+
+	# ... and do the whole thing one more time to get the debug libs
+	if use debug ; then
+		einfo "Using the following command to build: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--buildid=debug \
+			|| die "building boost failed"
+	fi
+
+	if use tools; then
+		cd "${S}/tools/"
+		einfo "Using the following command to build the tools: "
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			${OPTIONS} \
+			|| die "building tools failed"
+	fi
+
+}
+
+src_install () {
+	export BOOST_ROOT="${S}"
+
+	einfo "Using the following command to install: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" install"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		threading=single,multi ${LINK_OPTS} runtime-link=shared \
+		--includedir="${D}/usr/include" \
+		--libdir="${D}/usr/$(get_libdir)" \
+		install || die "install failed for options '${OPTIONS}'"
+
+	if use debug ; then
+		einfo "Using the following command to install: "
+		einfo "${BJAM} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}/usr/include\" --libdir=\"${D}/usr/$(get_libdir)\" --buildid=debug"
+
+		${BJAM} -q -d+2 \
+			gentoodebug \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}/usr/include" \
+			--libdir="${D}/usr/$(get_libdir)" \
+			--buildid=debug \
+			install || die "install failed for options '${OPTIONS}'"
+	fi
+
+	use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	dodir /usr/share/boost-eselect/profiles/${SLOT} || die
+	touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug ; then
+		 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	# Move the mpi.so to the right place and make sure it's slotted
+	if use mpi && use python; then
+		mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+		mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
+		touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+		_add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
+	fi
+
+	if use doc ; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc || die
+		dohtml \
+			-A pdf,txt \
+			-r tools || die
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs || die
+		doins -r more || die
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt || die
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
+	fi
+
+	cd "${D}/usr/$(get_libdir)" || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
+		if [ ! -h "${f}" ] ; then
+			eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
+			die "slotting/naming of the libs broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs ; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	for lib in ${THREAD_LIBS} ; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+	done
+
+	# The same goes for the mpi libs
+	if use mpi ; then
+		if use static-libs ; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		for lib in ${MPI_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+	fi
+
+	if use debug ; then
+		if use static-libs ; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		for lib in ${THREAD_DEBUG_LIBS} ; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+		done
+
+		if use mpi ; then
+			if use static-libs ; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			for lib in ${MPI_DEBUG_LIBS} ; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
+
+	_add_line "libs=\"" default
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug ; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	if use tools; then
+		cd "${S}/dist/bin" || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		for b in * ; do
+			newbin "${b}" "${b}-${MAJOR_PV}" || die
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+
+		cd "${S}/dist" || die
+		insinto /usr/share || die
+		doins -r share/boostbook || die
+		# Append version postfix for slotting
+		mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+	fi
+
+	cd "${S}/status" || die
+	if [ -f regress.log ] ; then
+		docinto status || die
+		dohtml *.html ../boost.png || die
+		dodoc regress.log || die
+	fi
+
+	use python && python_need_rebuild
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		einfo "Working around completely broken build-system(tm)"
+		for d in "${ED}"usr/lib/*.dylib ; do
+			if [[ -f ${d} ]] ; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				for r in ${refs} ; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	export BOOST_ROOT=${S}
+
+	cd "${S}/tools/regression/build" || die
+	einfo "Using the following command to build test helpers: "
+	einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
+
+	${BJAM} -q -d+2 \
+		gentoorelease \
+		${OPTIONS} \
+		process_jam_log compiler_status \
+		|| die "building regression test helpers failed"
+
+	cd "${S}/status" || die
+
+	# Some of the test-checks seem to rely on regexps
+	export LC_ALL="C"
+
+	# The following is largely taken from tools/regression/run_tests.sh,
+	# but adapted to our needs.
+
+	# Run the tests & write them into a file for postprocessing
+	einfo "Using the following command to test: "
+	einfo "${BJAM} ${OPTIONS} --dump-tests"
+
+	${BJAM} \
+		${OPTIONS} \
+		--dump-tests 2>&1 | tee regress.log || die
+
+	# Postprocessing
+	cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
+	if test $? != 0 ; then
+		die "Postprocessing the build log failed"
+	fi
+
+	cat > "${S}/status/comment.html" <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+	# Generate the build log html summary page
+	"${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
+		--comment "${S}/status/comment.html" "${S}" \
+		cs-$(uname).html cs-$(uname)-links.html
+	if test $? != 0 ; then
+		die "Generating the build log html summary page failed"
+	fi
+
+	# And do some cosmetic fixes :)
+	sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+}
+
+pkg_postinst() {
+	if use eselect ; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.48.0-r2.ebuild b/dev-libs/boost/boost-1.48.0-r2.ebuild
new file mode 100644
index 0000000..d50f3be
--- /dev/null
+++ b/dev-libs/boost/boost-1.48.0-r2.ebuild
@@ -0,0 +1,615 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.48.0-r2.ebuild,v 1.8 2012/08/04 13:39:55 hwoarang Exp $
+
+EAPI="4-slot-abi"
+PYTHON_DEPEND="python? *"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
+
+inherit check-reqs flag-o-matic multilib python toolchain-funcs versionator
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.4"
+DEPEND="${RDEPEND}
+	>=dev-util/boost-build-1.48.0-r1:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="b2-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [[ -z "$2" ]]; then
+		echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/default"
+		if use debug; then
+			echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/debug"
+		fi
+	else
+		echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+create_user-config.jam() {
+	local compiler compiler_version compiler_executable
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		compiler="darwin"
+		compiler_version="$(gcc-fullversion)"
+		compiler_executable="$(tc-getCXX)"
+	else
+		compiler="gcc"
+		compiler_version="$(gcc-version)"
+		compiler_executable="$(tc-getCXX)"
+	fi
+	local mpi_configuration python_configuration
+
+	if use mpi; then
+		mpi_configuration="using mpi ;"
+	fi
+
+	if use python; then
+		python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;"
+	fi
+
+	# The debug-symbols=none and optimization=none are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our CFLAGS/CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild for more information.
+	cat > user-config.jam << __EOF__
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+${mpi_configuration}
+${python_configuration}
+__EOF__
+}
+
+pkg_pretend() {
+	if use test; then
+		CHECKREQS_DISK_BUILD="15G" check-reqs_pkg_pretend
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+	fi
+}
+
+pkg_setup() {
+	if use python; then
+		python_pkg_setup
+	fi
+
+	if use debug; then
+		ewarn "The debug USE flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/${P}-BOOST_FOREACH.patch"
+	epatch "${FILESDIR}/${P}-mpi_python3.patch"
+	epatch "${FILESDIR}/${P}-respect_python-buildid.patch"
+	epatch "${FILESDIR}/${P}-support_dots_in_python-buildid.patch"
+	epatch "${FILESDIR}/${P}-no_strict_aliasing_python2.patch"
+	epatch "${FILESDIR}/${P}-disable_libboost_python3.patch"
+	epatch "${FILESDIR}/${P}-python_linking.patch"
+	epatch "${FILESDIR}/${P}-disable_icu_rpath.patch"
+	epatch "${FILESDIR}/remove-toolset-${PV}.patch"
+	epatch "${FILESDIR}/${P}-gcc47.patch"
+}
+
+src_configure() {
+	OPTIONS=""
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		# We need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation.
+		append-ldflags -Wl,-headerpad_max_install_names
+	fi
+
+	# bug 298489
+	if use ppc || use ppc64; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi
+
+	use icu && OPTIONS+=" -sICU_PATH=/usr"
+	use icu || OPTIONS+=" --disable-icu boost.locale.icu=off"
+	use mpi || OPTIONS+=" --without-mpi"
+	use python || OPTIONS+=" --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS+=" --disable-long-double"
+	fi
+
+	OPTIONS+=" pch=off --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}usr\" --layout=versioned"
+
+	if use static-libs; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		# There is no dynamically linked version of libboost_test_exec_monitor and libboost_exception.
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	local jobs
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi
+
+	export BOOST_ROOT="${S}"
+	PYTHON_DIRS=""
+	MPI_PYTHON_MODULE=""
+
+	building() {
+		create_user-config.jam
+
+		einfo "Using the following command to build:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			|| die "Building of Boost libraries failed"
+
+		# ... and do the whole thing one more time to get the debug libs
+		if use debug; then
+			einfo "Using the following command to build:"
+			einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} ${NUMJOBS} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} \
+				threading=single,multi ${LINK_OPTS} runtime-link=shared \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				|| die "Building of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			if [[ -z "${PYTHON_DIRS}" ]]; then
+				PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
+			else
+				if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
+					die "Inconsistent structure of build directories"
+				fi
+			fi
+
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed"
+			done
+
+			if use mpi; then
+				if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
+					MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)"
+					if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
+						die "Multiple mpi.so files found"
+					fi
+				else
+					if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)" ]]; then
+						die "Inconsistent structure of build directories"
+					fi
+				fi
+
+				mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function building
+	else
+		building
+	fi
+
+	if use tools; then
+		pushd tools > /dev/null || die
+		einfo "Using the following command to build the tools:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=../user-config.jam ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			|| die "Building of Boost tools failed"
+		popd > /dev/null || die
+	fi
+}
+
+src_install () {
+	dodir /usr/share/boost-eselect/profiles/${SLOT}
+	touch "${D}usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug; then
+		 touch "${D}usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	if use mpi && use python; then
+		_add_line "python_modules=\""
+	fi
+
+	installation() {
+		create_user-config.jam
+
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		einfo "Using the following command to install:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" $(use python && echo --python-buildid=${PYTHON_ABI}) install"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}usr/include" \
+			--libdir="${D}usr/$(get_libdir)" \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			install || die "Installation of Boost libraries failed"
+
+		if use debug; then
+			einfo "Using the following command to install:"
+			einfo "${BJAM} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} \
+				threading=single,multi ${LINK_OPTS} runtime-link=shared \
+				--includedir="${D}usr/include" \
+				--libdir="${D}usr/$(get_libdir)" \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				install || die "Installation of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+
+			# Move mpi.so Python module to Python site-packages directory and make sure it is slotted.
+			if use mpi; then
+				mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				cat << EOF > "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+import sys
+if sys.platform.startswith('linux'):
+	import DLFCN
+	flags = sys.getdlopenflags()
+	sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
+	from . import mpi
+	sys.setdlopenflags(flags)
+	del DLFCN, flags
+else:
+	from . import mpi
+del sys
+EOF
+				_add_line "$(python_get_sitedir)/mpi.py:boost_${MAJOR_PV}.mpi"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function installation
+	else
+		installation
+	fi
+
+	if use mpi && use python; then
+		_add_line "\""
+	fi
+
+	use python || rm -rf "${D}usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	if use doc; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+		doins -r more
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	pushd "${D}usr/$(get_libdir)" > /dev/null || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}"); do
+		if [[ ! -h "${f}" ]]; then
+			eerror "Tried to remove '${f}' which is a regular file instead of a symlink"
+			die "Slotting/naming of the libraries broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	local lib
+	for lib in ${THREAD_LIBS}; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi; then
+		if use static-libs; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		local lib
+		for lib in ${MPI_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug; then
+		if use static-libs; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		local lib
+		for lib in ${THREAD_DEBUG_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi; then
+			if use static-libs; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			local lib
+			for lib in ${MPI_DEBUG_LIBS}; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug); do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		local f
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug); do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	popd > /dev/null || die
+
+	if use tools; then
+		pushd dist/bin > /dev/null || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		local b
+		for b in *; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+		popd > /dev/null || die
+
+		pushd dist > /dev/null || die
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}usr/share/boostbook" "${D}usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+		popd > /dev/null || die
+	fi
+
+	pushd status > /dev/null || die
+	if [[ -f regress.log ]]; then
+		docinto status
+		dohtml *.html ../boost.png
+		dodoc regress.log
+	fi
+	popd > /dev/null || die
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	if [[ ${CHOST} == *-darwin* ]]; then
+		einfo "Working around completely broken build-system(tm)"
+		local d
+		for d in "${ED}"usr/lib/*.dylib; do
+			if [[ -f ${d} ]]; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				local r
+				for r in ${refs}; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	testing() {
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		pushd tools/regression/build > /dev/null || die
+		einfo "Using the following command to build test helpers:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=../../../user-config.jam ${OPTIONS} process_jam_log compiler_status"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=../../../user-config.jam \
+			${OPTIONS} \
+			process_jam_log compiler_status \
+			|| die "Building of regression test helpers failed"
+
+		popd > /dev/null || die
+		pushd status > /dev/null || die
+
+		# Some of the test-checks seem to rely on regexps
+		export LC_ALL="C"
+
+		# The following is largely taken from tools/regression/run_tests.sh,
+		# but adapted to our needs.
+
+		# Run the tests & write them into a file for postprocessing
+		einfo "Using the following command to test:"
+		einfo "${BJAM} --user-config=../user-config.jam ${OPTIONS} --dump-tests"
+
+		${BJAM} \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			--dump-tests 2>&1 | tee regress.log || die
+
+		# Postprocessing
+		cat regress.log | "$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name process_jam_log)" --v2
+		if test $? != 0; then
+			die "Postprocessing the build log failed"
+		fi
+
+		cat > comment.html <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+		# Generate the build log html summary page
+		"$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name compiler_status)" --v2 \
+			--comment comment.html "${S}" \
+			cs-$(uname).html cs-$(uname)-links.html
+		if test $? != 0; then
+			die "Generating the build log html summary page failed"
+		fi
+
+		# And do some cosmetic fixes :)
+		sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+
+		popd > /dev/null || die
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+		fi
+	}
+	if use python; then
+		python_execute_function -f -q testing
+	else
+		testing
+	fi
+}
+
+pkg_postinst() {
+	if use eselect; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [[ ! -h "${ROOT}etc/eselect/boost/active" ]]; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.49.0-r1.ebuild b/dev-libs/boost/boost-1.49.0-r1.ebuild
new file mode 100644
index 0000000..ba01dab
--- /dev/null
+++ b/dev-libs/boost/boost-1.49.0-r1.ebuild
@@ -0,0 +1,613 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.49.0-r1.ebuild,v 1.4 2012/07/21 17:18:43 jer Exp $
+
+EAPI="4-slot-abi"
+PYTHON_DEPEND="python? *"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
+
+inherit check-reqs flag-o-matic multilib python toolchain-funcs versionator
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.4"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="b2-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [[ -z "$2" ]]; then
+		echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/default"
+		if use debug; then
+			echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/debug"
+		fi
+	else
+		echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+create_user-config.jam() {
+	local compiler compiler_version compiler_executable
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		compiler="darwin"
+		compiler_version="$(gcc-fullversion)"
+		compiler_executable="$(tc-getCXX)"
+	else
+		compiler="gcc"
+		compiler_version="$(gcc-version)"
+		compiler_executable="$(tc-getCXX)"
+	fi
+	local mpi_configuration python_configuration
+
+	if use mpi; then
+		mpi_configuration="using mpi ;"
+	fi
+
+	if use python; then
+		python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;"
+	fi
+
+	# The debug-symbols=none and optimization=none are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our CFLAGS/CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild for more information.
+	cat > user-config.jam << __EOF__
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+${mpi_configuration}
+${python_configuration}
+__EOF__
+}
+
+pkg_pretend() {
+	if use test; then
+		CHECKREQS_DISK_BUILD="15G" check-reqs_pkg_pretend
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+	fi
+}
+
+pkg_setup() {
+	if use python; then
+		python_pkg_setup
+	fi
+
+	if use debug; then
+		ewarn "The debug USE flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-respect_python-buildid.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-support_dots_in_python-buildid.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-python_linking.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch"
+	epatch "${FILESDIR}/remove-toolset-1.48.0.patch"
+}
+
+src_configure() {
+	OPTIONS=""
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		# We need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation.
+		append-ldflags -Wl,-headerpad_max_install_names
+	fi
+
+	# bug 298489
+	if use ppc || use ppc64; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi
+
+	use icu && OPTIONS+=" -sICU_PATH=/usr"
+	use icu || OPTIONS+=" --disable-icu boost.locale.icu=off"
+	use mpi || OPTIONS+=" --without-mpi"
+	use python || OPTIONS+=" --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS+=" --disable-long-double"
+	fi
+
+	OPTIONS+=" pch=off --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}usr\" --layout=versioned"
+
+	if use static-libs; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		# There is no dynamically linked version of libboost_test_exec_monitor and libboost_exception.
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	local jobs
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi
+
+	export BOOST_ROOT="${S}"
+	PYTHON_DIRS=""
+	MPI_PYTHON_MODULE=""
+
+	building() {
+		create_user-config.jam
+
+		einfo "Using the following command to build:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			|| die "Building of Boost libraries failed"
+
+		# ... and do the whole thing one more time to get the debug libs
+		if use debug; then
+			einfo "Using the following command to build:"
+			einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} ${NUMJOBS} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} \
+				threading=single,multi ${LINK_OPTS} runtime-link=shared \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				|| die "Building of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			if [[ -z "${PYTHON_DIRS}" ]]; then
+				PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
+			else
+				if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
+					die "Inconsistent structure of build directories"
+				fi
+			fi
+
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed"
+			done
+
+			if use mpi; then
+				if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
+					MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)"
+					if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
+						die "Multiple mpi.so files found"
+					fi
+				else
+					if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)" ]]; then
+						die "Inconsistent structure of build directories"
+					fi
+				fi
+
+				mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function building
+	else
+		building
+	fi
+
+	if use tools; then
+		pushd tools > /dev/null || die
+		einfo "Using the following command to build the tools:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=../user-config.jam ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			|| die "Building of Boost tools failed"
+		popd > /dev/null || die
+	fi
+}
+
+src_install () {
+	dodir /usr/share/boost-eselect/profiles/${SLOT}
+	touch "${D}usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug; then
+		 touch "${D}usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	if use mpi && use python; then
+		_add_line "python_modules=\""
+	fi
+
+	installation() {
+		create_user-config.jam
+
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		einfo "Using the following command to install:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" $(use python && echo --python-buildid=${PYTHON_ABI}) install"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}usr/include" \
+			--libdir="${D}usr/$(get_libdir)" \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			install || die "Installation of Boost libraries failed"
+
+		if use debug; then
+			einfo "Using the following command to install:"
+			einfo "${BJAM} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} \
+				threading=single,multi ${LINK_OPTS} runtime-link=shared \
+				--includedir="${D}usr/include" \
+				--libdir="${D}usr/$(get_libdir)" \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				install || die "Installation of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+
+			# Move mpi.so Python module to Python site-packages directory and make sure it is slotted.
+			if use mpi; then
+				mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				cat << EOF > "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+import sys
+if sys.platform.startswith('linux'):
+	import DLFCN
+	flags = sys.getdlopenflags()
+	sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
+	from . import mpi
+	sys.setdlopenflags(flags)
+	del DLFCN, flags
+else:
+	from . import mpi
+del sys
+EOF
+				_add_line "$(python_get_sitedir)/mpi.py:boost_${MAJOR_PV}.mpi"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function installation
+	else
+		installation
+	fi
+
+	if use mpi && use python; then
+		_add_line "\""
+	fi
+
+	use python || rm -rf "${D}usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	if use doc; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+		doins -r more
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	pushd "${D}usr/$(get_libdir)" > /dev/null || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}"); do
+		if [[ ! -h "${f}" ]]; then
+			eerror "Tried to remove '${f}' which is a regular file instead of a symlink"
+			die "Slotting/naming of the libraries broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	local lib
+	for lib in ${THREAD_LIBS}; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi; then
+		if use static-libs; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		local lib
+		for lib in ${MPI_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug; then
+		if use static-libs; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		local lib
+		for lib in ${THREAD_DEBUG_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi; then
+			if use static-libs; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			local lib
+			for lib in ${MPI_DEBUG_LIBS}; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug); do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		local f
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug); do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	popd > /dev/null || die
+
+	if use tools; then
+		pushd dist/bin > /dev/null || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		local b
+		for b in *; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+		popd > /dev/null || die
+
+		pushd dist > /dev/null || die
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}usr/share/boostbook" "${D}usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+		popd > /dev/null || die
+	fi
+
+	pushd status > /dev/null || die
+	if [[ -f regress.log ]]; then
+		docinto status
+		dohtml *.html ../boost.png
+		dodoc regress.log
+	fi
+	popd > /dev/null || die
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	if [[ ${CHOST} == *-darwin* ]]; then
+		einfo "Working around completely broken build-system(tm)"
+		local d
+		for d in "${ED}"usr/lib/*.dylib; do
+			if [[ -f ${d} ]]; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				local r
+				for r in ${refs}; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	testing() {
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		pushd tools/regression/build > /dev/null || die
+		einfo "Using the following command to build test helpers:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=../../../user-config.jam ${OPTIONS} process_jam_log compiler_status"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=../../../user-config.jam \
+			${OPTIONS} \
+			process_jam_log compiler_status \
+			|| die "Building of regression test helpers failed"
+
+		popd > /dev/null || die
+		pushd status > /dev/null || die
+
+		# Some of the test-checks seem to rely on regexps
+		export LC_ALL="C"
+
+		# The following is largely taken from tools/regression/run_tests.sh,
+		# but adapted to our needs.
+
+		# Run the tests & write them into a file for postprocessing
+		einfo "Using the following command to test:"
+		einfo "${BJAM} --user-config=../user-config.jam ${OPTIONS} --dump-tests"
+
+		${BJAM} \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			--dump-tests 2>&1 | tee regress.log || die
+
+		# Postprocessing
+		cat regress.log | "$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name process_jam_log)" --v2
+		if test $? != 0; then
+			die "Postprocessing the build log failed"
+		fi
+
+		cat > comment.html <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+		# Generate the build log html summary page
+		"$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name compiler_status)" --v2 \
+			--comment comment.html "${S}" \
+			cs-$(uname).html cs-$(uname)-links.html
+		if test $? != 0; then
+			die "Generating the build log html summary page failed"
+		fi
+
+		# And do some cosmetic fixes :)
+		sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+
+		popd > /dev/null || die
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+		fi
+	}
+	if use python; then
+		python_execute_function -f -q testing
+	else
+		testing
+	fi
+}
+
+pkg_postinst() {
+	if use eselect; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [[ ! -h "${ROOT}etc/eselect/boost/active" ]]; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/boost-1.50.0-r2.ebuild b/dev-libs/boost/boost-1.50.0-r2.ebuild
new file mode 100644
index 0000000..72ca7e0
--- /dev/null
+++ b/dev-libs/boost/boost-1.50.0-r2.ebuild
@@ -0,0 +1,595 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.50.0-r2.ebuild,v 1.2 2012/08/27 08:11:30 dev-zero Exp $
+
+EAPI="4-slot-abi"
+PYTHON_DEPEND="python? *"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
+
+inherit check-reqs flag-o-matic multilib multiprocessing python toolchain-funcs versionator
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug doc icu mpi python static-libs test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.6 )
+	!icu? ( virtual/libiconv )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	!!<=dev-libs/boost-1.35.0-r2"
+DEPEND="${RDEPEND}
+	>=dev-util/boost-build-1.50.0-r2:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="b2-${MAJOR_PV}"
+
+create_user-config.jam() {
+	local compiler compiler_version compiler_executable
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		compiler="darwin"
+		compiler_version="$(gcc-fullversion)"
+		compiler_executable="$(tc-getCXX)"
+	else
+		compiler="gcc"
+		compiler_version="$(gcc-version)"
+		compiler_executable="$(tc-getCXX)"
+	fi
+	local mpi_configuration python_configuration
+
+	if use mpi; then
+		mpi_configuration="using mpi ;"
+	fi
+
+	if use python; then
+		python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;"
+	fi
+
+	cat > user-config.jam << __EOF__
+using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+${mpi_configuration}
+${python_configuration}
+__EOF__
+}
+
+pkg_pretend() {
+	if use test; then
+		CHECKREQS_DISK_BUILD="15G" check-reqs_pkg_pretend
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+	fi
+}
+
+pkg_setup() {
+	if use python; then
+		python_pkg_setup
+	fi
+
+	if use debug; then
+		ewarn "The debug USE flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug symbols. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \
+		"${FILESDIR}/${PN}-1.48.0-respect_python-buildid.patch" \
+		"${FILESDIR}/${PN}-1.48.0-support_dots_in_python-buildid.patch" \
+		"${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch" \
+		"${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch" \
+		"${FILESDIR}/${PN}-1.48.0-python_linking.patch" \
+		"${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" \
+		"${FILESDIR}/remove-toolset-1.48.0.patch"
+}
+
+src_configure() {
+	OPTIONS=""
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		# We need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation.
+		append-ldflags -Wl,-headerpad_max_install_names
+	fi
+
+	# bug 298489
+	if use ppc || use ppc64; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi
+
+	use icu && OPTIONS+=" -sICU_PATH=/usr"
+	use icu || OPTIONS+=" --disable-icu boost.locale.icu=off"
+	use mpi || OPTIONS+=" --without-mpi"
+	use python || OPTIONS+=" --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS+=" --disable-long-double"
+	fi
+
+	OPTIONS+=" pch=off --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}usr\" --layout=versioned"
+
+	if use static-libs; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		# There is no dynamically linked version of libboost_test_exec_monitor and libboost_exception.
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	export BOOST_ROOT="${S}"
+	PYTHON_DIRS=""
+	MPI_PYTHON_MODULE=""
+	NUMJOBS="-j$(makeopts_jobs)"
+
+	building() {
+		create_user-config.jam
+
+		einfo "Using the following command to build:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} threading=single,multi ${LINK_OPTS} \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			|| die "Building of Boost libraries failed"
+
+		# ... and do the whole thing one more time to get the debug libs
+		if use debug; then
+			einfo "Using the following command to build:"
+			einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} ${NUMJOBS} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} threading=single,multi ${LINK_OPTS} \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				|| die "Building of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			if [[ -z "${PYTHON_DIRS}" ]]; then
+				PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
+			else
+				if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
+					die "Inconsistent structure of build directories"
+				fi
+			fi
+
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed"
+			done
+
+			if use mpi; then
+				if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
+					MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)"
+					if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
+						die "Multiple mpi.so files found"
+					fi
+				else
+					if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)" ]]; then
+						die "Inconsistent structure of build directories"
+					fi
+				fi
+
+				mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function building
+	else
+		building
+	fi
+
+	if use tools; then
+		pushd tools > /dev/null || die
+		einfo "Using the following command to build the tools:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=../user-config.jam ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			|| die "Building of Boost tools failed"
+		popd > /dev/null || die
+	fi
+}
+
+src_install () {
+	installation() {
+		create_user-config.jam
+
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		einfo "Using the following command to install:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" $(use python && echo --python-buildid=${PYTHON_ABI}) install"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} threading=single,multi ${LINK_OPTS} \
+			--includedir="${D}usr/include" \
+			--libdir="${D}usr/$(get_libdir)" \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			install || die "Installation of Boost libraries failed"
+
+		if use debug; then
+			einfo "Using the following command to install:"
+			einfo "${BJAM} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} threading=single,multi ${LINK_OPTS} \
+				--includedir="${D}usr/include" \
+				--libdir="${D}usr/$(get_libdir)" \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				install || die "Installation of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+
+			# Move mpi.so Python module to Python site-packages directory and make sure it is slotted.
+			if use mpi; then
+				mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				cat << EOF > "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+import sys
+if sys.platform.startswith('linux'):
+	import DLFCN
+	flags = sys.getdlopenflags()
+	sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
+	from . import mpi
+	sys.setdlopenflags(flags)
+	del DLFCN, flags
+else:
+	from . import mpi
+del sys
+EOF
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function installation
+	else
+		installation
+	fi
+
+	use python || rm -rf "${D}usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	if use doc; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+		doins -r more
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	pushd "${D}usr/$(get_libdir)" > /dev/null || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}"); do
+		if [[ ! -h "${f}" ]]; then
+			eerror "Tried to remove '${f}' which is a regular file instead of a symlink"
+			die "Slotting/naming of the libraries broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	local lib
+	for lib in ${THREAD_LIBS}; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi; then
+		if use static-libs; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		local lib
+		for lib in ${MPI_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug; then
+		if use static-libs; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		local lib
+		for lib in ${THREAD_DEBUG_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi; then
+			if use static-libs; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			local lib
+			for lib in ${MPI_DEBUG_LIBS}; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug); do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+	done
+
+	if use debug; then
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		local f
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug); do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+		done
+	fi
+
+	popd > /dev/null || die
+
+	if use tools; then
+		pushd dist/bin > /dev/null || die
+		# Append version postfix to binaries for slotting
+		local b
+		for b in *; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+		done
+		popd > /dev/null || die
+
+		pushd dist > /dev/null || die
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}usr/share/boostbook" "${D}usr/share/boostbook-${MAJOR_PV}" || die
+		popd > /dev/null || die
+	fi
+
+	pushd status > /dev/null || die
+	if [[ -f regress.log ]]; then
+		docinto status
+		dohtml *.html ../boost.png
+		dodoc regress.log
+	fi
+	popd > /dev/null || die
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	if [[ ${CHOST} == *-darwin* ]]; then
+		einfo "Working around completely broken build-system(tm)"
+		local d
+		for d in "${ED}"usr/lib/*.dylib; do
+			if [[ -f ${d} ]]; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				local r
+				for r in ${refs}; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	testing() {
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		pushd tools/regression/build > /dev/null || die
+		einfo "Using the following command to build test helpers:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=../../../user-config.jam ${OPTIONS} process_jam_log compiler_status"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=../../../user-config.jam \
+			${OPTIONS} \
+			process_jam_log compiler_status \
+			|| die "Building of regression test helpers failed"
+
+		popd > /dev/null || die
+		pushd status > /dev/null || die
+
+		# Some of the test-checks seem to rely on regexps
+		export LC_ALL="C"
+
+		# The following is largely taken from tools/regression/run_tests.sh,
+		# but adapted to our needs.
+
+		# Run the tests & write them into a file for postprocessing
+		einfo "Using the following command to test:"
+		einfo "${BJAM} --user-config=../user-config.jam ${OPTIONS} --dump-tests"
+
+		${BJAM} \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			--dump-tests 2>&1 | tee regress.log || die
+
+		# Postprocessing
+		cat regress.log | "$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name process_jam_log)" --v2
+		if test $? != 0; then
+			die "Postprocessing the build log failed"
+		fi
+
+		cat > comment.html <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+		# Generate the build log html summary page
+		"$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name compiler_status)" --v2 \
+			--comment comment.html "${S}" \
+			cs-$(uname).html cs-$(uname)-links.html
+		if test $? != 0; then
+			die "Generating the build log html summary page failed"
+		fi
+
+		# And do some cosmetic fixes :)
+		sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+
+		popd > /dev/null || die
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+		fi
+	}
+	if use python; then
+		python_execute_function -f -q testing
+	else
+		testing
+	fi
+}
+
+pkg_postinst() {
+	# mostly copy/paste from eselect-boost
+
+	_boost_tools="bcp bjam compiler_status inspect library_status process_jam_log quickbook wave"
+
+	# ... meaning: <none> and -debug:
+	_suffices="|-debug"
+
+	einfo "Removing symlinks from old version"
+
+	local link
+	for link in "${ROOT}/usr/include/boost" "${ROOT}/usr/share/boostbook" ; do
+		if [[ -L "${link}" ]] ; then
+			rm "${link}" || die -q "Couldn't remove \"${link}\" symlink"
+		else
+			[[ -e "${link}" ]] && die -q "\"${link}\" exists and isn't a symlink"
+		fi
+	done
+
+	pushd "${ROOT}/usr/$(get_libdir)" 1>/dev/null
+	local lib
+	for lib in libboost_*.{a,so} ; do
+		[[ -L "${lib}" && "${lib}" != libboost_*[[:digit:]]_[[:digit:]][[:digit:]]@(${_suffices}).@(a|so) ]] || continue
+		rm "${lib}" || die -q "Unable to remove \"/usr/$(get_libdir)/${lib}\" symlink"
+	done
+	popd 1>/dev/null
+
+	pushd "${ROOT}"/usr/bin 1>/dev/null
+	local tool
+	for tool in ${_boost_tools} ; do
+		[[ -L "${tool}" ]] && ( rm "${tool}" || die -q "Unable to remove \"/usr/bin/${tool}\" symlink" )
+	done
+	popd 1>/dev/null
+
+	local python_module python_module_dir
+	for python_module in mpi.py mpi_debug.py ; do
+		for python_module_dir in "${ROOT}"usr/$(get_libdir)/python*/site-packages ; do
+			if [[ -e "${python_module_dir}/${python_module}" ]] ; then
+				rm "${python_module_dir}/${python_module}" || die -q "Unable to remove \"${python_module_dir}/${python_module}\""
+			fi
+		done
+	done
+
+	# Deprecated code for older versions of Boost.
+	local mod="mpi.so"
+	for moddir in "${ROOT}"/usr/$(get_libdir)/python*/site-packages ; do
+		if [ -L "${moddir}/${mod}" ] ; then
+			rm "${moddir}/${mod}" || die -q "Unable to remove \"${moddir}/${mod}\" symlink"
+		else
+			[[ -e "${moddir}/${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink"
+		fi
+	done
+
+	if [ -L "${ROOT}/etc/eselect/boost/active" ] ; then
+		rm  "${ROOT}/etc/eselect/boost/active" || die -q "Unable to remove \"${ROOT}/etc/eselect/boost/active\" symlink"
+	else
+		[[ -e "${ROOT}/etc/eselect/boost/active" ]] && die -q "\"${ROOT}/etc/eselect/boost/active\" exists and isn't a symlink"
+	fi
+}

diff --git a/dev-libs/boost/boost-1.50.0.ebuild b/dev-libs/boost/boost-1.50.0.ebuild
new file mode 100644
index 0000000..6f95856
--- /dev/null
+++ b/dev-libs/boost/boost-1.50.0.ebuild
@@ -0,0 +1,613 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.50.0.ebuild,v 1.1 2012/07/07 18:56:41 floppym Exp $
+
+EAPI="4-slot-abi"
+PYTHON_DEPEND="python? *"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
+
+inherit check-reqs flag-o-matic multilib python toolchain-funcs versionator
+
+MY_P=${PN}_$(replace_all_version_separators _)
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="http://www.boost.org/"
+SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
+
+LICENSE="Boost-1.0"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug doc +eselect icu mpi python static-libs test tools"
+
+RDEPEND="icu? ( >=dev-libs/icu-3.3 )
+	mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
+	sys-libs/zlib
+	!!<=dev-libs/boost-1.35.0-r2
+	>=app-admin/eselect-boost-0.4"
+DEPEND="${RDEPEND}
+	dev-util/boost-build:${SLOT}"
+
+S=${WORKDIR}/${MY_P}
+
+MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
+BJAM="b2-${MAJOR_PV}"
+
+# Usage:
+# _add_line <line-to-add> <profile>
+# ... to add to specific profile
+# or
+# _add_line <line-to-add>
+# ... to add to all profiles for which the use flag set
+
+_add_line() {
+	if [[ -z "$2" ]]; then
+		echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/default"
+		if use debug; then
+			echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/debug"
+		fi
+	else
+		echo "${1}" >> "${D}usr/share/boost-eselect/profiles/${SLOT}/${2}"
+	fi
+}
+
+create_user-config.jam() {
+	local compiler compiler_version compiler_executable
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		compiler="darwin"
+		compiler_version="$(gcc-fullversion)"
+		compiler_executable="$(tc-getCXX)"
+	else
+		compiler="gcc"
+		compiler_version="$(gcc-version)"
+		compiler_executable="$(tc-getCXX)"
+	fi
+	local mpi_configuration python_configuration
+
+	if use mpi; then
+		mpi_configuration="using mpi ;"
+	fi
+
+	if use python; then
+		python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;"
+	fi
+
+	# The debug-symbols=none and optimization=none are not official upstream flags but a Gentoo
+	# specific patch to make sure that all our CFLAGS/CXXFLAGS/LDFLAGS are being respected.
+	# Using optimization=off would for example add "-O0" and override "-O2" set by the user.
+	# Please take a look at the boost-build ebuild for more information.
+	cat > user-config.jam << __EOF__
+variant gentoorelease : release : <optimization>none <debug-symbols>none ;
+variant gentoodebug : debug : <optimization>none ;
+
+using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+${mpi_configuration}
+${python_configuration}
+__EOF__
+}
+
+pkg_pretend() {
+	if use test; then
+		CHECKREQS_DISK_BUILD="15G" check-reqs_pkg_pretend
+
+		ewarn "The tests may take several hours on a recent machine"
+		ewarn "but they will not fail (unless something weird happens ;-)"
+		ewarn "This is because the tests depend on the used compiler version"
+		ewarn "and the platform and upstream says that this is normal."
+		ewarn "If you are interested in the results, please take a look at the"
+		ewarn "generated results page:"
+		ewarn "  ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
+	fi
+}
+
+pkg_setup() {
+	if use python; then
+		python_pkg_setup
+	fi
+
+	if use debug; then
+		ewarn "The debug USE flag means that a second set of the boost libraries"
+		ewarn "will be built containing debug symbols. You'll be able to select them"
+		ewarn "using the boost-eselect module. But even though the optimization flags"
+		ewarn "you might have set are not stripped, there will be a performance"
+		ewarn "penalty and linking other packages against the debug version"
+		ewarn "of boost is _not_ recommended."
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-respect_python-buildid.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-support_dots_in_python-buildid.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-python_linking.patch"
+	epatch "${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch"
+	epatch "${FILESDIR}/remove-toolset-1.48.0.patch"
+}
+
+src_configure() {
+	OPTIONS=""
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		# We need to add the prefix, and in two cases this exceeds, so prepare
+		# for the largest possible space allocation.
+		append-ldflags -Wl,-headerpad_max_install_names
+	fi
+
+	# bug 298489
+	if use ppc || use ppc64; then
+		[[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+	fi
+
+	use icu && OPTIONS+=" -sICU_PATH=/usr"
+	use icu || OPTIONS+=" --disable-icu boost.locale.icu=off"
+	use mpi || OPTIONS+=" --without-mpi"
+	use python || OPTIONS+=" --without-python"
+
+	# https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
+	if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
+		OPTIONS+=" --disable-long-double"
+	fi
+
+	OPTIONS+=" pch=off --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}usr\" --layout=versioned"
+
+	if use static-libs; then
+		LINK_OPTS="link=shared,static"
+		LIBRARY_TARGETS="*.a *$(get_libname)"
+	else
+		LINK_OPTS="link=shared"
+		# There is no dynamically linked version of libboost_test_exec_monitor and libboost_exception.
+		LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
+	fi
+}
+
+src_compile() {
+	local jobs
+	jobs=$( echo " ${MAKEOPTS} " | \
+		sed -e 's/ --jobs[= ]/ -j /g' \
+			-e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
+			-e 's/ -j\>/ -j1/g' | \
+			( while read -d ' ' j; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
+	if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi
+
+	export BOOST_ROOT="${S}"
+	PYTHON_DIRS=""
+	MPI_PYTHON_MODULE=""
+
+	building() {
+		create_user-config.jam
+
+		einfo "Using the following command to build:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+		${BJAM} ${NUMJOBS} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			|| die "Building of Boost libraries failed"
+
+		# ... and do the whole thing one more time to get the debug libs
+		if use debug; then
+			einfo "Using the following command to build:"
+			einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} ${NUMJOBS} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} \
+				threading=single,multi ${LINK_OPTS} runtime-link=shared \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				|| die "Building of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			if [[ -z "${PYTHON_DIRS}" ]]; then
+				PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
+			else
+				if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
+					die "Inconsistent structure of build directories"
+				fi
+			fi
+
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed"
+			done
+
+			if use mpi; then
+				if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
+					MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)"
+					if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
+						die "Multiple mpi.so files found"
+					fi
+				else
+					if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)" ]]; then
+						die "Inconsistent structure of build directories"
+					fi
+				fi
+
+				mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function building
+	else
+		building
+	fi
+
+	if use tools; then
+		pushd tools > /dev/null || die
+		einfo "Using the following command to build the tools:"
+		einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=../user-config.jam ${OPTIONS}"
+
+		${BJAM} ${NUMJOBS} -q -d+2\
+			gentoorelease \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			|| die "Building of Boost tools failed"
+		popd > /dev/null || die
+	fi
+}
+
+src_install () {
+	dodir /usr/share/boost-eselect/profiles/${SLOT}
+	touch "${D}usr/share/boost-eselect/profiles/${SLOT}/default" || die
+	if use debug; then
+		 touch "${D}usr/share/boost-eselect/profiles/${SLOT}/debug" || die
+	fi
+
+	if use mpi && use python; then
+		_add_line "python_modules=\""
+	fi
+
+	installation() {
+		create_user-config.jam
+
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		einfo "Using the following command to install:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" $(use python && echo --python-buildid=${PYTHON_ABI}) install"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=user-config.jam \
+			${OPTIONS} \
+			threading=single,multi ${LINK_OPTS} runtime-link=shared \
+			--includedir="${D}usr/include" \
+			--libdir="${D}usr/$(get_libdir)" \
+			$(use python && echo --python-buildid=${PYTHON_ABI}) \
+			install || die "Installation of Boost libraries failed"
+
+		if use debug; then
+			einfo "Using the following command to install:"
+			einfo "${BJAM} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
+
+			${BJAM} -q -d+2 \
+				gentoodebug \
+				--user-config=user-config.jam \
+				${OPTIONS} \
+				threading=single,multi ${LINK_OPTS} runtime-link=shared \
+				--includedir="${D}usr/include" \
+				--libdir="${D}usr/$(get_libdir)" \
+				--buildid=debug \
+				$(use python && echo --python-buildid=${PYTHON_ABI}) \
+				install || die "Installation of Boost debug libraries failed"
+		fi
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+
+			# Move mpi.so Python module to Python site-packages directory and make sure it is slotted.
+			if use mpi; then
+				mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
+				cat << EOF > "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
+import sys
+if sys.platform.startswith('linux'):
+	import DLFCN
+	flags = sys.getdlopenflags()
+	sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
+	from . import mpi
+	sys.setdlopenflags(flags)
+	del DLFCN, flags
+else:
+	from . import mpi
+del sys
+EOF
+				_add_line "$(python_get_sitedir)/mpi.py:boost_${MAJOR_PV}.mpi"
+			fi
+		fi
+	}
+	if use python; then
+		python_execute_function installation
+	else
+		installation
+	fi
+
+	if use mpi && use python; then
+		_add_line "\""
+	fi
+
+	use python || rm -rf "${D}usr/include/boost-${MAJOR_PV}/boost"/python* || die
+
+	if use doc; then
+		find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
+		dohtml \
+			-A pdf,txt,cpp,hpp \
+			*.{htm,html,png,css} \
+			-r doc
+		dohtml \
+			-A pdf,txt \
+			-r tools
+		insinto /usr/share/doc/${PF}/html
+		doins -r libs
+		doins -r more
+
+		# To avoid broken links
+		insinto /usr/share/doc/${PF}/html
+		doins LICENSE_1_0.txt
+
+		dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
+	fi
+
+	pushd "${D}usr/$(get_libdir)" > /dev/null || die
+
+	# Remove (unversioned) symlinks
+	# And check for what we remove to catch bugs
+	# got a better idea how to do it? tell me!
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}"); do
+		if [[ ! -h "${f}" ]]; then
+			eerror "Tried to remove '${f}' which is a regular file instead of a symlink"
+			die "Slotting/naming of the libraries broken!"
+		fi
+		rm "${f}" || die
+	done
+
+	# The threading libs obviously always gets the "-mt" (multithreading) tag
+	# some packages seem to have a problem with it. Creating symlinks...
+
+	if use static-libs; then
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	else
+		THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
+	fi
+	local lib
+	for lib in ${THREAD_LIBS}; do
+		dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+	done
+
+	# The same goes for the mpi libs
+	if use mpi; then
+		if use static-libs; then
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		else
+			MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
+		fi
+		local lib
+		for lib in ${MPI_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+	fi
+
+	if use debug; then
+		if use static-libs; then
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
+		else
+			THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
+		fi
+
+		local lib
+		for lib in ${THREAD_DEBUG_LIBS}; do
+			dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+		done
+
+		if use mpi; then
+			if use static-libs; then
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			else
+				MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
+			fi
+
+			local lib
+			for lib in ${MPI_DEBUG_LIBS}; do
+				dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
+			done
+		fi
+	fi
+
+	# Create a subdirectory with completely unversioned symlinks
+	# and store the names in the profiles-file for eselect
+	dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
+
+	_add_line "libs=\"" default
+	local f
+	for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug); do
+		dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
+		_add_line "/usr/$(get_libdir)/${f}" default
+	done
+	_add_line "\"" default
+
+	if use debug; then
+		_add_line "libs=\"" debug
+		dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
+		local f
+		for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug); do
+			dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
+			_add_line "/usr/$(get_libdir)/${f}" debug
+		done
+		_add_line "\"" debug
+
+		_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
+		_add_line "suffix=\"-debug\"" debug
+	fi
+
+	_add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
+
+	popd > /dev/null || die
+
+	if use tools; then
+		pushd dist/bin > /dev/null || die
+		# Append version postfix to binaries for slotting
+		_add_line "bins=\""
+		local b
+		for b in *; do
+			newbin "${b}" "${b}-${MAJOR_PV}"
+			_add_line "/usr/bin/${b}-${MAJOR_PV}"
+		done
+		_add_line "\""
+		popd > /dev/null || die
+
+		pushd dist > /dev/null || die
+		insinto /usr/share
+		doins -r share/boostbook
+		# Append version postfix for slotting
+		mv "${D}usr/share/boostbook" "${D}usr/share/boostbook-${MAJOR_PV}" || die
+		_add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
+		popd > /dev/null || die
+	fi
+
+	pushd status > /dev/null || die
+	if [[ -f regress.log ]]; then
+		docinto status
+		dohtml *.html ../boost.png
+		dodoc regress.log
+	fi
+	popd > /dev/null || die
+
+	# boost's build system truely sucks for not having a destdir.  Because for
+	# this reason we are forced to build with a prefix that includes the
+	# DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+	# DESTROOT instread of the actual EPREFIX.  There is no way out of here
+	# but to do it the dirty way of manually setting the right install_names.
+	if [[ ${CHOST} == *-darwin* ]]; then
+		einfo "Working around completely broken build-system(tm)"
+		local d
+		for d in "${ED}"usr/lib/*.dylib; do
+			if [[ -f ${d} ]]; then
+				# fix the "soname"
+				ebegin "  correcting install_name of ${d#${ED}}"
+				install_name_tool -id "/${d#${D}}" "${d}"
+				eend $?
+				# fix references to other libs
+				refs=$(otool -XL "${d}" | \
+					sed -e '1d' -e 's/^\t//' | \
+					grep "^libboost_" | \
+					cut -f1 -d' ')
+				local r
+				for r in ${refs}; do
+					ebegin "    correcting reference to ${r}"
+					install_name_tool -change \
+						"${r}" \
+						"${EPREFIX}/usr/lib/${r}" \
+						"${d}"
+					eend $?
+				done
+			fi
+		done
+	fi
+}
+
+src_test() {
+	testing() {
+		if use python; then
+			local dir
+			for dir in ${PYTHON_DIRS}; do
+				cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
+			done
+
+			if use mpi; then
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
+				cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
+			fi
+		fi
+
+		pushd tools/regression/build > /dev/null || die
+		einfo "Using the following command to build test helpers:"
+		einfo "${BJAM} -q -d+2 gentoorelease --user-config=../../../user-config.jam ${OPTIONS} process_jam_log compiler_status"
+
+		${BJAM} -q -d+2 \
+			gentoorelease \
+			--user-config=../../../user-config.jam \
+			${OPTIONS} \
+			process_jam_log compiler_status \
+			|| die "Building of regression test helpers failed"
+
+		popd > /dev/null || die
+		pushd status > /dev/null || die
+
+		# Some of the test-checks seem to rely on regexps
+		export LC_ALL="C"
+
+		# The following is largely taken from tools/regression/run_tests.sh,
+		# but adapted to our needs.
+
+		# Run the tests & write them into a file for postprocessing
+		einfo "Using the following command to test:"
+		einfo "${BJAM} --user-config=../user-config.jam ${OPTIONS} --dump-tests"
+
+		${BJAM} \
+			--user-config=../user-config.jam \
+			${OPTIONS} \
+			--dump-tests 2>&1 | tee regress.log || die
+
+		# Postprocessing
+		cat regress.log | "$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name process_jam_log)" --v2
+		if test $? != 0; then
+			die "Postprocessing the build log failed"
+		fi
+
+		cat > comment.html <<- __EOF__
+		<p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
+__EOF__
+
+		# Generate the build log html summary page
+		"$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name compiler_status)" --v2 \
+			--comment comment.html "${S}" \
+			cs-$(uname).html cs-$(uname)-links.html
+		if test $? != 0; then
+			die "Generating the build log html summary page failed"
+		fi
+
+		# And do some cosmetic fixes :)
+		sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
+
+		popd > /dev/null || die
+
+		if use python; then
+			rm -r ${PYTHON_DIRS} || die
+		fi
+	}
+	if use python; then
+		python_execute_function -f -q testing
+	else
+		testing
+	fi
+}
+
+pkg_postinst() {
+	if use eselect; then
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+
+	if [[ ! -h "${ROOT}etc/eselect/boost/active" ]]; then
+		elog "No active boost version found. Calling eselect to select one..."
+		eselect boost update || ewarn "eselect boost update failed."
+	fi
+}

diff --git a/dev-libs/boost/files/1.35-remove-hardlink-creation.patch b/dev-libs/boost/files/1.35-remove-hardlink-creation.patch
new file mode 100644
index 0000000..4b1c143
--- /dev/null
+++ b/dev-libs/boost/files/1.35-remove-hardlink-creation.patch
@@ -0,0 +1,21 @@
+--- Jamroot.orig	2009-04-03 19:23:02.876426258 +0200
++++ Jamroot	2009-04-03 19:37:05.899697787 +0200
+@@ -444,14 +444,10 @@
+         }
+         return $(result) ;
+     }    
+-            
+-    generate stage-unversioned : stage-proper : 
+-      <generating-rule>@make-unversioned-links ;
+-    explicit stage-unversioned ;
+-    
+-    generate install-unversioned : install-proper : 
+-      <generating-rule>@make-unversioned-links ;
+-    explicit install-unversioned ;
++
++
++    alias stage-unversioned ;
++    alias install-unversioned ;
+ }
+ else
+ {

diff --git a/dev-libs/boost/files/boost-1.37.0-darwin-long-double.patch b/dev-libs/boost/files/boost-1.37.0-darwin-long-double.patch
new file mode 100644
index 0000000..06a3138
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.37.0-darwin-long-double.patch
@@ -0,0 +1,14 @@
+Numerous sources suggest just to do this, boost devs only seem to "know"
+it is "bad".  Without this, boost simply dies compiling (joy).
+
+--- boost/math/tools/config.hpp
++++ boost/math/tools/config.hpp
+@@ -43,7 +43,7 @@
+ // Darwin's rather strange "double double" is rather hard to
+ // support, it should be possible given enough effort though...
+ //
+-#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
++// fsck it! #  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ #endif
+ #if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000)
+ //

diff --git a/dev-libs/boost/files/boost-1.41.0-fix-CRC-on-x64-during-gzip-decompression.patch b/dev-libs/boost/files/boost-1.41.0-fix-CRC-on-x64-during-gzip-decompression.patch
new file mode 100644
index 0000000..1707ff6
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.41.0-fix-CRC-on-x64-during-gzip-decompression.patch
@@ -0,0 +1,24 @@
+diff -Nur boost_1_41_0.orig/boost/iostreams/filter/zlib.hpp boost_1_41_0/boost/iostreams/filter/zlib.hpp
+--- boost_1_41_0.orig/boost/iostreams/filter/zlib.hpp	2009-10-14 18:20:36.000000000 +0300
++++ boost_1_41_0/boost/iostreams/filter/zlib.hpp	2009-12-13 16:47:53.078056507 +0200
+@@ -20,6 +20,7 @@
+ #include <memory>            // allocator, bad_alloc.
+ #include <new>          
+ #include <boost/config.hpp>  // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM.
++#include <boost/cstdint.hpp> // uint*_t
+ #include <boost/detail/workaround.hpp>
+ #include <boost/iostreams/constants.hpp>   // buffer size.
+ #include <boost/iostreams/detail/config/auto_link.hpp>
+@@ -43,9 +44,9 @@
+ namespace zlib {
+                     // Typedefs
+ 
+-typedef unsigned int uint;
+-typedef unsigned char byte;
+-typedef unsigned long ulong;
++typedef uint32_t uint;
++typedef uint8_t byte;
++typedef uint32_t ulong;
+ 
+ // Prefix 'x' prevents symbols from being redefined when Z_PREFIX is defined
+ typedef void* (*xalloc_func)(void*, zlib::uint, zlib::uint);

diff --git a/dev-libs/boost/files/boost-1.41.0-iostreams-missing-include-guard.patch b/dev-libs/boost/files/boost-1.41.0-iostreams-missing-include-guard.patch
new file mode 100644
index 0000000..3f5bb7e
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.41.0-iostreams-missing-include-guard.patch
@@ -0,0 +1,20 @@
+diff --git a/boost/iostreams/device/mapped_file.hpp b/boost/iostreams/device/mapped_file.hpp
+index aae9dab..be656ef 100644
+--- a/boost/iostreams/device/mapped_file.hpp
++++ b/boost/iostreams/device/mapped_file.hpp
+@@ -4,6 +4,9 @@
+ // Distributed under the Boost Software License, Version 1.0. (See accompanying
+ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ 
++#ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
++#define BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
++
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
+ # pragma once
+ #endif
+@@ -591,3 +594,5 @@ operator^=(mapped_file::mapmode& a, mapped_file::mapmode b)
+ } } // End namespaces iostreams, boost.
+ 
+ #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
++
++#endif // #ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED

diff --git a/dev-libs/boost/files/boost-1.41.0-mpi_process_group-missing-include.patch b/dev-libs/boost/files/boost-1.41.0-mpi_process_group-missing-include.patch
new file mode 100644
index 0000000..13f7b8a
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.41.0-mpi_process_group-missing-include.patch
@@ -0,0 +1,12 @@
+Index: boost/graph/distributed/detail/mpi_process_group.ipp
+===================================================================
+--- boost/graph/distributed/detail/mpi_process_group.ipp	(revision 57744)
++++ boost/graph/distributed/detail/mpi_process_group.ipp	(working copy)
+@@ -28,6 +28,7 @@
+ #include <queue>
+ #include <stack>
+ #include <boost/graph/distributed/detail/tag_allocator.hpp>
++#include <stdio.h>
+
+ // #define PBGL_PROCESS_GROUP_DEBUG
+

diff --git a/dev-libs/boost/files/boost-1.41.0-parameter-needs-python.patch b/dev-libs/boost/files/boost-1.41.0-parameter-needs-python.patch
new file mode 100644
index 0000000..2002ba3
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.41.0-parameter-needs-python.patch
@@ -0,0 +1,106 @@
+--- boost/parameter/aux_/maybe.hpp	2008-03-22 21:45:55.000000000 +0000
++++ boost/parameter/aux_/maybe.hpp.new	2009-10-22 03:55:24.000000000 +0000
+@@ -2,20 +2,41 @@
+ // subject to the Boost Software License, Version 1.0. (See accompanying
+ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ 
+-#ifndef BOOST_PARAMETER_MAYBE_060211_HPP
+-# define BOOST_PARAMETER_MAYBE_060211_HPP
++//
++// 2009.10.21 TDS remove depenency on boost::python::detail::referent_storage
++//
++#ifndef BOOST_PARAMETER_MAYBE_091021_HPP
++# define BOOST_PARAMETER_MAYBE_091021_HPP
+ 
+ # include <boost/mpl/if.hpp>
+ # include <boost/mpl/identity.hpp>
+ # include <boost/type_traits/is_reference.hpp>
+ # include <boost/type_traits/add_reference.hpp>
+ # include <boost/optional.hpp>
+-# include <boost/python/detail/referent_storage.hpp>
++# include <boost/aligned_storage.hpp>
+ # include <boost/type_traits/remove_cv.hpp>
+ # include <boost/type_traits/add_const.hpp>
+ 
+ namespace boost { namespace parameter { namespace aux {
+ 
++template <class T> struct referent_size;
++
++template <class T>
++struct referent_size<T&>
++{
++  BOOST_STATIC_CONSTANT(std::size_t, value = sizeof(T));
++};
++
++// A metafunction returning a POD type which can store U, where T ==
++// U&. If T is not a reference type, returns a POD which can store T.
++template <class T>
++struct referent_storage
++{
++  typedef typename boost::aligned_storage<
++    referent_size<T>::value
++    >::type type;
++};
++
+ struct maybe_base {};
+ 
+ template <class T>
+@@ -33,8 +54,8 @@
+         BOOST_DEDUCED_TYPENAME remove_reference<reference>::type
+     >::type non_cv_value;
+         
+-    explicit maybe(T value)
+-      : value(value)
++    explicit maybe(T value_)
++      : value(value_)
+       , constructed(false)
+     {}
+ 
+@@ -48,28 +69,28 @@
+             this->destroy();
+     }
+ 
+-    reference construct(reference value) const
++    reference construct(reference value_) const
+     {
+-        return value;
++        return value_;
+     }
+ 
+     template <class U>
+-    reference construct2(U const& value) const
++    reference construct2(U const& value_) const
+     {
+-        new (m_storage.bytes) non_cv_value(value);
++        new (m_storage.address()) non_cv_value(value_);
+         constructed = true;
+-        return *(non_cv_value*)m_storage.bytes;
++        return *(non_cv_value*)m_storage.address();
+     }
+ 
+     template <class U>
+-    reference construct(U const& value) const
++    reference construct(U const& value_) const
+     {
+-        return this->construct2(value);
++        return this->construct2(value_);
+     }
+ 
+     void destroy()
+     {
+-        ((non_cv_value*)m_storage.bytes)->~non_cv_value();
++        ((non_cv_value*)m_storage.address())->~non_cv_value();
+     }
+ 
+     typedef reference(maybe<T>::*safe_bool)() const;
+@@ -87,7 +108,9 @@
+ private:
+     boost::optional<T> value;
+     mutable bool constructed;
+-    mutable typename boost::python::detail::referent_storage<
++
++
++    mutable typename referent_storage<
+         reference
+     >::type m_storage;
+ };

diff --git a/dev-libs/boost/files/boost-1.41.0-spirit-fixed-include-guard-conflict.patch b/dev-libs/boost/files/boost-1.41.0-spirit-fixed-include-guard-conflict.patch
new file mode 100644
index 0000000..9b68e97
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.41.0-spirit-fixed-include-guard-conflict.patch
@@ -0,0 +1,13 @@
+Index: trunk/boost/spirit/include/version.hpp
+===================================================================
+--- a/trunk/boost/spirit/include/version.hpp
++++ b/trunk/boost/spirit/include/version.hpp
+@@ -7,6 +7,6 @@
+   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ =============================================================================*/
+-#if !defined(SPIRIT_VERSION_NOVEMBER_13_2008_0834AM)
+-#define SPIRIT_VERSION_NOVEMBER_13_2008_0834AM
++#if !defined(SPIRIT_VERSION)
++#define SPIRIT_VERSION
+ 
+ ///////////////////////////////////////////////////////////////////////////////

diff --git a/dev-libs/boost/files/boost-1.42.0-gcc45-python.patch b/dev-libs/boost/files/boost-1.42.0-gcc45-python.patch
new file mode 100644
index 0000000..b415289
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.42.0-gcc45-python.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/317997
+https://svn.boost.org/trac/boost/ticket/4223
+https://svn.boost.org/trac/boost/changeset/62198
+
+--- a/boost/python/exception_translator.hpp
++++ b/boost/python/exception_translator.hpp
+@@ -18,7 +18,7 @@ template <class ExceptionType, class Translate>
+ void register_exception_translator(Translate translate, boost::type<ExceptionType>* = 0)
+ {
+     detail::register_exception_handler(
+-        bind<bool>(detail::translate_exception<ExceptionType,Translate>(), _1, _2, translate)
++        boost::bind<bool>(detail::translate_exception<ExceptionType,Translate>(), _1, _2, translate)
+         );
+ }
+ 

diff --git a/dev-libs/boost/files/boost-1.42.0-parameter-needs-python.patch b/dev-libs/boost/files/boost-1.42.0-parameter-needs-python.patch
new file mode 100644
index 0000000..2002ba3
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.42.0-parameter-needs-python.patch
@@ -0,0 +1,106 @@
+--- boost/parameter/aux_/maybe.hpp	2008-03-22 21:45:55.000000000 +0000
++++ boost/parameter/aux_/maybe.hpp.new	2009-10-22 03:55:24.000000000 +0000
+@@ -2,20 +2,41 @@
+ // subject to the Boost Software License, Version 1.0. (See accompanying
+ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ 
+-#ifndef BOOST_PARAMETER_MAYBE_060211_HPP
+-# define BOOST_PARAMETER_MAYBE_060211_HPP
++//
++// 2009.10.21 TDS remove depenency on boost::python::detail::referent_storage
++//
++#ifndef BOOST_PARAMETER_MAYBE_091021_HPP
++# define BOOST_PARAMETER_MAYBE_091021_HPP
+ 
+ # include <boost/mpl/if.hpp>
+ # include <boost/mpl/identity.hpp>
+ # include <boost/type_traits/is_reference.hpp>
+ # include <boost/type_traits/add_reference.hpp>
+ # include <boost/optional.hpp>
+-# include <boost/python/detail/referent_storage.hpp>
++# include <boost/aligned_storage.hpp>
+ # include <boost/type_traits/remove_cv.hpp>
+ # include <boost/type_traits/add_const.hpp>
+ 
+ namespace boost { namespace parameter { namespace aux {
+ 
++template <class T> struct referent_size;
++
++template <class T>
++struct referent_size<T&>
++{
++  BOOST_STATIC_CONSTANT(std::size_t, value = sizeof(T));
++};
++
++// A metafunction returning a POD type which can store U, where T ==
++// U&. If T is not a reference type, returns a POD which can store T.
++template <class T>
++struct referent_storage
++{
++  typedef typename boost::aligned_storage<
++    referent_size<T>::value
++    >::type type;
++};
++
+ struct maybe_base {};
+ 
+ template <class T>
+@@ -33,8 +54,8 @@
+         BOOST_DEDUCED_TYPENAME remove_reference<reference>::type
+     >::type non_cv_value;
+         
+-    explicit maybe(T value)
+-      : value(value)
++    explicit maybe(T value_)
++      : value(value_)
+       , constructed(false)
+     {}
+ 
+@@ -48,28 +69,28 @@
+             this->destroy();
+     }
+ 
+-    reference construct(reference value) const
++    reference construct(reference value_) const
+     {
+-        return value;
++        return value_;
+     }
+ 
+     template <class U>
+-    reference construct2(U const& value) const
++    reference construct2(U const& value_) const
+     {
+-        new (m_storage.bytes) non_cv_value(value);
++        new (m_storage.address()) non_cv_value(value_);
+         constructed = true;
+-        return *(non_cv_value*)m_storage.bytes;
++        return *(non_cv_value*)m_storage.address();
+     }
+ 
+     template <class U>
+-    reference construct(U const& value) const
++    reference construct(U const& value_) const
+     {
+-        return this->construct2(value);
++        return this->construct2(value_);
+     }
+ 
+     void destroy()
+     {
+-        ((non_cv_value*)m_storage.bytes)->~non_cv_value();
++        ((non_cv_value*)m_storage.address())->~non_cv_value();
+     }
+ 
+     typedef reference(maybe<T>::*safe_bool)() const;
+@@ -87,7 +108,9 @@
+ private:
+     boost::optional<T> value;
+     mutable bool constructed;
+-    mutable typename boost::python::detail::referent_storage<
++
++
++    mutable typename referent_storage<
+         reference
+     >::type m_storage;
+ };

diff --git a/dev-libs/boost/files/boost-1.42.0-template_arity-gcc45.patch b/dev-libs/boost/files/boost-1.42.0-template_arity-gcc45.patch
new file mode 100644
index 0000000..4a49879
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.42.0-template_arity-gcc45.patch
@@ -0,0 +1,28 @@
+MPL is broken with GCC 4.5.
+
+https://bugs.gentoo.org/317969
+https://svn.boost.org/trac/boost/ticket/4061
+https://svn.boost.org/trac/boost/changeset/61467
+
+--- a/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
++++ b/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
+@@ -83,7 +81,7 @@ template< typename F, int N >
+ struct template_arity_impl
+ {
+     BOOST_STATIC_CONSTANT(int, value =
+-          sizeof(arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
++          sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
+         );
+ };
+ 
+--- a/boost/mpl/aux_/template_arity.hpp
++++ b/boost/mpl/aux_/template_arity.hpp
+@@ -98,7 +98,7 @@ template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
+ struct template_arity_impl
+ {
+     BOOST_STATIC_CONSTANT(int, value = 
+-          sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
++          sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
+         );
+ };
+ 

diff --git a/dev-libs/boost/files/boost-1.45.0-lambda_bind.patch b/dev-libs/boost/files/boost-1.45.0-lambda_bind.patch
new file mode 100644
index 0000000..0b800e9
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.45.0-lambda_bind.patch
@@ -0,0 +1,42 @@
+Index: trunk/boost/lambda/detail/function_adaptors.hpp
+===================================================================
+--- a/trunk/boost/lambda/detail/function_adaptors.hpp
++++ b/trunk/boost/lambda/detail/function_adaptors.hpp
+@@ -17,4 +17,7 @@
+ #include "boost/type_traits/same_traits.hpp"
+ #include "boost/type_traits/remove_reference.hpp"
++#include "boost/type_traits/remove_cv.hpp"
++#include "boost/type_traits/add_const.hpp"
++#include "boost/type_traits/add_volatile.hpp"
+ #include "boost/utility/result_of.hpp"
+ 
+@@ -238,12 +241,14 @@
+   template<class Args> class sig { 
+     typedef typename boost::tuples::element<1, Args>::type argument_type;
+-
+-    typedef typename detail::IF<boost::is_const<argument_type>::value,
++    typedef typename boost::remove_reference<
++      argument_type
++    >::type unref_type;
++
++    typedef typename detail::IF<boost::is_const<unref_type>::value,
+       typename boost::add_const<T>::type,
+       T
+     >::RET properly_consted_return_type;
+ 
+-    typedef typename detail::IF<
+-        boost::is_volatile<properly_consted_return_type>::value,
++    typedef typename detail::IF<boost::is_volatile<unref_type>::value,
+       typename boost::add_volatile<properly_consted_return_type>::type,
+       properly_consted_return_type
+@@ -252,6 +257,8 @@
+ 
+   public:
+-    typedef typename 
+-      boost::add_reference<properly_cvd_return_type>::type type;
++    typedef typename detail::IF<boost::is_reference<argument_type>::value,
++      typename boost::add_reference<properly_cvd_return_type>::type,
++      typename boost::remove_cv<T>::type
++    >::RET type;
+   };
+

diff --git a/dev-libs/boost/files/boost-1.46.1-python32.patch b/dev-libs/boost/files/boost-1.46.1-python32.patch
new file mode 100644
index 0000000..5e0583a
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.46.1-python32.patch
@@ -0,0 +1,16 @@
+Index: libs/python/src/converter/builtin_converters.cpp
+===================================================================
+--- libs/python/src/converter/builtin_converters.cpp	(revision 67279)
++++ libs/python/src/converter/builtin_converters.cpp	(working copy)
+@@ -431,7 +431,11 @@
+           if (!result.empty())
+           {
+               int err = PyUnicode_AsWideChar(
++#if PY_VERSION_HEX >= 0x03020000
++                  intermediate
++#else
+                   (PyUnicodeObject *)intermediate
++#endif
+                 , &result[0]
+                 , result.size());
+ 

diff --git a/dev-libs/boost/files/boost-1.47.0-exceptions.patch b/dev-libs/boost/files/boost-1.47.0-exceptions.patch
new file mode 100644
index 0000000..61ab356
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.47.0-exceptions.patch
@@ -0,0 +1,22 @@
+--- boost/numeric/conversion/converter_policies.hpp	2008-10-13 11:00:03.000000000 +0200
++++ boost/numeric/conversion/converter_policies.hpp	2011-07-22 11:46:40.961876274 +0200
+@@ -20,6 +20,7 @@ 
+ 
+ #include "boost/mpl/if.hpp"
+ #include "boost/mpl/integral_c.hpp"
++#include "boost/throw_exception.hpp"
+ 
+ namespace boost { namespace numeric
+ {
+@@ -159,9 +160,9 @@ struct def_overflow_handler
+   void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow)
+   {
+     if ( r == cNegOverflow )
+-      throw negative_overflow() ;
++      boost::throw_exception( negative_overflow() ) ;
+     else if ( r == cPosOverflow )
+-           throw positive_overflow() ;
++      boost::throw_exception( positive_overflow() ) ;
+   }
+ } ;
+ 

diff --git a/dev-libs/boost/files/boost-1.48.0-BOOST_FOREACH.patch b/dev-libs/boost/files/boost-1.48.0-BOOST_FOREACH.patch
new file mode 100644
index 0000000..02f7a01
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-BOOST_FOREACH.patch
@@ -0,0 +1,69 @@
+https://svn.boost.org/trac/boost/ticket/6131
+https://svn.boost.org/trac/boost/changeset/75540
+
+--- boost/foreach_fwd.hpp
++++ boost/foreach_fwd.hpp
+@@ -14,6 +14,8 @@
+ #ifndef BOOST_FOREACH_FWD_HPP
+ #define BOOST_FOREACH_FWD_HPP
+ 
++#include <utility> // for std::pair
++
+ // This must be at global scope, hence the uglified name
+ enum boost_foreach_argument_dependent_lookup_hack
+ {
+@@ -25,6 +27,9 @@
+ 
+ namespace foreach
+ {
++    template<typename T>
++    std::pair<T, T> in_range(T begin, T end);
++
+     ///////////////////////////////////////////////////////////////////////////////
+     // boost::foreach::tag
+     //
+@@ -46,6 +51,24 @@
+ 
+ } // namespace foreach
+ 
++// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131
++namespace BOOST_FOREACH
++{
++    using foreach::in_range;
++    using foreach::tag;
++
++    template<typename T>
++    struct is_lightweight_proxy
++      : foreach::is_lightweight_proxy<T>
++    {};
++
++    template<typename T>
++    struct is_noncopyable
++      : foreach::is_noncopyable<T>
++    {};
++
++} // namespace BOOST_FOREACH
++
+ } // namespace boost
+ 
+ #endif
+--- boost/foreach.hpp
++++ boost/foreach.hpp
+@@ -165,7 +165,7 @@
+ //   this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy
+ //   at the global namespace for your type.
+ template<typename T>
+-inline boost::foreach::is_lightweight_proxy<T> *
++inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
+ boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+ 
+ template<typename T>
+@@ -190,7 +190,7 @@
+ //   this one works on legacy compilers. Overload boost_foreach_is_noncopyable
+ //   at the global namespace for your type.
+ template<typename T>
+-inline boost::foreach::is_noncopyable<T> *
++inline boost::BOOST_FOREACH::is_noncopyable<T> *
+ boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+ 
+ namespace boost

diff --git a/dev-libs/boost/files/boost-1.48.0-disable_icu_rpath.patch b/dev-libs/boost/files/boost-1.48.0-disable_icu_rpath.patch
new file mode 100644
index 0000000..a902d61
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-disable_icu_rpath.patch
@@ -0,0 +1,29 @@
+--- libs/locale/build/Jamfile.v2
++++ libs/locale/build/Jamfile.v2
+@@ -58,8 +58,8 @@
+ 
+ if $(ICU_LINK)
+ {
+-    ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
+-    ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
++    ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
++    ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
+ }
+ else
+ {
+@@ -117,7 +117,6 @@
+       <library>icuuc/<link>shared/<runtime-link>shared 
+       <library>icudt/<link>shared/<runtime-link>shared 
+       <library>icuin/<link>shared/<runtime-link>shared
+-      <dll-path>$(ICU_PATH)/bin
+         <runtime-link>shared ;
+ 
+ 
+@@ -176,7 +175,6 @@
+       <library>icuuc_64/<link>shared/<runtime-link>shared 
+       <library>icudt_64/<link>shared/<runtime-link>shared 
+       <library>icuin_64/<link>shared/<runtime-link>shared
+-      <dll-path>$(ICU_PATH)/bin64
+         <runtime-link>shared ;
+  
+     

diff --git a/dev-libs/boost/files/boost-1.48.0-disable_libboost_python3.patch b/dev-libs/boost/files/boost-1.48.0-disable_libboost_python3.patch
new file mode 100644
index 0000000..c24a56c
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-disable_libboost_python3.patch
@@ -0,0 +1,62 @@
+--- libs/python/build/Jamfile.v2
++++ libs/python/build/Jamfile.v2
+@@ -39,23 +39,6 @@
+     PYTHON_ID = [ regex.replace $(python-id) "[*\\/:\"\']" "_" ] ;
+ }
+ 
+-
+-rule find-py3-version
+-{
+-    local versions = [ feature.values python ] ;
+-    local py3ver ;
+-    for local v in $(versions)
+-    {
+-        if $(v) >= 3.0
+-        {
+-            py3ver = $(v) ;
+-        }
+-    }
+-    return $(py3ver) ;
+-}
+-
+-py3-version = [ find-py3-version ] ;
+-
+ project boost/python
+   : source-location ../src
+   : requirements
+@@ -82,7 +65,7 @@
+ rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
+ rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
+ 
+-rule lib_boost_python ( is-py3 ? )
++rule lib_boost_python
+ {
+ 
+     local python_major_version = [ MATCH "^([^.]+)" : [ feature.values python ] ] ;
+@@ -91,7 +74,7 @@
+     {
+         python2 = true ;
+     }
+-    lib [ cond $(is-py3) : boost_python3 : boost_python ]
++    lib boost_python
+         : # sources
+         numeric.cpp
+         list.cpp
+@@ -148,7 +131,6 @@
+             <dependency>config-warning
+ 
+             <python-debugging>on:<define>BOOST_DEBUG_PYTHON
+-            [ cond $(is-py3) : <python>$(py3-version) ]
+         :   # default build
+             <link>shared
+         :   # usage requirements
+@@ -160,9 +142,3 @@
+ 
+ lib_boost_python ;
+ boost-install boost_python ;
+-
+-if $(py3-version)
+-{
+-    lib_boost_python yes ;
+-    boost-install boost_python3 ;
+-}

diff --git a/dev-libs/boost/files/boost-1.48.0-gcc47.patch b/dev-libs/boost/files/boost-1.48.0-gcc47.patch
new file mode 100644
index 0000000..a7caebc
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-gcc47.patch
@@ -0,0 +1,14 @@
+diff --git a/boost/config/stdlib/libstdcpp3.hpp b/boost/config/stdlib/libstdcpp3.hpp
+index 52d5837..aaa8890 100644
+--- a/boost/config/stdlib/libstdcpp3.hpp
++++ b/boost/config/stdlib/libstdcpp3.hpp
+@@ -33,7 +33,8 @@
+ 
+ #ifdef __GLIBCXX__ // gcc 3.4 and greater:
+ #  if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
+-        || defined(_GLIBCXX__PTHREADS)
++        || defined(_GLIBCXX__PTHREADS) \
++        || defined(_GLIBCXX_HAS_GTHREADS)
+       //
+       // If the std lib has thread support turned on, then turn it on in Boost
+       // as well.  We do this because some gcc-3.4 std lib headers define _REENTANT

diff --git a/dev-libs/boost/files/boost-1.48.0-mpi_python3.patch b/dev-libs/boost/files/boost-1.48.0-mpi_python3.patch
new file mode 100644
index 0000000..a32eca9
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-mpi_python3.patch
@@ -0,0 +1,95 @@
+https://svn.boost.org/trac/boost/ticket/4657
+https://svn.boost.org/trac/boost/changeset/76290
+
+--- libs/mpi/src/python/datatypes.cpp
++++ libs/mpi/src/python/datatypes.cpp
+@@ -17,7 +17,9 @@
+ 
+ void export_datatypes()
+ {
++#if PY_MAJOR_VERSION < 3 
+   register_serialized(long(0), &PyInt_Type);
++#endif
+   register_serialized(false, &PyBool_Type);
+   register_serialized(double(0.0), &PyFloat_Type);
+ }
+--- libs/mpi/src/python/py_environment.cpp
++++ libs/mpi/src/python/py_environment.cpp
+@@ -11,6 +11,9 @@
+  *  This file reflects the Boost.MPI "environment" class into Python
+  *  methods at module level.
+  */
++
++#include <locale>
++#include <string>
+ #include <boost/python.hpp>
+ #include <boost/mpi.hpp>
+ 
+@@ -50,11 +53,64 @@
+ 
+   // If anything changed, convert C-style argc/argv into Python argv
+   if (mpi_argv != my_argv)
++  {
++#if PY_MAJOR_VERSION >= 3
++
++    wchar_t **argv_copy = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*mpi_argc);
++    /* We need a second copy, as Python might modify the first one. */
++    wchar_t **argv_copy2 = (wchar_t **)PyMem_Malloc(sizeof(wchar_t*)*mpi_argc);
++
++    if (!argv_copy || !argv_copy2) {
++      fprintf(stderr, "out of memory\n");
++      return false;
++    }
++
++    std::locale mylocale;
++    mbstate_t mystate;
++
++    const std::codecvt<char, wchar_t, mbstate_t>& myfacet =
++      std::use_facet<std::codecvt<char, wchar_t, mbstate_t> >(mylocale);
++
++    for (int i = 0; i < mpi_argc; i++) 
++    {
++      size_t length = strlen(mpi_argv[i]);
++
++      wchar_t *dest = (wchar_t *) PyMem_Malloc(sizeof(wchar_t) * (length + 1));
++
++      const char *from_next;
++      wchar_t *to_next;
++
++      std::codecvt<wchar_t,char,mbstate_t>::result myresult = 
++        myfacet.out(mystate,
++            mpi_argv[i], mpi_argv[i] + length + 1, from_next,
++            dest, dest+length+1, to_next);
++
++      if (myresult != std::codecvt<wchar_t,char,mbstate_t>::ok )
++      {
++        fprintf(stderr, "failure translating argv\n");
++        return 1;
++      }
++
++      argv_copy2[i] = argv_copy[i] = dest;
++      if (!argv_copy[i])
++          return false;
++    }
++
++    PySys_SetArgv(mpi_argc, argv_copy);
++
++    for (int i = 0; i < mpi_argc; i++) {
++        PyMem_Free(argv_copy2[i]);
++    }
++    PyMem_Free(argv_copy);
++    PyMem_Free(argv_copy2);
++#else
+     PySys_SetArgv(mpi_argc, mpi_argv);
++#endif
++  }
+ 
+-  for (int arg = 0; arg < my_argc; ++arg)
+-    free(my_argv[arg]);
+-  delete [] my_argv;
++  for (int arg = 0; arg < mpi_argc; ++arg)
++    free(mpi_argv[arg]);
++  delete [] mpi_argv;
+ 
+   return true;
+ }

diff --git a/dev-libs/boost/files/boost-1.48.0-no_strict_aliasing_python2.patch b/dev-libs/boost/files/boost-1.48.0-no_strict_aliasing_python2.patch
new file mode 100644
index 0000000..89f8109
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-no_strict_aliasing_python2.patch
@@ -0,0 +1,23 @@
+--- libs/python/build/Jamfile.v2
++++ libs/python/build/Jamfile.v2
+@@ -85,6 +85,12 @@
+ rule lib_boost_python ( is-py3 ? )
+ {
+ 
++    local python_major_version = [ MATCH "^([^.]+)" : [ feature.values python ] ] ;
++    local python2 ;
++    if $(python_major_version) = 2
++    {
++        python2 = true ;
++    }
+     lib [ cond $(is-py3) : boost_python3 : boost_python ]
+         : # sources
+         numeric.cpp
+@@ -119,6 +125,7 @@
+         :   # requirements
+             <link>static:<define>BOOST_PYTHON_STATIC_LIB 
+             <define>BOOST_PYTHON_SOURCE
++            [ cond $(python2) : <cxxflags>-fno-strict-aliasing ]
+           
+             # On Windows, all code using Python has to link to the Python
+             # import library.

diff --git a/dev-libs/boost/files/boost-1.48.0-python_linking.patch b/dev-libs/boost/files/boost-1.48.0-python_linking.patch
new file mode 100644
index 0000000..e7f4e7c
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-python_linking.patch
@@ -0,0 +1,24 @@
+--- libs/python/build/Jamfile.v2
++++ libs/python/build/Jamfile.v2
+@@ -109,20 +109,7 @@
+             <link>static:<define>BOOST_PYTHON_STATIC_LIB 
+             <define>BOOST_PYTHON_SOURCE
+             [ cond $(python2) : <cxxflags>-fno-strict-aliasing ]
+-          
+-            # On Windows, all code using Python has to link to the Python
+-            # import library.
+-            #
+-            # On *nix we never link libboost_python to libpython.  When
+-            # extending Python, all Python symbols are provided by the
+-            # Python interpreter executable.  When embedding Python, the
+-            # client executable is expected to explicitly link to
+-            # /python//python (the target representing libpython) itself.
+-            #
+-            # python_for_extensions is a target defined by Boost.Build to
+-            # provide the Python include paths, and on Windows, the Python
+-            # import library, as usage requirements.
+-            [ cond [ python.configured ] : <library>/python//python_for_extensions ]
++            [ cond [ python.configured ] : <library>/python//python ]
+             
+             # we prevent building when there is no python available
+             # as it's not possible anyway, and to cause dependents to

diff --git a/dev-libs/boost/files/boost-1.48.0-respect_python-buildid.patch b/dev-libs/boost/files/boost-1.48.0-respect_python-buildid.patch
new file mode 100644
index 0000000..51003db
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-respect_python-buildid.patch
@@ -0,0 +1,69 @@
+https://svn.boost.org/trac/boost/ticket/6286
+
+--- boostcpp.jam
++++ boostcpp.jam
+@@ -99,13 +99,6 @@
+     BUILD_ID = [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ;
+ }
+ 
+-# Python build id (only for Python libraries)
+-python-id = [ option.get "python-buildid" ] ;
+-if $(python-id)
+-{
+-    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
+-}
+-
+ ##############################################################################
+ #
+ # 1. The 'tag' function that adds decoration suitable to the properties if
+--- libs/mpi/build/Jamfile.v2
++++ libs/mpi/build/Jamfile.v2
+@@ -8,6 +8,8 @@
+ #  Authors: Douglas Gregor
+ #           Andrew Lumsdaine
+ 
++import option ;
++import regex ;
+ import mpi ;
+ import indirect ;
+ import python ;
+@@ -24,6 +26,13 @@
+     <tag>@$(__name__).tag
+   ;
+ 
++# Python build id (only for Python libraries)
++python-id = [ option.get "python-buildid" ] ;
++if $(python-id)
++{
++    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
++}
++
+ rule tag ( name : type ? : property-set )
+ {
+     local result = $(name) ;
+--- libs/python/build/Jamfile.v2
++++ libs/python/build/Jamfile.v2
+@@ -2,6 +2,8 @@
+ # Software License, Version 1.0. (See accompanying
+ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ 
++import option ;
++import regex ;
+ import os ;
+ import indirect ;
+ import modules ;
+@@ -30,6 +32,14 @@
+         ;
+ }
+ 
++# Python build id (only for Python libraries)
++python-id = [ option.get "python-buildid" ] ;
++if $(python-id)
++{
++    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
++}
++
++
+ rule find-py3-version
+ {
+     local versions = [ feature.values python ] ;

diff --git a/dev-libs/boost/files/boost-1.48.0-support_dots_in_python-buildid.patch b/dev-libs/boost/files/boost-1.48.0-support_dots_in_python-buildid.patch
new file mode 100644
index 0000000..af65f64
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.48.0-support_dots_in_python-buildid.patch
@@ -0,0 +1,22 @@
+--- libs/mpi/build/Jamfile.v2
++++ libs/mpi/build/Jamfile.v2
+@@ -30,7 +30,7 @@
+ python-id = [ option.get "python-buildid" ] ;
+ if $(python-id)
+ {
+-    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
++    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:\"\']" "_" ] ;
+ }
+ 
+ rule tag ( name : type ? : property-set )
+--- libs/python/build/Jamfile.v2
++++ libs/python/build/Jamfile.v2
+@@ -36,7 +36,7 @@
+ python-id = [ option.get "python-buildid" ] ;
+ if $(python-id)
+ {
+-    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
++    PYTHON_ID = [ regex.replace $(python-id) "[*\\/:\"\']" "_" ] ;
+ }
+ 
+ 

diff --git a/dev-libs/boost/files/buildid-fix.patch b/dev-libs/boost/files/buildid-fix.patch
new file mode 100644
index 0000000..2786f7c
--- /dev/null
+++ b/dev-libs/boost/files/buildid-fix.patch
@@ -0,0 +1,23 @@
+--- Jamroot.orig	2009-02-10 17:36:25.000000000 +0100
++++ Jamroot	2009-02-10 17:37:09.000000000 +0100
+@@ -442,15 +442,15 @@
+             local noversion-file ;
+             if $(nt)
+             {
+-                noversion-file = [ MATCH "(.*)-[0-9_]+([.]lib)" : $(name) ] ;
++                noversion-file = [ MATCH "(.*)-[0-9_]+(.*[.]lib)" : $(name) ] ;
+             }
+             else
+             {
+                 noversion-file = 
+-                  [ MATCH "(.*)-[0-9_]+([.]so)[.0-9]*" : $(name) ] 
+-                  [ MATCH "(.*)-[0-9_]+([.]dylib)" : $(name) ] 
+-                  [ MATCH "(.*)-[0-9_]+([.]a)" : $(name) ] 
+-                  [ MATCH "(.*)-[0-9_]+([.]dll[.]a)" : $(name) ] ;
++                  [ MATCH "(.*)-[0-9_]+(.*[.]so)[.0-9]*" : $(name) ] 
++                  [ MATCH "(.*)-[0-9_]+(.*[.]dylib)" : $(name) ] 
++                  [ MATCH "(.*)-[0-9_]+(.*[.]a)" : $(name) ] 
++                  [ MATCH "(.*)-[0-9_]+(.*[.]dll[.]a)" : $(name) ] ;
+             }
+                         
+             local new-name = 

diff --git a/dev-libs/boost/files/point_release_naming_fix.patch b/dev-libs/boost/files/point_release_naming_fix.patch
new file mode 100644
index 0000000..8da5efa
--- /dev/null
+++ b/dev-libs/boost/files/point_release_naming_fix.patch
@@ -0,0 +1,14 @@
+--- Jamroot.orig	2011-03-15 12:49:05.000000000 +0000
++++ Jamroot	2011-03-15 12:49:20.000000000 +0000
+@@ -150,10 +150,7 @@
+ 
+ local version-tag = [ MATCH "^([^.]+)[.]([^.]+)[.]([^.]+)" : $(BOOST_VERSION) ]
+     ;
+-if $(version-tag[3]) = 0
+-{
+-    version-tag = $(version-tag[1-2]) ;
+-}
++version-tag = $(version-tag[1-2]) ;
+ 
+ constant BOOST_VERSION_TAG : $(version-tag:J="_") ;
+ 

diff --git a/dev-libs/boost/files/random-Jamfile b/dev-libs/boost/files/random-Jamfile
new file mode 100644
index 0000000..5cb6f6b
--- /dev/null
+++ b/dev-libs/boost/files/random-Jamfile
@@ -0,0 +1,15 @@
+# Copyright (c) 2006 Tiziano Mueller
+#
+# Use, modification and distribution of the file is subject to the
+# Boost Software License, Version 1.0.
+# (See at http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/random
+	: source-location ../ ;
+
+SOURCES = random_device ;
+
+lib boost_random
+	: $(SOURCES).cpp 
+	: <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ;

diff --git a/dev-libs/boost/files/random-Jamfile-1.45.0 b/dev-libs/boost/files/random-Jamfile-1.45.0
new file mode 100644
index 0000000..81fb136
--- /dev/null
+++ b/dev-libs/boost/files/random-Jamfile-1.45.0
@@ -0,0 +1,15 @@
+# Copyright (c) 2006 Tiziano Mueller
+#
+# Use, modification and distribution of the file is subject to the
+# Boost Software License, Version 1.0.
+# (See at http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/random
+	: source-location ../src ;
+
+SOURCES = random_device ;
+
+lib boost_random
+	: $(SOURCES).cpp 
+	: <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ;

diff --git a/dev-libs/boost/files/random-Jamfile-1.46.1 b/dev-libs/boost/files/random-Jamfile-1.46.1
new file mode 100644
index 0000000..81fb136
--- /dev/null
+++ b/dev-libs/boost/files/random-Jamfile-1.46.1
@@ -0,0 +1,15 @@
+# Copyright (c) 2006 Tiziano Mueller
+#
+# Use, modification and distribution of the file is subject to the
+# Boost Software License, Version 1.0.
+# (See at http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/random
+	: source-location ../src ;
+
+SOURCES = random_device ;
+
+lib boost_random
+	: $(SOURCES).cpp 
+	: <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ;

diff --git a/dev-libs/boost/files/random-Jamfile-1.47.0 b/dev-libs/boost/files/random-Jamfile-1.47.0
new file mode 100644
index 0000000..81fb136
--- /dev/null
+++ b/dev-libs/boost/files/random-Jamfile-1.47.0
@@ -0,0 +1,15 @@
+# Copyright (c) 2006 Tiziano Mueller
+#
+# Use, modification and distribution of the file is subject to the
+# Boost Software License, Version 1.0.
+# (See at http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/random
+	: source-location ../src ;
+
+SOURCES = random_device ;
+
+lib boost_random
+	: $(SOURCES).cpp 
+	: <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ;

diff --git a/dev-libs/boost/files/remove-toolset-1.41.0.patch b/dev-libs/boost/files/remove-toolset-1.41.0.patch
new file mode 100644
index 0000000..b7d797c
--- /dev/null
+++ b/dev-libs/boost/files/remove-toolset-1.41.0.patch
@@ -0,0 +1,11 @@
+--- Jamroot	2009-08-23 18:17:37.000000000 +0200
++++ Jamroot.gentoo	2009-10-21 13:31:46.000000000 +0200
+@@ -352,7 +352,7 @@
+         if $(layout) = versioned
+         {
+             result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+         }        

diff --git a/dev-libs/boost/files/remove-toolset-1.42.0.patch b/dev-libs/boost/files/remove-toolset-1.42.0.patch
new file mode 100644
index 0000000..b7d797c
--- /dev/null
+++ b/dev-libs/boost/files/remove-toolset-1.42.0.patch
@@ -0,0 +1,11 @@
+--- Jamroot	2009-08-23 18:17:37.000000000 +0200
++++ Jamroot.gentoo	2009-10-21 13:31:46.000000000 +0200
+@@ -352,7 +352,7 @@
+         if $(layout) = versioned
+         {
+             result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+         }        

diff --git a/dev-libs/boost/files/remove-toolset-1.45.0.patch b/dev-libs/boost/files/remove-toolset-1.45.0.patch
new file mode 100644
index 0000000..c80191c
--- /dev/null
+++ b/dev-libs/boost/files/remove-toolset-1.45.0.patch
@@ -0,0 +1,11 @@
+--- Jamroot	2010-11-17 11:51:56.000000000 +0200
++++ Jamroot.gentoo	2011-01-06 15:07:17.893270002 +0200
+@@ -377,7 +377,7 @@
+         if $(layout) = versioned
+         {
+             result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+         }        

diff --git a/dev-libs/boost/files/remove-toolset-1.46.1.patch b/dev-libs/boost/files/remove-toolset-1.46.1.patch
new file mode 100644
index 0000000..c80191c
--- /dev/null
+++ b/dev-libs/boost/files/remove-toolset-1.46.1.patch
@@ -0,0 +1,11 @@
+--- Jamroot	2010-11-17 11:51:56.000000000 +0200
++++ Jamroot.gentoo	2011-01-06 15:07:17.893270002 +0200
+@@ -377,7 +377,7 @@
+         if $(layout) = versioned
+         {
+             result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+         }        

diff --git a/dev-libs/boost/files/remove-toolset-1.47.0.patch b/dev-libs/boost/files/remove-toolset-1.47.0.patch
new file mode 100644
index 0000000..d74a882
--- /dev/null
+++ b/dev-libs/boost/files/remove-toolset-1.47.0.patch
@@ -0,0 +1,11 @@
+--- boostcpp.jam	2010-11-17 11:51:56.000000000 +0200
++++ boostcpp.jam.gentoo	2011-01-06 15:07:17.893270002 +0200
+@@ -377,7 +377,7 @@
+         if $(layout) = versioned
+         {
+             result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+         }        

diff --git a/dev-libs/boost/files/remove-toolset-1.48.0.patch b/dev-libs/boost/files/remove-toolset-1.48.0.patch
new file mode 100644
index 0000000..df91529
--- /dev/null
+++ b/dev-libs/boost/files/remove-toolset-1.48.0.patch
@@ -0,0 +1,11 @@
+--- boostcpp.jam
++++ boostcpp.jam
+@@ -377,7 +377,7 @@
+         if $(layout) = versioned
+         {
+             result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+         }        

diff --git a/dev-libs/boost/files/remove_toolset_from_targetname.patch b/dev-libs/boost/files/remove_toolset_from_targetname.patch
new file mode 100644
index 0000000..1a0cb1c
--- /dev/null
+++ b/dev-libs/boost/files/remove_toolset_from_targetname.patch
@@ -0,0 +1,11 @@
+--- boost_1_36_0/Jamroot.orig	2008-11-14 16:36:10.000000000 +0100
++++ boost_1_36_0/Jamroot	2008-11-14 16:36:54.000000000 +0100
+@@ -311,7 +311,7 @@
+         if $(layout) = versioned
+         {
+             local result = [ common.format-name
+-                <base> <toolset> <threading> <runtime> -$(BOOST_VERSION_TAG)
++                <base> <threading> <runtime> -$(BOOST_VERSION_TAG)
+                 -$(BUILD_ID)
+                 : $(name) : $(type) : $(property-set) ] ;
+             


                 reply	other threads:[~2012-09-04 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346777851.efda2163b4c1845f1ed4fa0624d7b47f8e1b2619.axs@gentoo \
    --to=axs@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox