diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2013-06-14 18:50:38 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-06-14 18:50:38 +0000 |
commit | fcae1259a607bb5e5eb3822a7310ffef627b7812 (patch) | |
tree | 26163a3176d520f699ec21cdcb228e0f2e8d8598 /net-p2p | |
parent | Version bump, drop old (diff) | |
download | historical-fcae1259a607bb5e5eb3822a7310ffef627b7812.tar.gz historical-fcae1259a607bb5e5eb3822a7310ffef627b7812.tar.bz2 historical-fcae1259a607bb5e5eb3822a7310ffef627b7812.zip |
Version bumps
Package-Manager: portage-2.1.12.2/cvs/Linux x86_64
Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/bitcoind/ChangeLog | 8 | ||||
-rw-r--r-- | net-p2p/bitcoind/Manifest | 33 | ||||
-rw-r--r-- | net-p2p/bitcoind/bitcoind-0.8.2.ebuild | 116 | ||||
-rw-r--r-- | net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch | 183 |
4 files changed, 324 insertions, 16 deletions
diff --git a/net-p2p/bitcoind/ChangeLog b/net-p2p/bitcoind/ChangeLog index b6958f6a8506..d3b7d17a668f 100644 --- a/net-p2p/bitcoind/ChangeLog +++ b/net-p2p/bitcoind/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-p2p/bitcoind # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.65 2013/06/01 15:03:03 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.66 2013/06/14 18:49:59 blueness Exp $ + +*bitcoind-0.8.2 (14 Jun 2013) + + 14 Jun 2013; Anthony G. Basile <blueness@gentoo.org> +bitcoind-0.8.2.ebuild, + +files/0.8.2-sys_leveldb.patch: + Version bumps 01 Jun 2013; Anthony G. Basile <blueness@gentoo.org> bitcoind-0.8.1.ebuild: Force snappy off for leveldb since it may have security issues diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest index bf60bae4d8a9..b89c4f2cfc1a 100644 --- a/net-p2p/bitcoind/Manifest +++ b/net-p2p/bitcoind/Manifest @@ -7,6 +7,7 @@ AUX 0.4.7-reopen_log_file.patch 2652 SHA256 43fa0e4d6bc3abf5cf744fade98ff0269944 AUX 0.5.0.5+bip16-eligius_sendfee.patch 6739 SHA256 2e16bca9106bcb8056efc5a60791226119ca011cd007e4b547de4c23f0d8e9a4 SHA512 213b12973557993cbe7fe4a8dcaccec0bb732dc3f45f242d4e42de576af75e1f76d3d1aa4501bf4f63e304773505ca768c1a5eb7f914b87bbb34f81b5ece1b87 WHIRLPOOL 6f285997fac74ca70ede3baeb708f6d7ba3872fb390cddb56da9225955a4e78c3eb466fc3792a12c527d6f4b1e0d3637f2d67553b28c51b32a1f61cf92b01a06 AUX 0.6.0.8-reopen_log_file.patch 2671 SHA256 c8fb07548fa9e096c92e322f5d5201f20cd9f32ed52fdda395e243a18fca79e3 SHA512 e77fe546283d8c7f699c3091d77af7f622486a14e7e72045f1675ab86e2c9156d812ffded9a8e47b63f4bd053ab976c7063986dd2611c60f4585ca827c352e1a WHIRLPOOL 36c95d8ae28cebd5eef01b20e60fd04ab4596a2c2dbeff3d0add15524c1ee11cc67fd15f4f7e1136454b51f14d75f3a9620063a3b9809f1492a62d9d6e03a88d AUX 0.8.0-sys_leveldb.patch 6739 SHA256 7a9548955cf923badfd0eebf5c86531de55f15b93c97da609eb2a3cbf191bcc7 SHA512 c15c36165deff50762ae6d710c7e7b341b78ee395be4ec976e8e3a2d4aa3902f78226e03d85d43033299e1ae6a4ec48cdc4e912a90c065125c1a2a07933109a5 WHIRLPOOL 5f86b372bb7226626fd4eee5bfe2519ae84db8851a591e6ee204b508203c0723b7327ae5c1e8a68c8e961471f95939ef212a301678760531508d15c5aecaf29e +AUX 0.8.2-sys_leveldb.patch 6647 SHA256 45ac78376c1983babf0e001b18196b777cd4bfca1c6b92fad62302d70ec9aabf SHA512 0aaa00584bc56984133f388523b2084d94a620987367e0eff39cc6debc39738586fb991e7cb84f54eb56f27992929d562261bb867e1091679a51839185626edf WHIRLPOOL c027065cedb40a946dc7fa1f5dea6908d35290147f53df178d7ff416c2a5d5bd9f7e6802779d8a0a04044e04bfc4dd76433ad2dcb48b65869d3fbfe8c7bb3748 AUX bitcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123 AUX bitcoin.confd 238 SHA256 72300b41d57325de5a5f2ddea449d5f414f278549fb665d60746707ee5de2549 SHA512 2b010d8c773a76868a11626ba0552f122cd51293cb39e06b7ed7e17be47f9e3790cc090f8311b32d441d3ff1eb4db266a4b2cd08693f7edbe2dde178254838d1 WHIRLPOOL f51d97b828b4b096d1ca924cb7256f648b94ae098a4f10dcfbac7d6045cf84da0c203b1e2d5569f3b304ba193501c9b9239c5ee1a1c11fbdb62bb9909c384358 AUX bitcoin.initd 2481 SHA256 5dace582c4bf05d893166794ce620ca13b794b695376030f7d319bb22a0c956a SHA512 3e360bf8310f7d2acf9189f9baf87068a6764996cbfe1a0e3ca17fbebd0b6b8cb68212401db15c59c94a0e7ad2f933f90a765a2d653eface74e4ae8f495fda06 WHIRLPOOL 321a903dd85743cb23909614d1d1fe248d30374f0ea5d68c4f25d95b55ad2ec3f2164f5255a428ae79cd1e9b5e7efc10b09204b0bd68c5a557313b47124d0f16 @@ -21,28 +22,30 @@ DIST bitcoin-v0.6.3.tgz 1362094 SHA256 3f1a0df5d713c9e4f54f00a8f3f75c6828041afd8 DIST bitcoin-v0.6.5_rc2-r1.tgz 1398755 SHA256 514c5874f6e5fed11bed574a7af17c68a598993f0a1ba091ac6e4a7b80e067e5 SHA512 85ec6bc8f40c5f89e17f6f5242a166ad226ab544ac6bcf07ef5e7d52dbc3adb5930476e2405ca343c1aa6aa41fd2f44875f9cd5f6a731890c880df10b2f6b41f WHIRLPOOL 680774f0be330991e8217ae0e1cc5e334afabe5203e5aa4496b787e73b5e3528715243f61bea8a3e73f3e740927fc7e427bd9b1ac0872cbfc485a1b9c85776e9 DIST bitcoin-v0.7.3_rc2.tgz 1648571 SHA256 d2712c4b79bac120dee8285f31e12042e5d4e51cefcfa49bfb152440e6657281 SHA512 2fe4ebb21b425e49f9be8b770808730f5abca01512f3ec2a17dd93e55e8dd78f9ad0e460bd510ddf71628022fb8afd4efe7df62a9baa932c9eb3f5c3e6a2686e WHIRLPOOL 8cd376369c6c5d08db0689415c59e2ea5ff97a6ad3e8a48daf524207f721bf78014ec92fe069b551a1b9daf478e099c5812337a8eb8e7759bb1b6fbdc8078a73 DIST bitcoin-v0.8.1.tgz 1965109 SHA256 213ccd668e9888688b81f6c3f8875a57b1e259e5ed7713bd61a1ffe294bca414 SHA512 183196ea959de8e2db68d278fc8123d78459c9716e0192ce9e24f69b16868324864fd45c5632c7f75c09d8195ec34b793e1c086dcd151ab915739c140fd1b559 WHIRLPOOL b2c9e616344c8de0530d6f69a100f3b9b28940b101d4c80559c683d99154b069a6e3572f1f9fc1ac4595b749f9006130a8bf4025a1564980ed49608c19442aba +DIST bitcoin-v0.8.2.tgz 3181487 SHA256 c0d4d3f59e11349bb13d6a78a37876888b1884bd09e09325d89efb59007ddf2f SHA512 423b4589baa859f7407b08ebbceb4a55f1eef1dfd63a90ab909d5b199f371c200bf5e201965fe4cc00116361982786db0b43e890fdee9917618f5ad2ae854fa2 WHIRLPOOL a39ef2e636f25dd52eb44e1483a735693e91cbbae4ba0524a9727414aaef6c1ba4d7a8325b4616335ecf7f426406e592c85734867f5d5d024413f7039df717ee EBUILD bitcoind-0.4.9_rc2.ebuild 2332 SHA256 37e0d0a65deffbcf1f982025dee8f9947c3e4db508ef72592561a44c9aa209cf SHA512 d765784f07cfa5446d54af056b67a46ca6bc1dcdc616dc1b782c979250de3833fde7d33610501c95907610aa148e49d3bd7636394a9952a9dc4e26797eadfa9c WHIRLPOOL 1cacacced689c6176cb09fc96b89914cd8eb2c8dc39fe4dfa9a356179990a6849f163da9ad0b05ac3f15ead2a182a5d2cc833ea7be8400b73e6ed22b65eeed52 EBUILD bitcoind-0.5.8_rc2.ebuild 2649 SHA256 16cac31ebd6356e72b3c73df38dd3d36eb6f95923fd1528086beaa8f456dd4b7 SHA512 2b4f6e167c71e0037e9964f952c9f5367cd320b8bc1bbd155d2bc97aaccfc884f137a5704fab3bfce6608242903eeec75fcdd621d987082876f88ee31095c78a WHIRLPOOL e115718fd52520542bc25dcdf5596ea76c8dedf2623eaa646865d3f2605f534af886aeb5326ff4cfb0866f503564df0d305ff82fe4712a3e261aeab8bcdb25c0 EBUILD bitcoind-0.6.3.ebuild 2737 SHA256 b964ac2a3b467e6a14ccf24e4d862db6e795caf3e3090fed8f21aa49bdda8268 SHA512 ce739cd638f0e7aca4292bf4e4767b040217e8cf664f950f87185e52ca01aa0e17c5228e0af19207e08b222439dfe184fb959573ec4c7316a79bb8c8a8d639f0 WHIRLPOOL ab69a42ebc26bba88d9b5a36ceda91721a07e2d1f6362b5b6b5a5886252cb1b509002d6b9206d9abbd38ba47c09ccd3094df1a57a509a85d2520f7ec1d549c02 EBUILD bitcoind-0.6.5_rc2.ebuild 2567 SHA256 934f82c9868cf3cd86af20ab2f696c0433ed53d47ae6513dcb72343d904071c3 SHA512 a7028800ec4210e4b115d1fae0839db4ffe1ca6784178067e212efec9802e5b9b88cc9d589792eaaf365af94d042046e32d82d971b70d521be24b544b9b54297 WHIRLPOOL 0ff5adbb75fea723ee156e0b9fc0ffa2a4760bb98bb82db723cc316d02498fb9f3c5a29a49ec60fd8ff4b413714226503c38abb90033b5ad9d77143c4140b15f EBUILD bitcoind-0.7.3_rc2.ebuild 2368 SHA256 19d0c943a24605eae4d8cfdbab36a0ee965b0dfda81ebb99535899ccd099fcbf SHA512 ae6e104dd3b809cc0d6266c633deeee64c99d4a51358f5ee6b857eddeaf1808b1eb5671d40d339f7311f555f97d67483a6a46a064f072baeb9cd0d5482b66bd4 WHIRLPOOL 2186fb8dcbfe3a056856641bdd0e159fbfee43363ade60cf737b900fcc3c58ff8378596e91ccfa18988877cbb5303f7f7b63314a223d82ae16096d31ed06bfdb EBUILD bitcoind-0.8.1.ebuild 2498 SHA256 f446d5523fffde32545f2473c3275de6345c05c94792c21e28d6d312263a0c31 SHA512 3d434f3b5c3e34446f8bd9f0186450963a8895506d49bd1b870e08ce6385e72f6338c75b6ac2886984b774018fbb1b0b7049571def0a2517c75907747ef603aa WHIRLPOOL 82efbf66081657f888fdbfff63b54039704565258190a96d13503e908a0b89d88afad07c40d73988acbc7caa1307f307f034bfcac7424af865a4accf4434877d -MISC ChangeLog 16657 SHA256 5e199711bd9531256c72668dde30e132645cf4d25ba7ba364d0d1d0606528ec5 SHA512 2146ce26d359f5b9739960442f49bafad360b167c0d3d5bad5cf1cb49039ac7a2939bfb3626e9fed2149378012180b07674da566742741f664af18b64446fe46 WHIRLPOOL c51337288c1c3e107de1e21fb35bd306b58fb4f13d4724f1cdec28a76424669ee7a0de4b2651621eb653b1bace93c21c462d2d89c0af7dd82c2d3bde2ce8b8dd +EBUILD bitcoind-0.8.2.ebuild 2674 SHA256 7c3a4342e6afc9697738b54452751dd4719e62e0dd010f8baef0ec43f7baf559 SHA512 72fda9351d72946e30928cd97d5b184ae05ad70cccb832cdef9a869026b3c48fb91b9dc3fd86575228ddbf1efd49772a8879567b4260740183436c7a168f2541 WHIRLPOOL 5cf52551324bab50f504a6f4e5babd00e32279cea0f9b8014ec2bafcebec82b9f625eecd483bd41bf1881a55387be3917eee9e8a04f481a427998144853736a5 +MISC ChangeLog 16818 SHA256 45be5b4362598a7ac61167618e36f6f1e18ead2ec370142040919aacbf507512 SHA512 514196069c3657cb72c6a1e73f0c6dadecd4b2af1a243c3ed7391c50b4e557a784a820a8ced6250b26bbe400c3d6b8fcdfe565a73d3fd25aabb6423f160586cc WHIRLPOOL 0089961dd3ccd072777b80e2cdd5822ca0cd52b2faddfbc83d36193dbd09388691e6cc78c1c594cf3270335426b9bcaad4aca0e4a12e0de6ab1dc3b3bb29365a MISC metadata.xml 657 SHA256 b6f8689a4a2e12bf1c9ae814e2fe388595e335da9f90bea4dc3ced777bcfe083 SHA512 61e60028b85ac4237c85ce2a4ee3b79f4199f28c0a6fb3858214d30600681f893f47ce8a9150195cfe7f1fbf17fde3bb1fcda815ce5bbcc2a72b21c9b026e664 WHIRLPOOL 876219233a7b36604a98c712fd703eaba0ec4fef77a93d0d35fe1af4c3ea295ffb8ecde3fd15a8107dafef07aa36b72607e0e992c7b9b2efe775c4374a70dd4a -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) +Version: GnuPG v2.0.20 (GNU/Linux) -iQIcBAEBCAAGBQJRqg1HAAoJEJOE+m71LUu6pR0P/3DIetpcWuqjALJ04XwIM85y -eX/1VSF1HzMtPM/m79O0apKoFgcE73NQV0AdhkBifHp2kDNzjNhHimgTdJ0SJoZc -FJdpVJfi2wwrOpKiMSz8iRAyh2SCSP1QpwI+SHorWzyDQ66xhGv0021t8NbYydex -hRZwXKRrv4EsSk/c+iEJ2JlFdulkw5WO5TT5PgtU3olFIxZm0LhH/2gmfThi0KCa -oJT8AwFQva1Ck/VIMNEdEdnf/CjCWwjQNjbcluBMfwqBjqnGOKrJ81tGVTgd+O1Z -G17D6lxpcQqtQKfLYJQ2mMMtBw6RZRAwgx67CZC5QByHD/qlxRHP0a7uwq6gMSAI -CtStbtU2tYnXvHBFNTwX5HvLPGLVPB2EBuGP3Blwaq+2rICOtUzKO5QOGhyhidey -q2BsBFquyAUYSneIQpxlDHJRr0xBgQZMDvDgY5+b+/9dDUwTBPwwhgI7EQHTVRHC -0KCw/ZHVwAK/CaIReBluf5LFTMfYx4xcwBO3fxICUIuX0W1Mua4QGW1JcAGUS9bJ -J5ROK4kUMJS+u/DX1x9CmWtntDZx48oloV4HYdj+S9J18UtLuxmBDiXoucNGthg4 -LU5bBbVePn+Tlt5A/GnrJymr8WA/IqwBMnLERsHsDI1zuvKDiNg6c2pVsR6EFUba -C6uxQQIriRhHo0fcK5jE -=O34r +iQIcBAEBCAAGBQJRu2YbAAoJEJOE+m71LUu6UZAP/0qaNMGo5pU7YO8rixQ3ZVIQ +yN8FyvtCKS6EX9OUYAkXeXtlHNTtR4uJjr0HTeU/c+haD5o0hGZi5AnaNx1lx9sH +vc6IP+pcn+Mpy72ynptlCUm4YpIwJCZyKax9lcpjXpqZ9Mm0GDS5j2bbikiSguoD +gUMnozGK3f8E0Uteseok9/KwhbnglTmh4+ULUSHx+SCR2QiJB4sfzWPuy9w/0ng3 +45Dtni9/68CUHJ0fO74N2cr8TzVxG5Fw7coD7ctuOm2qjsLxApUa9BDjpP64e9dF +mGdBi0S95yWxctCaSNEBzLGYvgl/J2hvdO55En79Qa1JAuOuS7/YjaCdo4foPZWA +7FYzT9+3zpUTTamWGtbUBxDO3xV2IMwK5nxZhK6IeO7MPGPVk54OwQ/HuDl4lHtc +gc+DM7+gwbgIu1Zy5MYUEpXE0XKaqHoVBAdsSY/N+mkYgLfs/qKELPP3tAGIrFKf +1iLOf3duSmH+gS8rAJRmzsq6BOGVLkLJ8foOc/v/NOnQ6I1UklLuMqFsTJoOfzm9 +Gc7V1Ynm7DADR6J3Ppe4GICDoGQLNU2VPxkv3bRjvep5RAVsywvSCvjZKyKWYSA1 +96MchzNtYkstjuuReP9BcRmHCeBAfT+44EDCzowmeItqVbPaqaEuIfba3s0fem+0 +pnzA/vZDW4n3DtsibjKR +=MlQ1 -----END PGP SIGNATURE----- diff --git a/net-p2p/bitcoind/bitcoind-0.8.2.ebuild b/net-p2p/bitcoind/bitcoind-0.8.2.ebuild new file mode 100644 index 000000000000..87e83b31a502 --- /dev/null +++ b/net-p2p/bitcoind/bitcoind-0.8.2.ebuild @@ -0,0 +1,116 @@ +# Copyright 2010-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.8.2.ebuild,v 1.1 2013/06/14 18:49:59 blueness Exp $ + +EAPI="4" + +DB_VER="4.8" + +inherit db-use eutils versionator toolchain-funcs + +MyPV="${PV/_/}" +MyPN="bitcoin" +MyP="${MyPN}-${MyPV}" + +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services" +HOMEPAGE="http://bitcoin.org/" +SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz +" + +LICENSE="MIT ISC GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="examples ipv6 logrotate upnp" + +RDEPEND=" + >=dev-libs/boost-1.41.0[threads(+)] + dev-libs/openssl:0[-bindist] + logrotate? ( + app-admin/logrotate + ) + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] + =dev-libs/leveldb-1.9.0*[-snappy] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 + sys-apps/sed +" + +S="${WORKDIR}/${MyP}" + +pkg_setup() { + local UG='bitcoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}" +} + +src_prepare() { + epatch "${FILESDIR}/${PV}-sys_leveldb.patch" + rm -r src/leveldb + + if has_version '>=dev-libs/boost-1.52'; then + sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix + fi +} + +src_compile() { + OPTS=() + + OPTS+=("DEBUGFLAGS=") + OPTS+=("CXXFLAGS=${CXXFLAGS}") + OPTS+=("LDFLAGS=${LDFLAGS}") + + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + if use upnp; then + OPTS+=(USE_UPNP=1) + else + OPTS+=(USE_UPNP=) + fi + use ipv6 || OPTS+=("USE_IPV6=-") + + OPTS+=("USE_SYSTEM_LEVELDB=1") + + cd src || die + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN} +} + +src_test() { + cd src || die + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin + ./test_bitcoin || die 'Tests failed' +} + +src_install() { + dobin src/${PN} + + insinto /etc/bitcoin + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf + fperms 600 /etc/bitcoin/bitcoin.conf + + newconfd "${FILESDIR}/bitcoin.confd" ${PN} + newinitd "${FILESDIR}/bitcoin.initd" ${PN} + + keepdir /var/lib/bitcoin/.bitcoin + fperms 700 /var/lib/bitcoin + fowners bitcoin:bitcoin /var/lib/bitcoin/ + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin + dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf + + dodoc doc/README.md doc/release-notes.md + + if use examples; then + docinto examples + dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools} + fi + + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/bitcoind.logrotate" bitcoind + fi +} diff --git a/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch b/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch new file mode 100644 index 000000000000..92f803f4e4f1 --- /dev/null +++ b/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch @@ -0,0 +1,183 @@ +diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro +index cf80986..520b5df 100644 +--- a/bitcoin-qt.pro ++++ b/bitcoin-qt.pro +@@ -4,7 +4,7 @@ macx:TARGET = "Bitcoin-Qt" + VERSION = 0.8.0 + INCLUDEPATH += src src/json src/qt + QT += network +-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE ++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV + CONFIG += no_include_pwd + CONFIG += thread + +@@ -98,25 +98,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets + } + ++contains(USE_SYSTEM_LEVELDB, 1) { ++ LIBS += -lleveldb ++} else { + INCLUDEPATH += src/leveldb/include src/leveldb/helpers +-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a ++LIBS += $$PWD/src/leveldb/libleveldb.a + !win32 { + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a + } else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a + } + genleveldb.target = $$PWD/src/leveldb/libleveldb.a + genleveldb.depends = FORCE + PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a + QMAKE_EXTRA_TARGETS += genleveldb ++} + # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean ++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true + + # regenerate src/build.h + !win32|contains(USE_BUILD_INFO, 1) { +diff --git a/src/leveldb.cpp b/src/leveldb.cpp +index b41764f..f71e801 100644 +--- a/src/leveldb.cpp ++++ b/src/leveldb.cpp +@@ -8,7 +8,9 @@ + #include <leveldb/env.h> + #include <leveldb/cache.h> + #include <leveldb/filter_policy.h> ++#ifndef LEVELDB_WITHOUT_MEMENV + #include <memenv/memenv.h> ++#endif + + #include <boost/filesystem.hpp> + +@@ -42,8 +44,12 @@ CLevelDB::CLevelDB(const boost::filesystem::path &path, size_t nCacheSize, bool + options = GetOptions(nCacheSize); + options.create_if_missing = true; + if (fMemory) { ++#ifndef LEVELDB_WITHOUT_MEMENV + penv = leveldb::NewMemEnv(leveldb::Env::Default()); + options.env = penv; ++#else ++ throw std::runtime_error("CLevelDB(): compiled without memenv support"); ++#endif + } else { + if (fWipe) { + printf("Wiping LevelDB in %s\n", path.string().c_str()); +diff --git a/src/makefile.unix b/src/makefile.unix +index 081edaf..1735b89 100644 +--- a/src/makefile.unix ++++ b/src/makefile.unix +@@ -104,8 +104,7 @@ xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-para + # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. + xLDFLAGS=$(LDHARDENING) $(LDFLAGS) + +-OBJS= \ +- leveldb/libleveldb.a \ ++BASEOBJS := \ + obj/alert.o \ + obj/version.o \ + obj/checkpoints.o \ +@@ -114,7 +113,6 @@ OBJS= \ + obj/crypter.o \ + obj/key.o \ + obj/db.o \ +- obj/init.o \ + obj/keystore.o \ + obj/main.o \ + obj/net.o \ +@@ -134,24 +132,43 @@ OBJS= \ + obj/hash.o \ + obj/bloom.o \ + obj/noui.o \ +- obj/leveldb.o \ + obj/txdb.o + ++OBJS := \ ++ obj/leveldb.o \ ++ obj/init.o \ ++ $(BASEOBJS) ++ ++TESTOBJS := \ ++ obj-test/leveldb.o \ ++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \ ++ $(BASEOBJS) ++ + + all: bitcoind + + test check: test_bitcoin FORCE + ./test_bitcoin + ++ifdef USE_SYSTEM_LEVELDB ++ LIBS += -lleveldb ++ TESTLIBS += -lmemenv ++else + # + # LevelDB support + # + MAKEOVERRIDES = +-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a ++LIBS += $(CURDIR)/leveldb/libleveldb.a ++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a + DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) + DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) + leveldb/libleveldb.a: +- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. ++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd .. ++leveldb/libmemenv.a: ++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd .. ++OBJS += leveldb/libleveldb.a ++TESTOBJS += leveldb/libmemenv.a ++endif + + # auto-generated dependencies: + -include obj/*.P +@@ -162,26 +179,28 @@ obj/build.h: FORCE + version.cpp: obj/build.h + DEFS += -DHAVE_BUILD_INFO + +-obj/%.o: %.cpp +- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< ++P_TO_D = \ + @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ ++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ + rm -f $(@:%.o=%.d) + +-bitcoind: $(OBJS:obj/%=obj/%) +- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) ++obj/%.o: %.cpp ++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) + +-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) ++bitcoind: $(OBJS) ++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) + + obj-test/%.o: test/%.cpp + $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< +- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ +- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ +- rm -f $(@:%.o=%.d) ++ $(P_TO_D) ++ ++obj-test/leveldb.o: leveldb.cpp ++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) + +-test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) ++test_bitcoin: $(TESTOBJS) + $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS) + + clean: |