* [gentoo-commits] repo/gentoo:master commit in: dev-db/clickhouse/, dev-db/clickhouse/files/
@ 2018-06-15 20:01 Vladimir Smirnov
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Smirnov @ 2018-06-15 20:01 UTC (permalink / raw
To: gentoo-commits
commit: c105170169000ba2c94774ad8ca7328588ce1d6c
Author: Vladimir Smirnov <civil <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 15 19:57:59 2018 +0000
Commit: Vladimir Smirnov <civil <AT> gentoo <DOT> org>
CommitDate: Fri Jun 15 19:57:59 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1051701
dev-db/clickhouse: initial import
Package-Manager: Portage-2.3.40, Repoman-2.3.9
dev-db/clickhouse/Manifest | 5 +
dev-db/clickhouse/clickhouse-1.1.54385.ebuild | 196 +++++++++++++++++++++
.../files/clickhouse-concatenate-python3.patch | 38 ++++
dev-db/clickhouse/files/clickhouse-server.initd | 17 ++
dev-db/clickhouse/files/clickhouse-server.service | 15 ++
dev-db/clickhouse/metadata.xml | 19 ++
6 files changed, 290 insertions(+)
diff --git a/dev-db/clickhouse/Manifest b/dev-db/clickhouse/Manifest
new file mode 100644
index 00000000000..a964c44a4cb
--- /dev/null
+++ b/dev-db/clickhouse/Manifest
@@ -0,0 +1,5 @@
+DIST cctz-4f9776a.tar.gz 290009 BLAKE2B 532eb7d590f9814c05cc7fdd3c75efe0a6b3f81d85201b14163a9600dd858c4fbac592270d0afccd7d5eef0080d7e70e9d716023bdb60d55479585e2cd3d3f59 SHA512 ba0dfc404cc70f03ef2be29fa3b0c70ea881c92a92525ea4ba1b5bcfc9e45df1b62a5eec180f498293e64bdd5cb9b41f97361cbb7e8baf299dcfdcd1557ca205
+DIST clickhouse-1.1.54385.tar.gz 5833821 BLAKE2B 48441aa28dd03c0b3282fe577849902ba29eded5dc90fe83159fdce3be1f93a6e48e48049e62febc2272f9b7ca1c143c1021900daaae9e5b43eab229418becff SHA512 eb3c02e6a094221374eca70b6cf6020414f31cbb196a521214d3c31b4266f5f251d431460025d9e644c83d61a3aa7ac2c266c9fa14db312ce42aa0cc8fc20d7c
+DIST librdkafka-c3d50eb.tar.gz 1869491 BLAKE2B 6b4a1695226d9328033c9cb7db8cd4f80db92b38abce2639db2ebac4511146d0343967d4d6342ed13f13eab07d4b32bc72acd02d5bdec1a5e1da3e2be02e2b2d SHA512 47fd12a2a9c14c986f331abf0df12c782e5f803c2bce86a9eab17977d444230ce4c5e8921e112127b1c51b40fc914e14e20269d65058ecf53991d09997ae172b
+DIST lz4-c10863b.tar.gz 223026 BLAKE2B c5cccac2f9e86f8bc7986cc283bfb969445e0edf35f78dbd880f56c191c172c6c314353e66a056acb461cfb657441662e23daa755c6e3071ff4ac328f79ab7a8 SHA512 97c460ceb48ebbf8832459f2315e08e62832a861d055c5fc78848091feb5c25f175d91e364d14633ca66353d9bd64de5161dfbe6bc1aeb526c5cb62ceab9c63c
+DIST zstd-2555975.tar.gz 2062067 BLAKE2B cfd4eb221a94b1c6bd4f8950ee6e1511f9b773f61a68ada33781c5fed3f3f664820135b074810721cbdfad524aff6d54c2f017aa6b3ec9efcdf09c29aec90219 SHA512 7320149560095a348f0c98f22ed4a8247c32a2e66ef3098039a4d5520b4cb8893ff799e51fb45716594c5ed609752eee6454faa3ddfbb4cab3a46330544eaa19
diff --git a/dev-db/clickhouse/clickhouse-1.1.54385.ebuild b/dev-db/clickhouse/clickhouse-1.1.54385.ebuild
new file mode 100644
index 00000000000..6c6aa998431
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-1.1.54385.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+LIBRDKAFKA_COMMIT="c3d50eb"
+LZ4_COMMIT="c10863b"
+ZSTD_COMMIT="2555975"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.tar.gz -> ${P}.tar.gz
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+ https://github.com/edenhill/librdkafka/archive/${LIBRDKAFKA_COMMIT}.tar.gz -> librdkafka-${LIBRDKAFKA_COMMIT}.tar.gz
+ https://github.com/lz4/lz4/archive/${LZ4_COMMIT}.tar.gz -> lz4-${LZ4_COMMIT}.tar.gz
+ https://github.com/facebook/zstd/archive/${ZSTD_COMMIT}.tar.gz -> zstd-${ZSTD_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools zookeeper"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ client? (
+ sys-libs/ncurses:0
+ sys-libs/readline:0
+ )
+
+ !static? (
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/zlib
+ || (
+ dev-db/unixODBC
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu:=
+ dev-libs/glib
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ dev-libs/zookeeper-c
+ mysql? ( virtual/libmysqlclient )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-0.17.3 )
+ static? (
+ dev-libs/double-conversion[static-libs]
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ dev-libs/boost[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-libs/zookeeper-c[static-libs]
+ virtual/libmysqlclient[static-libs]
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ || (
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+ )
+"
+
+PATCHES=( ${FILESDIR}/clickhouse-concatenate-python3.patch )
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz librdkafka lz4 zookeeper zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+ tar --strip-components=1 -C librdkafka -xf "${DISTDIR}/librdkafka-${LIBRDKAFKA_COMMIT}.tar.gz" || die "failed to unpack librdkafka"
+ tar --strip-components=1 -C lz4 -xf "${DISTDIR}/lz4-${LZ4_COMMIT}.tar.gz" || die "failed to unpack lz4"
+ tar --strip-components=1 -C zstd -xf "${DISTDIR}/zstd-${ZSTD_COMMIT}.tar.gz" || die "failed to unpack zstd"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_TOOLS="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ echo "Entering docs"
+ pushd "${S}/docs" || die "Failed to enter docs build directory"
+ pwd
+ echo "Executing build.sh"
+ bash -x ./build.sh || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+ echo "Installing docs"
+
+ dodoc -r "${S}/docs/build/docs"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/files/clickhouse-concatenate-python3.patch b/dev-db/clickhouse/files/clickhouse-concatenate-python3.patch
new file mode 100644
index 00000000000..155ec758a74
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-concatenate-python3.patch
@@ -0,0 +1,38 @@
+--- ClickHouse-1.1.54381-stable/docs/concatenate.py.bak 2018-05-20 20:30:45.958356001 +0200
++++ ClickHouse-1.1.54381-stable/docs/concatenate.py 2018-05-20 20:45:29.442341203 +0200
+@@ -20,12 +20,12 @@
+ import os
+
+ if len(sys.argv) < 2:
+- print "Usage: concatenate.py language_dir"
+- print "Example: concatenate.py ru"
++ print("Usage: concatenate.py language_dir")
++ print("Example: concatenate.py ru")
+ sys.exit(1)
+
+ if not os.path.exists(sys.argv[1]):
+- print "Pass language_dir correctly. For example, 'ru'."
++ print("Pass language_dir correctly. For example, 'ru'.")
+ sys.exit(2)
+
+ # Configuration
+@@ -43,8 +43,8 @@
+ path = (l[l.index(':') + 1:]).strip(" '\n")
+ files_to_concatenate.append(path)
+
+-print str(len(files_to_concatenate)) + " files will be concatenated into single md-file.\nFiles:"
+-print files_to_concatenate
++print(str(len(files_to_concatenate)) + " files will be concatenated into single md-file.\nFiles:")
++print(files_to_concatenate)
+
+ # 2. Concatenate all of the files in the list
+
+@@ -68,7 +68,7 @@
+ if sharp_pos > -1:
+ return '[' + text + '](' + link[sharp_pos:] + ')'
+ else:
+- print 'ERROR: Link [' + text + '](' + link + ') in file ' + path + ' has no anchor. Please provide it.'
++ print('ERROR: Link [' + text + '](' + link + ') in file ' + path + ' has no anchor. Please provide it.')
+ # return '['+text+'](#'+link.replace('/','-')+')'
+
+ for l in file:
diff --git a/dev-db/clickhouse/files/clickhouse-server.initd b/dev-db/clickhouse/files/clickhouse-server.initd
new file mode 100644
index 00000000000..57c91cd2389
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/run/clickhouse-server.pid"
+command_background=1
+command="/usr/bin/clickhouse-server"
+start_stop_daemon_args="--user clickhouse --group clickhouse \
+ --chdir /etc/clickhouse-server \
+ -1 /var/log/clickhouse-server/stdout.log \
+ -2 /var/log/clickhouse-server/stderr.log"
+
+depend() {
+ need net
+ after mongodb
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.service b/dev-db/clickhouse/files/clickhouse-server.service
new file mode 100644
index 00000000000..64d2cbacf6e
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=ClickHouse Server (analytic DBMS for big data)
+
+[Service]
+Type=simple
+User=clickhouse
+Group=clickhouse
+Restart=always
+RestartSec=30
+ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
+LimitCORE=infinity
+LimitNOFILE=500000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/clickhouse/metadata.xml b/dev-db/clickhouse/metadata.xml
new file mode 100644
index 00000000000..0583e43c96a
--- /dev/null
+++ b/dev-db/clickhouse/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>civil@gentoo.org</email>
+ <name>Vladimir Smirnov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">yandex/Clickhouse</remote-id>
+ </upstream>
+ <use>
+ <flag name="client">Build CLI client.</flag>
+ <flag name="server">Build server.</flag>
+ <flag name="kafka">Enables support for kafka consumer.</flag>
+ <flag name="mongodb">Enabled support for MongoDB-based dictionaries</flag>
+ <flag name="tools">Build various tools, like benchmark, copier, etc.</flag>
+ <flag name="zookeeper">Enable support for clustering (based on Zookeeper).</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/clickhouse/, dev-db/clickhouse/files/
@ 2019-08-15 17:20 罗百科
0 siblings, 0 replies; 3+ messages in thread
From: 罗百科 @ 2019-08-15 17:20 UTC (permalink / raw
To: gentoo-commits
commit: 968eada1c14455fce0029e184d401e120002a010
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 17:20:02 2019 +0000
Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Thu Aug 15 17:20:20 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=968eada1
dev-db/clickhouse: Improve init script, fix dependencies
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
dev-db/clickhouse/clickhouse-19.13.1.11-r1.ebuild | 205 +++++++++++++++++++++
dev-db/clickhouse/files/clickhouse-server.confd | 4 +
dev-db/clickhouse/files/clickhouse-server.initd-r1 | 23 +++
3 files changed, 232 insertions(+)
diff --git a/dev-db/clickhouse/clickhouse-19.13.1.11-r1.ebuild b/dev-db/clickhouse/clickhouse-19.13.1.11-r1.ebuild
new file mode 100644
index 00000000000..a2fbc773fa7
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-19.13.1.11-r1.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.zip -> ${P}.zip
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ dev-libs/poco[odbc]
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( virtual/libmysqlclient )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+ dev-libs/jemalloc
+ dev-libs/protobuf
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/double-conversion[static-libs]
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ virtual/libmysqlclient[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+ =dev-cpp/gtest-1.8*
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_prepare() {
+ eapply_user
+ cmake-utils_src_prepare
+}
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd-r1 clickhouse-server
+ newconfd "${FILESDIR}"/clickhouse-server.confd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+
+ keepdir /var/log/clickhouse-server
+ chown clickhouse:clickhouse "${D}"/var/log/clickhouse-server
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.confd b/dev-db/clickhouse/files/clickhouse-server.confd
new file mode 100644
index 00000000000..0e7344672b4
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.confd
@@ -0,0 +1,4 @@
+user="clickhouse"
+group="clickhouse"
+logdir="/var/log/clickhouse-server"
+
diff --git a/dev-db/clickhouse/files/clickhouse-server.initd-r1 b/dev-db/clickhouse/files/clickhouse-server.initd-r1
new file mode 100644
index 00000000000..efc11f5e54c
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.initd-r1
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+user="clickhouse"
+group="clickhouse"
+logdir="/var/log/clickhouse-server"
+pidfile="/run/clickhouse-server.pid"
+command_background=1
+command="/usr/bin/clickhouse-server"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --chdir /etc/clickhouse-server \
+ -1 ${logdir}/stdout.log \
+ -2 ${logdir}/stderr.log"
+
+depend() {
+ need net
+ after mongodb
+}
+
+start_pre() {
+ checkpath -m 0755 -o "${user}:${group}" -d "${logdir}"
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/clickhouse/, dev-db/clickhouse/files/
@ 2020-01-12 18:03 Mikle Kolyada
0 siblings, 0 replies; 3+ messages in thread
From: Mikle Kolyada @ 2020-01-12 18:03 UTC (permalink / raw
To: gentoo-commits
commit: 1f5341d6d8e4687c9f43908cf3dcd1f5be9e5bbc
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 12 18:02:49 2020 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Jan 12 18:02:49 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f5341d6
Revert "dev-db/clickhouse: remove last-rited pkg"
This reverts commit 9d5b201c76a925aaf2bd56c57a116a20ff226806.
This got potentially new maintainer
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
dev-db/clickhouse/Manifest | 8 +
dev-db/clickhouse/clickhouse-18.10.3-r1.ebuild | 200 ++++++++++++++++++++
dev-db/clickhouse/clickhouse-18.12.17-r1.ebuild | 200 ++++++++++++++++++++
dev-db/clickhouse/clickhouse-18.6.0-r1.ebuild | 200 ++++++++++++++++++++
dev-db/clickhouse/clickhouse-19.13.1.11-r2.ebuild | 204 ++++++++++++++++++++
dev-db/clickhouse/clickhouse-19.13.1.11-r3.ebuild | 205 ++++++++++++++++++++
dev-db/clickhouse/clickhouse-19.15.2.2.ebuild | 207 +++++++++++++++++++++
dev-db/clickhouse/clickhouse-19.5.3.8-r1.ebuild | 203 ++++++++++++++++++++
dev-db/clickhouse/clickhouse-19.9.5.36-r1.ebuild | 203 ++++++++++++++++++++
dev-db/clickhouse/files/clickhouse-server.confd | 4 +
dev-db/clickhouse/files/clickhouse-server.initd | 16 ++
dev-db/clickhouse/files/clickhouse-server.initd-r1 | 23 +++
dev-db/clickhouse/files/clickhouse-server.service | 15 ++
dev-db/clickhouse/metadata.xml | 16 ++
14 files changed, 1704 insertions(+)
diff --git a/dev-db/clickhouse/Manifest b/dev-db/clickhouse/Manifest
new file mode 100644
index 00000000000..4c1396c38ae
--- /dev/null
+++ b/dev-db/clickhouse/Manifest
@@ -0,0 +1,8 @@
+DIST cctz-4f9776a.tar.gz 290009 BLAKE2B 532eb7d590f9814c05cc7fdd3c75efe0a6b3f81d85201b14163a9600dd858c4fbac592270d0afccd7d5eef0080d7e70e9d716023bdb60d55479585e2cd3d3f59 SHA512 ba0dfc404cc70f03ef2be29fa3b0c70ea881c92a92525ea4ba1b5bcfc9e45df1b62a5eec180f498293e64bdd5cb9b41f97361cbb7e8baf299dcfdcd1557ca205
+DIST clickhouse-18.10.3.tar.gz 6136661 BLAKE2B 5564bbe85f4ca43f18df702148af0e4e5b5a8826994d90f29beb3a37cdbeb36f9d3ec77d9c7bc6f843e7586e5441aeb0937548eb5eb61d27cecc5790d8c21a5b SHA512 c78386922388cf910a995b569724eb22fc41ab60e765a4d3644c4a48d8b9a67ef28b7e375186b2eb00c43b4f06e90783084f4ac4d3789f1b6e4251ee30e8833c
+DIST clickhouse-18.12.17.tar.gz 6495521 BLAKE2B 00dfb823b9e36923beb50a88bee88af3918bedc7b20079785699a42e36e52f32739f786bd78c5b350f58ae59251e3846da6202d04e24e9a750c92e16065cc395 SHA512 876c5fb6011c65b8ec201126678dad6f5de3430b7d320316ced5c6d22e8086ce337d20b73badbd053bf141097b8fe6cd94910ed607b4bbedb681cfa7921d1fb6
+DIST clickhouse-18.6.0.tar.gz 5852534 BLAKE2B 5634fd26907b21d4a35cff3ed816696205be4aff1cdd1acfe222e24214b1842eb18a4e499e888b0d92b78f5c3023c2962a385af2c0ea889055e473dfa0198bf5 SHA512 e8ea2d4457122513cad47b1cdb2a58dd2ffaec77a7a08bf82179aca12a369d39970520a995bb5db2e5ea4b0939da827b7d4b1f3929cf71c149c965438ebb3633
+DIST clickhouse-19.13.1.11.zip 11502726 BLAKE2B c2788702a2c27c995abc072a94f3945ed6f9039fe0c7840312a86987faf52d2f7801d531e89a02848fa8ee1319247c41de0f3ad0c0cb51c1df1dbcfca3bd3b0a SHA512 095a0e63eff6989ea1f70fac593069e1cdb6ea207a99d8cfd610c4eb8f3f7411a784d9f100c9fc899898e68dd88dd54bec3c136764793c8cae986d920a651f8c
+DIST clickhouse-19.15.2.2.zip 11425217 BLAKE2B 3a2288d771cd92dc283713a44df84df8c3c946ef92efd781d7619c8ffc0d7a3884f1a988c81f1703a7d373e78e413bdaea0fd100cebf7090be9bba16779209ff SHA512 029376b9d540c592d30a32457deb9e605d512fc448eb3dc6896b0ca48a5e92f390ef2dc3a4ea63ce19c264a8b2810ff952e95a6c7a8d4506f733ac6253c079d3
+DIST clickhouse-19.5.3.8.zip 11247905 BLAKE2B f72289f55bddf9b3ad2e16a4d1fc6e4f7681477e742eda3694c3c16975820c93affc01c70b194c5992226d79bee714f706c04402c62bd0ed3d1701a16fb22192 SHA512 f578abbd43c3ccf721e079ce2bafac22be0c5d619388be192c59a2053ae1cf1e7f0a025e0323f0f8f004f879990a88c0ca0cd4d135606de51c576619fe0172b8
+DIST clickhouse-19.9.5.36.zip 11708002 BLAKE2B 075f9b1556c5ee207a608047fa559cec7a0b1f044236e412189ae6dabe25aa04abf881726e4ffa17d4aad6937250c704f050935e61470994b57eaa1ac9ea07e4 SHA512 b0aa04a1c0f7c15316c83a2711f9b64f8235e664956f933530a9f2dc26fcb8b817adb8ca43c96db1cad498e06f4291ce13c0bb259726039c5caa52ae523fa4ab
diff --git a/dev-db/clickhouse/clickhouse-18.10.3-r1.ebuild b/dev-db/clickhouse/clickhouse-18.10.3-r1.ebuild
new file mode 100644
index 00000000000..9ac11b623af
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-18.10.3-r1.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.tar.gz -> ${P}.tar.gz
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools zookeeper"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ || (
+ dev-db/unixODBC
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ dev-libs/zookeeper-c
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-libs/zookeeper-c[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ || (
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zookeeper zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-18.12.17-r1.ebuild b/dev-db/clickhouse/clickhouse-18.12.17-r1.ebuild
new file mode 100644
index 00000000000..8608b4a58fc
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-18.12.17-r1.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.tar.gz -> ${P}.tar.gz
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ || (
+ dev-db/unixODBC
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ || (
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-18.6.0-r1.ebuild b/dev-db/clickhouse/clickhouse-18.6.0-r1.ebuild
new file mode 100644
index 00000000000..c476203de69
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-18.6.0-r1.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+ZSTD_COMMIT="2555975"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.tar.gz -> ${P}.tar.gz
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools zookeeper"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ || (
+ dev-db/unixODBC
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ dev-libs/zookeeper-c
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-0.17.3 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-libs/zookeeper-c[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ || (
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zookeeper zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-19.13.1.11-r2.ebuild b/dev-db/clickhouse/clickhouse-19.13.1.11-r2.ebuild
new file mode 100644
index 00000000000..e4848a05976
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-19.13.1.11-r2.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.zip -> ${P}.zip
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ dev-libs/poco[odbc]
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+ dev-libs/jemalloc
+ dev-libs/protobuf
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_prepare() {
+ eapply_user
+ cmake-utils_src_prepare
+}
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+
+ keepdir /var/log/clickhouse-server
+ chown clickhouse:clickhouse "${D}"/var/log/clickhouse-server
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-19.13.1.11-r3.ebuild b/dev-db/clickhouse/clickhouse-19.13.1.11-r3.ebuild
new file mode 100644
index 00000000000..08e3db756d3
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-19.13.1.11-r3.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.zip -> ${P}.zip
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ dev-libs/poco[odbc]
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+ dev-libs/jemalloc
+ dev-libs/protobuf
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+ =dev-cpp/gtest-1.8*
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_prepare() {
+ eapply_user
+ cmake-utils_src_prepare
+}
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd-r1 clickhouse-server
+ newconfd "${FILESDIR}"/clickhouse-server.confd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+
+ keepdir /var/log/clickhouse-server
+ chown clickhouse:clickhouse "${D}"/var/log/clickhouse-server
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-19.15.2.2.ebuild b/dev-db/clickhouse/clickhouse-19.15.2.2.ebuild
new file mode 100644
index 00000000000..dec501ea572
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-19.15.2.2.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.zip -> ${P}.zip
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ dev-libs/poco[odbc]
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+ dev-libs/jemalloc
+ dev-libs/protobuf
+ dev-cpp/sparsehash
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+ =dev-cpp/gtest-1.8*
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_prepare() {
+ sed -i -e 's~add_subdirectory(contrib/libunwind-cmake)~~' cmake/find/unwind.cmake || die "Failed to succeed"
+ eapply_user
+ cmake-utils_src_prepare
+}
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd-r1 clickhouse-server
+ newconfd "${FILESDIR}"/clickhouse-server.confd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+
+ keepdir /var/log/clickhouse-server
+ chown clickhouse:clickhouse "${D}"/var/log/clickhouse-server
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-19.5.3.8-r1.ebuild b/dev-db/clickhouse/clickhouse-19.5.3.8-r1.ebuild
new file mode 100644
index 00000000000..92f6800a614
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-19.5.3.8-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.zip -> ${P}.zip
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ dev-libs/poco[odbc]
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+ dev-libs/jemalloc
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_prepare() {
+ eapply_user
+ cmake-utils_src_prepare
+}
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+
+ keepdir /var/log/clickhouse-server
+ chown clickhouse:clickhouse "${D}"/var/log/clickhouse-server
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/clickhouse-19.9.5.36-r1.ebuild b/dev-db/clickhouse/clickhouse-19.9.5.36-r1.ebuild
new file mode 100644
index 00000000000..92f6800a614
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-19.9.5.36-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.zip -> ${P}.zip
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+RESTRICT="!test? ( test )"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ dev-libs/poco[odbc]
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( dev-db/mysql-connector-c:= )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+ dev-libs/jemalloc
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ dev-db/mysql-connector-c[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_prepare() {
+ eapply_user
+ cmake-utils_src_prepare
+}
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+
+ keepdir /var/log/clickhouse-server
+ chown clickhouse:clickhouse "${D}"/var/log/clickhouse-server
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.confd b/dev-db/clickhouse/files/clickhouse-server.confd
new file mode 100644
index 00000000000..0e7344672b4
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.confd
@@ -0,0 +1,4 @@
+user="clickhouse"
+group="clickhouse"
+logdir="/var/log/clickhouse-server"
+
diff --git a/dev-db/clickhouse/files/clickhouse-server.initd b/dev-db/clickhouse/files/clickhouse-server.initd
new file mode 100644
index 00000000000..5e787c0c1fa
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/clickhouse-server.pid"
+command_background=1
+command="/usr/bin/clickhouse-server"
+start_stop_daemon_args="--user clickhouse --group clickhouse \
+ --chdir /etc/clickhouse-server \
+ -1 /var/log/clickhouse-server/stdout.log \
+ -2 /var/log/clickhouse-server/stderr.log"
+
+depend() {
+ need net
+ after mongodb
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.initd-r1 b/dev-db/clickhouse/files/clickhouse-server.initd-r1
new file mode 100644
index 00000000000..efc11f5e54c
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.initd-r1
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+user="clickhouse"
+group="clickhouse"
+logdir="/var/log/clickhouse-server"
+pidfile="/run/clickhouse-server.pid"
+command_background=1
+command="/usr/bin/clickhouse-server"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --chdir /etc/clickhouse-server \
+ -1 ${logdir}/stdout.log \
+ -2 ${logdir}/stderr.log"
+
+depend() {
+ need net
+ after mongodb
+}
+
+start_pre() {
+ checkpath -m 0755 -o "${user}:${group}" -d "${logdir}"
+}
diff --git a/dev-db/clickhouse/files/clickhouse-server.service b/dev-db/clickhouse/files/clickhouse-server.service
new file mode 100644
index 00000000000..64d2cbacf6e
--- /dev/null
+++ b/dev-db/clickhouse/files/clickhouse-server.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=ClickHouse Server (analytic DBMS for big data)
+
+[Service]
+Type=simple
+User=clickhouse
+Group=clickhouse
+Restart=always
+RestartSec=30
+ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
+LimitCORE=infinity
+LimitNOFILE=500000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/clickhouse/metadata.xml b/dev-db/clickhouse/metadata.xml
new file mode 100644
index 00000000000..bb224e97f7c
--- /dev/null
+++ b/dev-db/clickhouse/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">yandex/Clickhouse</remote-id>
+ </upstream>
+ <use>
+ <flag name="client">Build CLI client.</flag>
+ <flag name="server">Build server.</flag>
+ <flag name="kafka">Enables support for kafka consumer.</flag>
+ <flag name="mongodb">Enabled support for MongoDB-based dictionaries</flag>
+ <flag name="tools">Build various tools, like benchmark, copier, etc.</flag>
+ <flag name="zookeeper">Enable support for clustering (based on Zookeeper).</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-12 18:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-15 20:01 [gentoo-commits] repo/gentoo:master commit in: dev-db/clickhouse/, dev-db/clickhouse/files/ Vladimir Smirnov
-- strict thread matches above, loose matches on Subject: below --
2019-08-15 17:20 罗百科
2020-01-12 18:03 Mikle Kolyada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox