summaryrefslogtreecommitdiff
path: root/dev-libs/leveldb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/leveldb
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/leveldb')
-rw-r--r--dev-libs/leveldb/Manifest29
-rw-r--r--dev-libs/leveldb/files/leveldb-1.18-configure.patch52
-rw-r--r--dev-libs/leveldb/files/leveldb-1.18-mips.patch48
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-configure.patch35
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch81
-rw-r--r--dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch60
-rw-r--r--dev-libs/leveldb/leveldb-1.10.0-r1.ebuild56
-rw-r--r--dev-libs/leveldb/leveldb-1.11.0-r1.ebuild56
-rw-r--r--dev-libs/leveldb/leveldb-1.12.0-r1.ebuild56
-rw-r--r--dev-libs/leveldb/leveldb-1.13.0-r1.ebuild56
-rw-r--r--dev-libs/leveldb/leveldb-1.14.0.ebuild52
-rw-r--r--dev-libs/leveldb/leveldb-1.15.0-r1.ebuild59
-rw-r--r--dev-libs/leveldb/leveldb-1.15.0.ebuild52
-rw-r--r--dev-libs/leveldb/leveldb-1.17.ebuild68
-rw-r--r--dev-libs/leveldb/leveldb-1.18-r2.ebuild72
-rw-r--r--dev-libs/leveldb/leveldb-1.18.ebuild65
-rw-r--r--dev-libs/leveldb/leveldb-1.9.0-r5.ebuild56
-rw-r--r--dev-libs/leveldb/leveldb-1.9.0-r6.ebuild57
-rw-r--r--dev-libs/leveldb/metadata.xml14
19 files changed, 1024 insertions, 0 deletions
diff --git a/dev-libs/leveldb/Manifest b/dev-libs/leveldb/Manifest
new file mode 100644
index 000000000000..4264cbb0e9a3
--- /dev/null
+++ b/dev-libs/leveldb/Manifest
@@ -0,0 +1,29 @@
+AUX leveldb-1.18-configure.patch 1452 SHA256 1b8cfb6eae7a0f613019ab88b85fbcde7c647ba52cca82acfb4a3d52f10a99ab SHA512 86bae8c8d5d722435bedc68333c97f318847c93503368d815157a46ab15ad1795f8a585027dcecb7a94c338d25eeb69f94df87f2da2cd9f5805838f0a29dc08e WHIRLPOOL 7f30063d0255d0477ccf1ec99ff127ecc810c4dd044016efdb989f71768ec783b746622b587d4fcea8ebf269fcd77b59d5a1c9288e7fe7091beb97e072b8fc48
+AUX leveldb-1.18-mips.patch 1399 SHA256 c6547ce7050b1d5078c72e8db777bae77d83d0d4bd4a3c7f5942c9bddbb603f5 SHA512 8d968371007d163cbbb87546cbfe246e399f083bacea415f2d8b68355a5d3363df51f34e9bd29ee558ae475414b3c331b7473ef2d7e432ebfa786d55a08b2e54 WHIRLPOOL aca9868351fef0ae368e6e5a4f0c2ba425647523eaab884c7ea840265f0553be91ca0345cb1a0f3ce029e4af6201044d7eaec3545acb6021b4f908a97bbc1a41
+AUX leveldb-1.9.0-configure.patch 990 SHA256 7e509d4a77fc8ae77082f9b54e505dd6b42eca9af36e2b9e03bfe4a25472b529 SHA512 28f08e257d0f067d93ea88ee30719c092660ab7d220a55d4fa1cec5c5fd8195465e374670aa46c7a125f218ae3a689f3bb58ce66ddc720a2fc1caed552ed27e5 WHIRLPOOL eafac457577fc66a0d096b50c408c5e5298278cc071c5ea867ea61c4bdff1c95759ea73cf60be4ee6f5dfa20babce075d2efe928345f39538789c8c3995403de
+AUX leveldb-1.9.0-forwardcompat.patch 3464 SHA256 1ca68f5dc7d3da0083e497d2e6ceb27675890a18db29f99f9cdf2c3cf5f7628b SHA512 d55d4469a9cb118688233b82df3f19d08a8fb3f53a3d1d990d485a0cb91872eb2fd3699288369a96ee59739be730ce9437f9d1f8b51d095dd014adf475de7824 WHIRLPOOL 54b19b1990b7c962e285878297e4a09479eb9d3cdb08ee36b4ab6cbf8e22ac486c062b3097b0970e6ed346d3765f76048518a41b1541647049f051d20571f5e4
+AUX leveldb-1.9.0-memenv-so.patch 1957 SHA256 abb3a6af4d22419435db286dd84892bb2e988f0b235c72127dcc5501dd7edf51 SHA512 fbd1e43dba18b9dc8717651052323ea71182a758eccc3637f3ab1aade1a5de5b00f6a54ea0a8f34e2b9a91173b72eb23530ae77bc2b1ac0e454e0e2dfffcfd75 WHIRLPOOL c73765cbd7fe87085c1f207afd5c3873f687d9f4b8d57911a7701af3e552e46b5ef9f4336757fc72370f2e63e2f8432bee7964e4acdf8d3db0a49a215b4f390c
+DIST leveldb-1.10.0.tar.gz 204270 SHA256 84a4ab34671e1271d895f093932f8c8cfecb45b2e085da738671599825d12f62 SHA512 ba9829a203c25d00184b77382ee8db6b383058c527771a795443e0d3ae02b93dd29c3362f12fd89b08ac24f784b7ed2f3e3325b30abe2763df1cc9e4b8a12948 WHIRLPOOL d9b46a0f6586203091f2b89e4d141f8c7ba65ea994a2352d7f063796f50ba0e7a8c2d3a93ac2591a554b293ac8cb8a6eb26bfb2879f8859cb985db2cfd5985ae
+DIST leveldb-1.11.0.tar.gz 205413 SHA256 f2eaffcb60d6368088a7ef0c2b889132ea42483fed541a7601fa22e54a8839ac SHA512 2b01227d3339d5ab09a6488e43f4b92f1c8f23d9d9b3a1636710aadfebb2a291622b83d636c96314a651f7a774ec39b404490dcf7cd4ac6ec2997d5d651582aa WHIRLPOOL 410e0433a3eaabc838af22e6667c07e639c64da0143cc4af4ca88bb44dc74dabd749e90d2bb5766a448d8c0e952f7a099a593a558eb89cf43cab4f0404cd6ad1
+DIST leveldb-1.12.0.tar.gz 205436 SHA256 a50b44bcae9680c2872081df98395a34a1ac3162ea41f646676e53fb5f691108 SHA512 b0798ecc598a7dcee38887867521face02b11ec93bc55e28fb3e1e16fb9c4d2068564f7779849a0dc0d758ee9665c2297c004947bedd149e392c129fc39a921f WHIRLPOOL 834777dfa5f7e6ecfd1360185ac31389d8e2c92679f496f6925b902caccb42fa05523016bbb6908ffe2ad8c543d2c14f7913a79384f5e8aa05a75efd5be58cc4
+DIST leveldb-1.13.0.tar.gz 207718 SHA256 083497a48ff54a3470ab5085730306a536013c0db54db6854bd9c8638c4f33f7 SHA512 f7fd7421a0c00fadae44cae4be8a473a8827472229bf95aed0642401943f4fdf3d14026270dce59cd7bda2b2a2856d92c253a360c80ea8188a3fb52985b7e3e9 WHIRLPOOL a30a26bb40cf2573f5b135bbb28761f49ade8b478c5862462ce37b875d16802d01c2801353ec418db19d2f55c65fa3ef7e4fa63afaf4f3926dd19b471bc56487
+DIST leveldb-1.14.0.tar.gz 208282 SHA256 9122d2c248ba40d6ce46d0c3e4738fcfa941d0d93fdba20a101471a98e8b00a3 SHA512 c8dc837b77b7aa0be4fca03f31061685534d4280c59b929e5c3e7ef9ceb29e7ea75f8836a55c9df49cd3bc67143d91a2512fc5d9a181f440ec4961a256c77108 WHIRLPOOL 445589cb1f6f540a5a0cc395907f04bb785ea98441d6c9ea19eee6888ebbcc659cf9b9a44a87693336b9cf14a0645de43c0761ad9aafadbd33f157ef05687a6e
+DIST leveldb-1.15.0.tar.gz 205691 SHA256 d7c4ec571ef2ee9719f31db06344a1eba495e6abeeac1bc349d0d38a911c6680 SHA512 af5b18a7750ac553659075c1c34aa2fddf6322b6837f096589cf5908c7050fd19053cd98d19fd7097e0840392b318f0166360d3a0595adcaaabcfdf393246775 WHIRLPOOL 10136e1b8686ef2993e4b45b371bf749972fe84e0cd615bf18fc85de676e589951689adefc3a14625e66cf6cc4f70ffd99bf0c832209a97ceccee834853a7503
+DIST leveldb-1.17.tar.gz 207037 SHA256 a538ccdc5b9d42f7d64578d186eb17dc3a1b3dbbb3c14bbe0cbff961456bddd1 SHA512 d35401a92fa2b59c46e97ab94a9c70d0d5f97dbc7868a75354e088489338c078f47feaa3371489c481317b45ace6bd207d29676f5c18076ced86aa3f9fa44e58 WHIRLPOOL c3790b0cb38219cd609d9efe0568f47cd31515334ef1cbaff7e5efb97b300de113509833978688ae22d94aa7c9a0aa8c4d35268de1cb678a974dce6f7607a91f
+DIST leveldb-1.18.tar.gz 209376 SHA256 4aa1a7479bc567b95a59ac6fb79eba49f61884d6fd400f20b7af147d54c5cee5 SHA512 3d9c55a7bf8692914784ec33c273704ce9978496b071c7b661708f049d0d4ccd51a44441f50c3e536725caeb9896575192f52708a4bb1c0222cecdeec89919a3 WHIRLPOOL 3d6434919d49b23e6ae7305c189a8823032d9f350fbf429513e4ec851ee3974b4a272c9fc5265d551e849f8929266d8b40698951c6b55b333d7e37b2d5819cad
+DIST leveldb-1.9.0.tar.gz 203872 SHA256 b2699b04e5aba8e98382c4955b94725d1f76bd0b5decd60c5628205b717a1d4f SHA512 47b0a3272eef2d677ddeb8d0c973e59a1be4bff580528c3bc3f83a654f41485ecc86892d9124ce21ef747c220f98cdad687436849dc978adfd42f8c8c05b9160 WHIRLPOOL 301ba45968095420ff72da36f128bd916d4e039385270eecd8e077aac3781ed12931c9a7d426842e197fd62a99ad6477e5eabbca7524fcba2a185a702f4ef22a
+EBUILD leveldb-1.10.0-r1.ebuild 1303 SHA256 abc004184a90a6c755f075e79254aa3a30df4d13ef42691c87ca2c65cc1297c7 SHA512 548cec6bfa8a1c3b78966b593b239aa49d7c21f21309729f00f44ea76b484f633fdccd2810d39475372227eb252ff91d554b2cbdf4f543b98305f744c04ec042 WHIRLPOOL befd16d7c4688ee39f1e25cb6dd08f1289392e2cb20881781ddf9aa0e6ea60063f4b9b8c8d004aecfaf3383e786c32aa0db7696f0f3c38d1eb416c38cf14c737
+EBUILD leveldb-1.11.0-r1.ebuild 1303 SHA256 abc004184a90a6c755f075e79254aa3a30df4d13ef42691c87ca2c65cc1297c7 SHA512 548cec6bfa8a1c3b78966b593b239aa49d7c21f21309729f00f44ea76b484f633fdccd2810d39475372227eb252ff91d554b2cbdf4f543b98305f744c04ec042 WHIRLPOOL befd16d7c4688ee39f1e25cb6dd08f1289392e2cb20881781ddf9aa0e6ea60063f4b9b8c8d004aecfaf3383e786c32aa0db7696f0f3c38d1eb416c38cf14c737
+EBUILD leveldb-1.12.0-r1.ebuild 1303 SHA256 abc004184a90a6c755f075e79254aa3a30df4d13ef42691c87ca2c65cc1297c7 SHA512 548cec6bfa8a1c3b78966b593b239aa49d7c21f21309729f00f44ea76b484f633fdccd2810d39475372227eb252ff91d554b2cbdf4f543b98305f744c04ec042 WHIRLPOOL befd16d7c4688ee39f1e25cb6dd08f1289392e2cb20881781ddf9aa0e6ea60063f4b9b8c8d004aecfaf3383e786c32aa0db7696f0f3c38d1eb416c38cf14c737
+EBUILD leveldb-1.13.0-r1.ebuild 1303 SHA256 abc004184a90a6c755f075e79254aa3a30df4d13ef42691c87ca2c65cc1297c7 SHA512 548cec6bfa8a1c3b78966b593b239aa49d7c21f21309729f00f44ea76b484f633fdccd2810d39475372227eb252ff91d554b2cbdf4f543b98305f744c04ec042 WHIRLPOOL befd16d7c4688ee39f1e25cb6dd08f1289392e2cb20881781ddf9aa0e6ea60063f4b9b8c8d004aecfaf3383e786c32aa0db7696f0f3c38d1eb416c38cf14c737
+EBUILD leveldb-1.14.0.ebuild 1230 SHA256 5a7b3f92395603560a4e8aaa921858b66ffeccc116a3752eab4a5c4f65083e79 SHA512 0b235df8d0bc8559a1e9b79498c2a3009134683a6edfe671abeb29e6a1517817622e03989e9d0c3a6e59aa6127b74a0f86ea6bb08c28974f1ca1dfb742c80033 WHIRLPOOL 9448503df3c5fc92941101bf10107502fe13130ccb02236473d6c53c119d6b2c08d57b2b58dfa738f2da6669996f2f9dd36a986ac3f025ad33b39357b1413709
+EBUILD leveldb-1.15.0-r1.ebuild 1434 SHA256 b834ffa18c60595bc7329f855ac94e3f5561fd6d1031c0b17ce88232412f6dc9 SHA512 686476d32f6922e79672b07c934662b09a2b9615b6014b9048dee4398fde71c8c26e46a47ee048c258568d5cd723ca6857db2fd046c846f187092b04e6dd15d8 WHIRLPOOL 3007aa22745681b55c7ff24370456d1b4c74117ba63d5c6700996038af42dee4f026978428ea9077554f8da3991e3ae5653bcbf438df7399e9d16f184178fd71
+EBUILD leveldb-1.15.0.ebuild 1230 SHA256 5a7b3f92395603560a4e8aaa921858b66ffeccc116a3752eab4a5c4f65083e79 SHA512 0b235df8d0bc8559a1e9b79498c2a3009134683a6edfe671abeb29e6a1517817622e03989e9d0c3a6e59aa6127b74a0f86ea6bb08c28974f1ca1dfb742c80033 WHIRLPOOL 9448503df3c5fc92941101bf10107502fe13130ccb02236473d6c53c119d6b2c08d57b2b58dfa738f2da6669996f2f9dd36a986ac3f025ad33b39357b1413709
+EBUILD leveldb-1.17.ebuild 1720 SHA256 7a581aa411dcbe78fba041e755a943e96db4c6b15a940bfb129855254c669d3f SHA512 a59df720d900c7da98a4e0c9c865f5cb962b1843461289cd0a4e78cbcb5bcfff93b0d4213fde486df0a9f5d2dc7bfe86ecfec757c83513932fb1ab02859feb25 WHIRLPOOL ebc5460c98499fb394ac51f1bbca1c606342c7c30f7c0371f3ad675e4165e80b7e1214b6128beca49f5ca8e931bb4b31e786e2eede470433b2b7be322ac02472
+EBUILD leveldb-1.18-r2.ebuild 1879 SHA256 c1e47f6ae16fad527e448cc9a4b3c6ea46661ff2fb85e82db7a788965152ffd5 SHA512 d483e1ba1010fde30052c854131afa4e8a9e0cd3b98f09a85d71770cf139f9f82cb786cc012d4f518545af8e997bbf8aa16db5a40833d56cdff8edeab99aadd5 WHIRLPOOL 7e13a8a9e70f697244fa30af7017f3a1909248853983cb36043442f091de8fbf8d248ddf3895dc8d0384721b9e903cc6e0075f392ebcf64a9ffc0042147417e4
+EBUILD leveldb-1.18.ebuild 1647 SHA256 58ec91bee74f35bfa46544c45ffb7be2bdb4b9e44c4328c93267ad63d7d05e9d SHA512 5a8feaeca45690fbb5d6f7ecfe7074e176532765900cb343107da542b32e61935bb0832a6682550d57a7e74bc20fec0469a7b0b20a1de9636f628fafd3de4193 WHIRLPOOL 1484eacbc42b791b376be833d8ce9ec74a97aeecf7da0c86fa60d06a937271e3455ea1cc48894b29d34211af70a8fdbd95129e014197ffd6f9f75017d52b2b6e
+EBUILD leveldb-1.9.0-r5.ebuild 1223 SHA256 22eaf3dddadcef08f788ccd7ffb6b6759c065247bf057beab8a139eb6fa7f062 SHA512 a97ee6357c3e37208d7900f216e4d4270bd7b6c9add1449e3a0c52d49755a1be88f6008e9ae9bb6a021d3345fa57db18e3751073a63ccc8e4270e7ba684216ea WHIRLPOOL 37a413d432bfe182d4d8c9253bf1cae2e6693c6fa4fed0d777697e81f895b53944a9f3bec835933082b8bc45f6f598817f20e84563f87ec93e58a555ec728d5f
+EBUILD leveldb-1.9.0-r6.ebuild 1277 SHA256 c4676ebfccdcf9ee159f2950c33d2db8c421a756a7824b5cfe56b6bd575a6716 SHA512 ca4965119338028813e0cdb5d1b303c88ef2e2450f471f4d58e16a276485fcb001d6c4818097f5b0c47eb66ce1b23b561ad37809415654c4cee771d0ac17137a WHIRLPOOL 0609689cb8d0065887f49a0145e8b26de4857a75277bf9123f555f2c70a3c504509aaeaa00a1e3756af6a7fb26fa61b784807781f2ea9bdfbc18c838292cbffa
+MISC ChangeLog 4171 SHA256 7974c3bc301a30b6d2e7ad879d78337b566fa4d727f1860ec3187bb51fece81b SHA512 a24f6698ef06ca9ee36e7726cc1bcad2bff3cf6a55a861053381a49a04ae40cb7dfd878cfea649ea62c397a4545324323332e457fb695e6dba665e74abd936e7 WHIRLPOOL 6fdfb9683854520f05b9ca46ffa7cf1ff87316587d8cdbe8428cd342e78250034392660a13b50306d6254c4676f46ad6b17278b3fbc265c8bea5282797ff5fd4
+MISC ChangeLog-2015 5588 SHA256 fb007ca03028d26d767cc9b1a297ffd80d7d3854a3c43f237450c8808b487eda SHA512 dba08e11d7a97d588de0e91898a5859f4c5f2500f09f00c0a11e9ad75a842f742ce6c3af0c091d0ead4bca3e16d5b22e9c028434ccc4682780bbc1495bbe1ce0 WHIRLPOOL b09141c90672ac54265d58e5e482c0d6c1b76024624ec6e35cba11c88019bdcb7dcb5341df854c6358b1efce9deb99a9d3d42159dc2857b1d49517c8cb9a0eac
+MISC metadata.xml 423 SHA256 f413f593f242ffdcc937ce020e114765537777cea9d322c928a64f005916230e SHA512 0c0b3abf79f52fc0c42e50899afabb32bb9f214b685c6dd09d523dd777f32d00a58a5004b8cc722c9c3a104801b69fbf8342aa64232003ae057a81ee4c822e5c WHIRLPOOL 8d61fcbaff7c9ca88bf50ed3e726ad7fecdc62f6f125c5a7a07e4d2bd81a606f9a4c6c2ffc560367dd67d0bdeea1eaf5eacaae70348e1dfa8279dc3a17b23282
diff --git a/dev-libs/leveldb/files/leveldb-1.18-configure.patch b/dev-libs/leveldb/files/leveldb-1.18-configure.patch
new file mode 100644
index 000000000000..ba30fc731ad5
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.18-configure.patch
@@ -0,0 +1,52 @@
+we'll handle configure ourselves in src_configure
+
+--- a/Makefile
++++ b/Makefile
+@@ -14,9 +14,6 @@ OPT ?= -O2 -DNDEBUG
+ # OPT ?= -O2 -g2 -DNDEBUG
+ #-----------------------------------------------
+
+-# detect what platform we're building on
+-$(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \
+- ./build_detect_platform build_config.mk ./)
+ # this file is generated by the previous line to set build flags and sources
+ include build_config.mk
+
+
+control snappy/tcmalloc explicitly
+
+--- a/build_detect_platform
++++ a/build_detect_platform
+@@ -190,6 +190,7 @@
+ COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
+ fi
+
++if [ "${USE_SNAPPY:-auto}" = "auto" ]; then
+ # Test whether Snappy library is installed
+ # http://code.google.com/p/snappy/
+ $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null <<EOF
+@@ -197,15 +198,24 @@
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_SNAPPY="yes"
++ fi
++fi
++ if [ "$USE_SNAPPY" = "yes" ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
+ PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy"
+ fi
+
++if [ "${USE_TCMALLOC:-auto}" = "auto" ]; then
+ # Test whether tcmalloc is available
+ $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_TCMALLOC="yes"
++ fi
++fi
++ if [ "$USE_TCMALLOC" = "yes" ]; then
+ PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc"
+ fi
+
diff --git a/dev-libs/leveldb/files/leveldb-1.18-mips.patch b/dev-libs/leveldb/files/leveldb-1.18-mips.patch
new file mode 100644
index 000000000000..379223d210b6
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.18-mips.patch
@@ -0,0 +1,48 @@
+https://github.com/google/leveldb/pull/272
+
+From f216400e702a51c900f2ce0285fdd6a21d3dd87b Mon Sep 17 00:00:00 2001
+From: Ben Chan <benchan@chromium.org>
+Date: Thu, 11 Sep 2014 21:38:48 -0700
+Subject: [PATCH] CHROMIUMOS: Add memory barrier implementation for MIPS.
+
+This CL is based on the patch authored by David Turner <digit@google.com>,
+see https://code.google.com/p/leveldb/issues/detail?id=109
+
+BUG=chromium:413517
+TEST=`emerge-{x86,amd64,arm,mipsel-o32}-generic leveldb`
+
+Reviewed-on: https://chromium-review.googlesource.com/217834
+---
+ port/atomic_pointer.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h
+index 35ae550..341909e 100644
+--- a/port/atomic_pointer.h
++++ b/port/atomic_pointer.h
+@@ -36,6 +36,8 @@
+ #define ARCH_CPU_X86_FAMILY 1
+ #elif defined(__ARMEL__)
+ #define ARCH_CPU_ARM_FAMILY 1
++#elif defined(__mips__)
++#define ARCH_CPU_MIPS_FAMILY 1
+ #elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
+ #define ARCH_CPU_PPC_FAMILY 1
+ #endif
+@@ -83,6 +85,13 @@ inline void MemoryBarrier() {
+ }
+ #define LEVELDB_HAVE_MEMORY_BARRIER
+
++// MIPS
++#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(__GNUC__)
++inline void MemoryBarrier() {
++ __asm__ __volatile__("sync" : : : "memory");
++}
++#define LEVELDB_HAVE_MEMORY_BARRIER
++
+ #endif
+
+ // AtomicPointer built using platform-specific MemoryBarrier()
+--
+2.3.0
+
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch b/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch
new file mode 100644
index 000000000000..d25fe01f6835
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-configure.patch
@@ -0,0 +1,35 @@
+diff --git a/build_detect_platform b/build_detect_platform
+index 5801d20..4b4bb0d 100755
+--- a/build_detect_platform
++++ b/build_detect_platform
+@@ -169,20 +169,30 @@ EOF
+
+ # Test whether Snappy library is installed
+ # http://code.google.com/p/snappy/
++if [ "${USE_SNAPPY:-auto}" = "auto" ]; then
+ $CXX $CXXFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
+ #include <snappy.h>
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_SNAPPY="yes"
++ fi
++fi
++ if [ "$USE_SNAPPY" = "yes" ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
+ PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy"
+ fi
+
+ # Test whether tcmalloc is available
++if [ "${USE_TCMALLOC:-auto}" = "auto" ]; then
+ $CXX $CXXFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <<EOF
+ int main() {}
+ EOF
+ if [ "$?" = 0 ]; then
++ USE_TCMALLOC="yes"
++ fi
++fi
++ if [ "$USE_TCMALLOC" = "yes" ]; then
+ PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc"
+ fi
+ fi
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch b/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch
new file mode 100644
index 000000000000..1c21dbe09ff5
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-forwardcompat.patch
@@ -0,0 +1,81 @@
+diff -ur leveldb-1.9.0.orig/db/db_test.cc leveldb-1.9.0/db/db_test.cc
+--- leveldb-1.9.0.orig/db/db_test.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/db_test.cc 2014-03-28 22:58:59.000000000 +0000
+@@ -139,7 +139,7 @@
+
+ Status s = target()->NewWritableFile(f, r);
+ if (s.ok()) {
+- if (strstr(f.c_str(), ".sst") != NULL) {
++ if (strstr(f.c_str(), ".sst") != NULL || strstr(f.c_str(), ".ldb") != NULL) {
+ *r = new SSTableFile(this, *r);
+ } else if (strstr(f.c_str(), "MANIFEST") != NULL) {
+ *r = new ManifestFile(this, *r);
+diff -ur leveldb-1.9.0.orig/db/filename.cc leveldb-1.9.0/db/filename.cc
+--- leveldb-1.9.0.orig/db/filename.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/filename.cc 2014-03-28 23:07:48.000000000 +0000
+@@ -34,6 +34,11 @@
+ return MakeFileName(name, number, "sst");
+ }
+
++std::string LDBTableFileName(const std::string& name, uint64_t number) {
++ assert(number > 0);
++ return MakeFileName(name, number, "ldb");
++}
++
+ std::string DescriptorFileName(const std::string& dbname, uint64_t number) {
+ assert(number > 0);
+ char buf[100];
+@@ -106,7 +111,7 @@
+ Slice suffix = rest;
+ if (suffix == Slice(".log")) {
+ *type = kLogFile;
+- } else if (suffix == Slice(".sst")) {
++ } else if (suffix == Slice(".sst") || suffix == Slice(".ldb")) {
+ *type = kTableFile;
+ } else if (suffix == Slice(".dbtmp")) {
+ *type = kTempFile;
+diff -ur leveldb-1.9.0.orig/db/filename.h leveldb-1.9.0/db/filename.h
+--- leveldb-1.9.0.orig/db/filename.h 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/filename.h 2014-03-28 23:07:43.000000000 +0000
+@@ -36,6 +36,7 @@
+ // in the db named by "dbname". The result will be prefixed with
+ // "dbname".
+ extern std::string TableFileName(const std::string& dbname, uint64_t number);
++extern std::string LDBTableFileName(const std::string& dbname, uint64_t number);
+
+ // Return the name of the descriptor file for the db named by
+ // "dbname" and the specified incarnation number. The result will be
+diff -ur leveldb-1.9.0.orig/db/repair.cc leveldb-1.9.0/db/repair.cc
+--- leveldb-1.9.0.orig/db/repair.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/repair.cc 2014-03-28 23:13:28.000000000 +0000
+@@ -263,6 +263,14 @@
+ std::string fname = TableFileName(dbname_, t->meta.number);
+ int counter = 0;
+ Status status = env_->GetFileSize(fname, &t->meta.file_size);
++ if (!status.ok()) {
++ // Try alternate file name.
++ fname = LDBTableFileName(dbname_, t->meta.number);
++ Status s2 = env_->GetFileSize(fname, &t->meta.file_size);
++ if (s2.ok()) {
++ status = Status::OK();
++ }
++ }
+ if (status.ok()) {
+ Iterator* iter = table_cache_->NewIterator(
+ ReadOptions(), t->meta.number, t->meta.file_size);
+diff -ur leveldb-1.9.0.orig/db/table_cache.cc leveldb-1.9.0/db/table_cache.cc
+--- leveldb-1.9.0.orig/db/table_cache.cc 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/db/table_cache.cc 2014-03-28 23:12:39.000000000 +0000
+@@ -54,6 +54,12 @@
+ RandomAccessFile* file = NULL;
+ Table* table = NULL;
+ s = env_->NewRandomAccessFile(fname, &file);
++ if (!s.ok()) {
++ std::string ldb_fname = LDBTableFileName(dbname_, file_number);
++ if (env_->NewRandomAccessFile(ldb_fname, &file).ok()) {
++ s = Status::OK();
++ }
++ }
+ if (s.ok()) {
+ s = Table::Open(*options_, file, file_size, &table);
+ }
diff --git a/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch b/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch
new file mode 100644
index 000000000000..0df587a3f9c9
--- /dev/null
+++ b/dev-libs/leveldb/files/leveldb-1.9.0-memenv-so.patch
@@ -0,0 +1,60 @@
+--- leveldb-1.9.0.orig/Makefile 2013-01-07 21:07:29.000000000 +0000
++++ leveldb-1.9.0/Makefile 2014-03-28 22:11:05.000000000 +0000
+@@ -61,37 +61,45 @@
+ # Should we build shared libraries?
+ ifneq ($(PLATFORM_SHARED_EXT),)
+
++SHARED1 = $(PLATFORM_SHARED_EXT)
++
+ ifneq ($(PLATFORM_SHARED_VERSIONED),true)
+-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
+ SHARED2 = $(SHARED1)
+ SHARED3 = $(SHARED1)
+-SHARED = $(SHARED1)
++SHARED=%.$(SHARED1)
+ else
+ # Update db.h if you change these.
+ SHARED_MAJOR = 1
+ SHARED_MINOR = 9
+-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
+ SHARED2 = $(SHARED1).$(SHARED_MAJOR)
+ SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
+-SHARED = $(SHARED1) $(SHARED2) $(SHARED3)
+-$(SHARED1): $(SHARED3)
+- ln -fs $(SHARED3) $(SHARED1)
+-$(SHARED2): $(SHARED3)
+- ln -fs $(SHARED3) $(SHARED2)
++SHARED=%.$(SHARED1) %.$(SHARED2) %.$(SHARED3)
++%.$(SHARED1): %.$(SHARED3)
++ ln -fs $< $@
++%.$(SHARED2): %.$(SHARED3)
++ ln -fs $< $@
+ endif
+
+-$(SHARED3):
+- $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3) $(LIBS)
++%.SHARED: $(SHARED)
++ @true
++
++%.$(SHARED3):
++ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$*.$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $^ -o $@ $(LIBS)
++
++libleveldb.$(SHARED3): $(SOURCES)
++libmemenv.$(SHARED3): $(MEMENV_SOURCES)
++
++.SECONDARY: $(subst %,libleveldb,$(SHARED)) $(subst %,libmemenv,$(SHARED))
+
+ endif # PLATFORM_SHARED_EXT
+
+-all: $(SHARED) $(LIBRARY)
++all: libleveldb.SHARED $(LIBRARY)
+
+ check: all $(PROGRAMS) $(TESTS)
+ for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done
+
+ clean:
+- -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
++ -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(subst %,libleveldb,$(SHARED)) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
+ -rm -rf ios-x86/* ios-arm/*
+
+ $(LIBRARY): $(LIBOBJECTS)
diff --git a/dev-libs/leveldb/leveldb-1.10.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..9c017847de4c
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.10.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.11.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.11.0-r1.ebuild
new file mode 100644
index 000000000000..9c017847de4c
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.11.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.12.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.12.0-r1.ebuild
new file mode 100644
index 000000000000..9c017847de4c
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.12.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.13.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.13.0-r1.ebuild
new file mode 100644
index 000000000000..9c017847de4c
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.13.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.14.0.ebuild b/dev-libs/leveldb/leveldb-1.14.0.ebuild
new file mode 100644
index 000000000000..0b1c19884483
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.14.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild b/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild
new file mode 100644
index 000000000000..f2ea73b72f90
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.15.0-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cp "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" "${S}/patch"
+ sed -i 's/\(^ SHARED_MINOR =\).*/\1 15/' "${S}/patch"
+ epatch "${S}/patch"
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.15.0.ebuild b/dev-libs/leveldb/leveldb-1.15.0.ebuild
new file mode 100644
index 000000000000..0b1c19884483
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.15.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.17.ebuild b/dev-libs/leveldb/leveldb-1.17.ebuild
new file mode 100644
index 000000000000..932d7cd196df
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.17.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+GITCRAP="e353fbc7ea81"
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+#SRC_URI="https://${PN}.googlecode.com/archive/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${GITCRAP}"
+
+src_prepare() {
+ local SHARED_MINOR=$(get_version_component_range 2)
+ cp "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" "${S}/patch"
+ sed -i "s/\(^ SHARED_MINOR =\).*/\1 ${SHARED_MINOR}/" "${S}/patch"
+ epatch "${S}/patch"
+
+ # lacks execution bit
+ chmod +x "${S}"/build_detect_platform || die
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.18-r2.ebuild b/dev-libs/leveldb/leveldb-1.18-r2.ebuild
new file mode 100644
index 000000000000..0afecb254ff8
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.18-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="http://leveldb.org/ https://github.com/google/leveldb"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc kernel_FreeBSD"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy:=
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.18-mips.patch
+ epatch "${FILESDIR}"/${PN}-1.18-configure.patch #541186
+
+ local SHARED_MINOR=$(get_version_component_range 2)
+ sed \
+ -e "s/\(^ SHARED_MINOR =\).*/\1 ${SHARED_MINOR}/" \
+ "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" > memenv-so.patch
+ epatch memenv-so.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ local targetos
+ if use kernel_FreeBSD; then
+ targetos="FreeBSD"
+ else
+ targetos="Linux"
+ fi
+
+ TARGET_OS=${targetos} \
+ USE_SNAPPY=$(usex snappy) \
+ USE_TCMALLOC=no \
+ TMPDIR=${T} \
+ sh -x ./build_detect_platform build_config.mk ./
+}
+
+src_compile() {
+ emake $(usex static-libs 'libmemenv.a' 'LIBRARY=') all libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/*
+ # This matches the path Debian picked. Upstream provides no guidance.
+ insinto /usr/include/leveldb/helpers
+ doins helpers/memenv/memenv.h
+
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.18.ebuild b/dev-libs/leveldb/leveldb-1.18.ebuild
new file mode 100644
index 000000000000..4d12e3776624
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.18.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs versionator
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+snappy static-libs +tcmalloc"
+
+DEPEND="tcmalloc? ( dev-util/google-perftools )
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.18-mips.patch
+
+ local SHARED_MINOR=$(get_version_component_range 2)
+ sed \
+ -e "s/\(^ SHARED_MINOR =\).*/\1 ${SHARED_MINOR}/" \
+ "${FILESDIR}/${PN}-1.9.0-memenv-so.patch" > memenv-so.patch
+ epatch memenv-so.patch
+
+ # lacks execution bit
+ chmod +x build_detect_platform || die
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs 'libmemenv.a' 'LIBRARY=') all libmemenv.SHARED
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a libmemenv.a
+ dolib.so libmemenv*$(get_libname)*
+}
diff --git a/dev-libs/leveldb/leveldb-1.9.0-r5.ebuild b/dev-libs/leveldb/leveldb-1.9.0-r5.ebuild
new file mode 100644
index 000000000000..6a25a27fc933
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.9.0-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86"
+IUSE="+snappy static-libs"
+
+DEPEND="
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-configure.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/leveldb-1.9.0-r6.ebuild b/dev-libs/leveldb/leveldb-1.9.0-r6.ebuild
new file mode 100644
index 000000000000..397354b0f635
--- /dev/null
+++ b/dev-libs/leveldb/leveldb-1.9.0-r6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="a fast key-value storage library written at Google"
+HOMEPAGE="https://github.com/google/leveldb"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86"
+IUSE="+snappy static-libs"
+
+DEPEND="
+ snappy? (
+ app-arch/snappy
+ static-libs? ( app-arch/snappy[static-libs] )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.0-configure.patch
+ epatch "${FILESDIR}"/${PN}-1.9.0-forwardcompat.patch
+}
+
+src_configure() {
+ # These vars all get picked up by build_detect_platform
+ # which the Makefile runs for us automatically.
+ tc-export AR CC CXX
+ export OPT="-DNDEBUG ${CPPFLAGS}"
+ # Probably needs more filling out
+ export TARGET_OS
+ case ${CHOST} in
+ *) TARGET_OS="Linux";;
+ esac
+ export USE_SNAPPY=$(usex snappy)
+ export USE_TCMALLOC=no
+}
+
+src_compile() {
+ emake $(usex static-libs '' 'LIBRARY=') all libmemenv.a
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/include
+ doins -r include/* helpers/memenv/memenv.h
+ dolib.so libleveldb*$(get_libname)*
+ use static-libs && dolib.a libleveldb.a
+ dolib.a libmemenv.a
+}
diff --git a/dev-libs/leveldb/metadata.xml b/dev-libs/leveldb/metadata.xml
new file mode 100644
index 000000000000..1b1686f1de67
--- /dev/null
+++ b/dev-libs/leveldb/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="snappy">support the snappy compression library</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">google/leveldb</remote-id>
+ </upstream>
+</pkgmetadata>