From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- dev-libs/mongo-cxx-driver/Manifest | 13 ++++ .../files/mongo-cxx-driver-1.0.0-fix-scons.patch | 34 +++++++++ .../files/mongo-cxx-driver-1.1.0-fix-scons.patch | 54 +++++++++++++ .../files/mongo-cxx-driver-1.1.2-boost-ref.patch | 15 ++++ .../mongo-cxx-driver-26compat-fix-scons.patch | 34 +++++++++ dev-libs/mongo-cxx-driver/metadata.xml | 11 +++ .../mongo-cxx-driver-0.0.2.6.7-r1.ebuild | 89 ++++++++++++++++++++++ .../mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild | 72 +++++++++++++++++ .../mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild | 72 +++++++++++++++++ .../mongo-cxx-driver-1.1.2-r1.ebuild | 71 +++++++++++++++++ 10 files changed, 465 insertions(+) create mode 100644 dev-libs/mongo-cxx-driver/Manifest create mode 100644 dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch create mode 100644 dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch create mode 100644 dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch create mode 100644 dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch create mode 100644 dev-libs/mongo-cxx-driver/metadata.xml create mode 100644 dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild create mode 100644 dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild create mode 100644 dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild create mode 100644 dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild (limited to 'dev-libs/mongo-cxx-driver') diff --git a/dev-libs/mongo-cxx-driver/Manifest b/dev-libs/mongo-cxx-driver/Manifest new file mode 100644 index 000000000000..8294b907d8e8 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/Manifest @@ -0,0 +1,13 @@ +AUX mongo-cxx-driver-1.0.0-fix-scons.patch 1345 BLAKE2B 38d257b8a2a73caecf3932706ffaae5517d336ca9fd5cbae75948394deffd74ac233b21c435b371a46f03a594ea95cf2896ac715aedac84a5f39a9d12b9c761c SHA512 24031ed20354c98633887b57f513b0bd891370923fd5e6b9e668610e68875afcb64c01fb4d84dd01ab1629dcbce332f60822aa0ac7a8774cd06277cf02cb95b1 +AUX mongo-cxx-driver-1.1.0-fix-scons.patch 2126 BLAKE2B 78f7d00fa0b7c642854572ddc33856e166920c248e8169ebb204a35c473bc363e0c8edb1a76ac8a0078ace02f90bbe412ca364ec9296c86ada4b47597bd25979 SHA512 1a643dbfa20e1f53bd76b61487b7895daf165139d7264f3c6cee61d7bd30b8a583dee02e63f9c7295cc8a49028075c0f3066b0a57e7e1c4f2eb1a750f2249122 +AUX mongo-cxx-driver-1.1.2-boost-ref.patch 425 BLAKE2B 9bcc37f485e96989692b6ebd489cea8874fd70078fd7862822ce329fff2f3985be3a1383a17bf0876c64ddc35392960435065c70f280c16ba08f8fbf25e06f61 SHA512 613fb5c45c425c2ed2f907ff569741402f2ade0a11a2abb4183b5d05bc18c8b3d8143ac892d99b7561e04e0f74796f5ff7d32c385e78e08ec11415fd24ea697b +AUX mongo-cxx-driver-26compat-fix-scons.patch 1478 BLAKE2B f69ee015f8b2bfe4149960016ffc34c53e56042115a65e5e88677eecc8382be4a1c6c92950b79e68710f5347310813f04f1914769384874c87b9dd5d2e9cf570 SHA512 3ba454dc193dfe0ab1a3727521a67f46c765a5e6f0a1fc04647d9ad52905899afd4d95ade632a9339fc3a5e5cb14473a812ea4772eecf4456874a49ff25bedd7 +DIST legacy-0.0-26compat-2.6.7.tar.gz 1512331 BLAKE2B 43735ef7be4d5f3094eccedb5ee70f9f9722a174513a10f2f5f7c3c5603766f85e13717ea8c68b935c0ba5914c8e4a9b6e6797cd1a10d0257b654473799070bc SHA512 edf13d5b7802c3b2e9772f08949fd0c412f2cd25ec6d05ff4e8c1f25c3e3506da6ebbd7b017ceec5478585c84e9fa44c66a5094ad3e7a7373187d3fb3c1c1222 +DIST legacy-1.0.0.tar.gz 1569156 BLAKE2B 6c231d6a4c9f6c54aaea2b6f5ce10c80537875e69508fbd3598a835b52ca2bd984d2d7bf3bd35bff83b78408d3c185715f2fb8d6eef3b697c864161479a016ab SHA512 e161972715fe45b777ee3d9c7e788ee3a808af789e2c1248af1dde3d3f3936e29f619e039f53210cdd3fc6a6bd8a02c101facf49c61759c6f108d25c5c03b59b +DIST legacy-1.0.5.tar.gz 1573929 BLAKE2B 85476dddefdcbd7a4b8ac945a39633965ade0389131e554c04aab3d457a3651b79292b88882613af6bb07f56759e75f67eb72d27b23209cc0df36df9eec58846 SHA512 e904d73f78ffbc1ce18ffa11dd7e3dddd67c730b6e79bace0e48c0be4e8ffd7b5fe12e1373e42ad941d8fc239ef031a47d39ff04aaf3f0a5ecf88115c816bc70 +DIST legacy-1.1.2.tar.gz 1577527 BLAKE2B 277e5ed6d6897587d3d9f9681b6821d2cc4bba71191c27083306d3a4d7dd778fdb3707e5b70fe9f528be8142dd755ba8e2a19ee866f5583dc57d297c642e6e02 SHA512 a0b21719db8205a16c574ce21565577787ea00cf2492353bcd4dd79a7ef3b7d685287be47e6eee59fad46c6fa2ac3c6a0e00c26ef88be8b17e9d93fbc763cb10 +EBUILD mongo-cxx-driver-0.0.2.6.7-r1.ebuild 2183 BLAKE2B 3312d3ebdb8282595385d0be2c300491be5dfd3c8a36b23fd3f0d813e5053954b084fc4ccc98b73c9fbe63bf4b4f1a45a16cb3e3d46ca16aeb46cd40bc3ba742 SHA512 b1dc255b60e05f8ca56bb5626c256db056751aff967e58beff6f6a8a250fc0b49e2cb6162101161971febdcbb9128cb37a073762df720ae8c1a57d67cf39a9d3 +EBUILD mongo-cxx-driver-1.0.0.ebuild 1585 BLAKE2B 3aca1d81d365d1a5458ea2840ca750d26e47ba4b20b8bd2d02a4ac446aa153c06f838be69ba584eab73b5ce7cdf81566e82c53c438ad337adcb2c134f994e7f4 SHA512 133ab4ce256dbff77333432b4e2c71227a4bda772367629e5bb847393d564e4795ee8bc491181029fb8fa714081a1cdf55c9ad410a88f9c302bd73fa33a42e2c +EBUILD mongo-cxx-driver-1.0.5.ebuild 1585 BLAKE2B 3aca1d81d365d1a5458ea2840ca750d26e47ba4b20b8bd2d02a4ac446aa153c06f838be69ba584eab73b5ce7cdf81566e82c53c438ad337adcb2c134f994e7f4 SHA512 133ab4ce256dbff77333432b4e2c71227a4bda772367629e5bb847393d564e4795ee8bc491181029fb8fa714081a1cdf55c9ad410a88f9c302bd73fa33a42e2c +EBUILD mongo-cxx-driver-1.1.2-r1.ebuild 1510 BLAKE2B e753e9dedf0d94757669cb6e6c0f8d98050ffa475b3c30e829a144acdf950674dafc413019fb375f0dec1c4652ef8e66197a439f772da8113715e936f38fbd3f SHA512 1d336516d494e5699ad67bd2765655e9717a240f0d09ddaa33545a480dd2de59ff22e0b92c404e0abce353b307609fe6a91d3a6a414d03976beb968d97b43448 +MISC metadata.xml 336 BLAKE2B 8cd1026c27a1b598e3c49a9c11dbe0dc2a27bbe77b25223d7467ed9778b57743cab62e7703f988933e6a672506c996a1b8d75c71d2e2b306cb362c88a397a11a SHA512 b75e79f4e7e6ae6e596797bed26600142d8ec89bf15a5d71183d09835c3cdb5bcc4cdd625048fe5ba0e3ab04b8c36ae3cb30da97c185f1ee420040103c69ccf0 diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch new file mode 100644 index 000000000000..319773c7d571 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.0.0-fix-scons.patch @@ -0,0 +1,34 @@ +--- a/SConstruct 2015-03-17 10:19:58.766530807 +0100 ++++ b/SConstruct 2015-03-17 10:27:58.400062874 +0100 +@@ -853,7 +853,6 @@ + + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -861,13 +860,13 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux or darwin: +- env.Append( CCFLAGS=["-pipe"] ) + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-fPIC"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -933,7 +932,6 @@ + except OSError: + pass + +-env.Prepend(CPPPATH=['$VARIANT_DIR/third_party/gtest-1.7.0/include']) + + boostSuffixList = ["-mt", ""] + if get_option("boost-lib-search-suffixes") is not None: diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch new file mode 100644 index 000000000000..2a8ce309b66c --- /dev/null +++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.0-fix-scons.patch @@ -0,0 +1,54 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -865,7 +865,6 @@ + + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -873,13 +872,13 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux or darwin: +- env.Append( CCFLAGS=["-pipe"] ) + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-fPIC"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -905,11 +904,6 @@ + env.Append( CXXFLAGS=" -fprofile-arcs -ftest-coverage " ) + env.Append( LINKFLAGS=" -fprofile-arcs -ftest-coverage " ) + +- if optBuild: +- env.Append( CCFLAGS=["-O3"] ) +- else: +- env.Append( CCFLAGS=["-O0"] ) +- + if debugBuild: + if not optBuild: + env.Append( CCFLAGS=["-fstack-protector"] ) +@@ -932,7 +926,6 @@ + except OSError: + pass + +-env.Prepend(CPPPATH=['$VARIANT_DIR/third_party/gtest-1.7.0/include']) + + boostSuffixList = ["-mt", ""] + if get_option("boost-lib-search-suffixes") is not None: +@@ -1143,6 +1136,7 @@ + # Clang likes to warn about unused functions, which seems a tad aggressive and breaks + # -Werror, which we want to be able to use. + AddToCCFLAGSIfSupported(myenv, '-Wno-unused-function') ++ AddToCCFLAGSIfSupported(myenv, '-Wno-unused-variable') + + # TODO: Note that the following two flags are added to CCFLAGS even though they are + # really C++ specific. We need to do this because SCons passes CXXFLAGS *before* diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch new file mode 100644 index 000000000000..9997dd57a2c1 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-1.1.2-boost-ref.patch @@ -0,0 +1,15 @@ +Fix missing implicit include. +Patch by Jan-Matthias Braun +See also: https://bugs.gentoo.org/show_bug.cgi?id=598340 + +--- a/src/mongo/client/examples/connect.cpp ++++ b/src/mongo/client/examples/connect.cpp +@@ -29,6 +29,8 @@ + #include "mongo/client/dbclient.h" + #include "mongo/stdx/functional.h" + ++#include ++ + namespace { + + class OstreamAppender : public mongo::logger::MessageLogDomain::EventAppender { diff --git a/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch new file mode 100644 index 000000000000..be5408511bda --- /dev/null +++ b/dev-libs/mongo-cxx-driver/files/mongo-cxx-driver-26compat-fix-scons.patch @@ -0,0 +1,34 @@ +--- a/SConstruct 2015-03-23 10:36:42.328921927 +0100 ++++ b/SConstruct 2015-03-23 10:37:37.599310414 +0100 +@@ -828,7 +828,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -836,13 +835,13 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux or darwin: +- env.Append( CCFLAGS=["-pipe"] ) + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -938,7 +937,6 @@ + if not use_system_version_of_library("snappy"): + env.Prepend(CPPPATH=['$BUILD_DIR/third_party/snappy']) + +-env.Prepend(CPPPATH=['$BUILD_DIR/third_party/gtest-1.7.0/include']) + + env.Append( CPPPATH=['$EXTRACPPPATH'], + LIBPATH=['$EXTRALIBPATH'] ) diff --git a/dev-libs/mongo-cxx-driver/metadata.xml b/dev-libs/mongo-cxx-driver/metadata.xml new file mode 100644 index 000000000000..e27bea24f74d --- /dev/null +++ b/dev-libs/mongo-cxx-driver/metadata.xml @@ -0,0 +1,11 @@ + + + + + ultrabug@gentoo.org + Alexys Jacob + + + mongodb/mongo-cxx-driver + + diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild new file mode 100644 index 000000000000..b30484198d61 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-0.0.2.6.7-r1.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +SCONS_MIN_VERSION="2.3.0" + +inherit eutils flag-o-matic multilib scons-utils versionator + +MY_PV=$(get_version_component_range 3-5) +MY_P=legacy-0.0-26compat-${MY_PV} + +DESCRIPTION="C++ Driver for MongoDB" +HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver" +SRC_URI="https://github.com/mongodb/${PN}/archive/${MY_P}.tar.gz" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kerberos libressl ssl static-libs" + +RDEPEND=" + app-arch/snappy + >=dev-cpp/yaml-cpp-0.5.1 + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + dev-util/google-perftools[-minimal] + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" + +S=${WORKDIR}/${PN}-${MY_P} + +pkg_setup() { + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --disable-warnings-as-errors --sharedclient" + scons_opts+=" --use-system-boost" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-yaml" + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-26compat-fix-scons.patch" + + # stemmer/pcap are not used, strip them wrt #518104 + sed -e '/stemmer/d' -e '/pcap/d' -i SConstruct || die + + # fix yaml-cpp detection + sed -i -e "s/\[\"yaml\"\]/\[\"yaml-cpp\"\]/" SConstruct || die + + # bug #462606 + sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die +} + +src_compile() { + escons ${scons_opts} mongoclient +} + +src_install() { + escons ${scons_opts} --full --nostrip install-mongoclient --prefix="${ED}"/usr + + use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete + + dodoc README.md CONTRIBUTING.md +} + +pkg_preinst() { + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib64/ &>/dev/null + else + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild new file mode 100644 index 000000000000..a32629c15ff1 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.0.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +SCONS_MIN_VERSION="2.3.0" + +inherit eutils flag-o-matic multilib scons-utils + +DESCRIPTION="C++ Driver for MongoDB" +HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver" +SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug libressl sasl ssl static-libs" + +RDEPEND="!dev-db/tokumx + >=dev-libs/boost-1.50[threads(+)] + sasl? ( dev-libs/cyrus-sasl ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND}" + +# Maintainer notes +# TODO: enable test in IUSE with +# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb ) + +DOCS=( README.md ) + +S="${WORKDIR}/${PN}-legacy-${PV}" + +pkg_setup() { + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --disable-warnings-as-errors --sharedclient" + + if use debug; then + scons_opts+=" --dbg=on" + fi + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use sasl; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.0.0-fix-scons.patch" + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi +} + +src_install() { + escons ${scons_opts} install --prefix="${ED}"/usr + + use static-libs || find "${D}" -name '*.a' -delete +} diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild new file mode 100644 index 000000000000..a32629c15ff1 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.0.5.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +SCONS_MIN_VERSION="2.3.0" + +inherit eutils flag-o-matic multilib scons-utils + +DESCRIPTION="C++ Driver for MongoDB" +HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver" +SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug libressl sasl ssl static-libs" + +RDEPEND="!dev-db/tokumx + >=dev-libs/boost-1.50[threads(+)] + sasl? ( dev-libs/cyrus-sasl ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND}" + +# Maintainer notes +# TODO: enable test in IUSE with +# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb ) + +DOCS=( README.md ) + +S="${WORKDIR}/${PN}-legacy-${PV}" + +pkg_setup() { + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --disable-warnings-as-errors --sharedclient" + + if use debug; then + scons_opts+=" --dbg=on" + fi + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use sasl; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.0.0-fix-scons.patch" + + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi +} + +src_install() { + escons ${scons_opts} install --prefix="${ED}"/usr + + use static-libs || find "${D}" -name '*.a' -delete +} diff --git a/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild new file mode 100644 index 000000000000..4b2e018de535 --- /dev/null +++ b/dev-libs/mongo-cxx-driver/mongo-cxx-driver-1.1.2-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +SCONS_MIN_VERSION=2.3.0 + +inherit scons-utils toolchain-funcs + +DESCRIPTION="C++ Driver for MongoDB" +HOMEPAGE="https://github.com/mongodb/mongo-cxx-driver" +SRC_URI="https://github.com/mongodb/${PN}/archive/legacy-${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug libressl sasl ssl static-libs" + +RDEPEND=" + !dev-db/tokumx + dev-libs/boost:=[threads(+)] + sasl? ( dev-libs/cyrus-sasl ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND}" + +# Maintainer notes +# TODO: enable test in IUSE with +# test? ( >=dev-cpp/gtest-1.7.0 dev-db/mongodb ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.0-fix-scons.patch + "${FILESDIR}"/${PN}-1.1.2-boost-ref.patch +) + +S="${WORKDIR}/${PN}-legacy-${PV}" + +src_configure() { + scons_opts=( + --cc=$(tc-getCC) + --cxx=$(tc-getCXX) + --cpppath="${EPREFIX}"/usr/include + --libpath="${EPREFIX}"/usr/$(get_libdir) + --variant-dir=build + --disable-warnings-as-errors + --sharedclient + ) + + use debug && scons_opts+=( --dbg=on ) + use sasl && scons_opts+=( --use-sasl-client ) + use ssl && scons_opts+=( --ssl ) +} + +src_compile() { + escons "${scons_opts[@]}" +} + +src_install() { + escons "${scons_opts[@]}" install --prefix="${ED%/}"/usr + + # fix multilib-strict QA failures + mv "${ED%/}"/usr/{lib,$(get_libdir)} || die + + einstalldocs + + if ! use static-libs; then + find "${D}" -name '*.a' -delete || die + fi +} -- cgit v1.2.3