summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/brpc/narrow.patch33
-rw-r--r--var/spack/repos/builtin/packages/brpc/package.py26
2 files changed, 59 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/brpc/narrow.patch b/var/spack/repos/builtin/packages/brpc/narrow.patch
new file mode 100644
index 0000000000..621e32f998
--- /dev/null
+++ b/var/spack/repos/builtin/packages/brpc/narrow.patch
@@ -0,0 +1,33 @@
+diff --git a/src/butil/containers/case_ignored_flat_map.cpp b/src/butil/containers/case_ignored_flat_map.cpp
+index 7f2fadc5..a7471561 100644
+--- a/src/butil/containers/case_ignored_flat_map.cpp
++++ b/src/butil/containers/case_ignored_flat_map.cpp
+@@ -19,7 +19,7 @@
+
+ namespace butil {
+
+-static const char g_tolower_map_base[] = {
++static const signed char g_tolower_map_base[] = {
+ -128, -127, -126, -125, -124, -123, -122, -121, -120,
+ -119, -118, -117, -116, -115, -114, -113, -112, -111, -110,
+ -109, -108, -107, -106, -105, -104, -103, -102, -101, -100,
+@@ -48,6 +48,6 @@ static const char g_tolower_map_base[] = {
+ 120, 121, 122, 123, 124, 125, 126, 127
+ };
+
+-extern const char* const g_tolower_map = g_tolower_map_base + 128;
++extern const signed char* const g_tolower_map = g_tolower_map_base + 128;
+
+ } // namespace butil
+diff --git a/src/butil/containers/case_ignored_flat_map.h b/src/butil/containers/case_ignored_flat_map.h
+index ed6e58b4..6bc1a9af 100644
+--- a/src/butil/containers/case_ignored_flat_map.h
++++ b/src/butil/containers/case_ignored_flat_map.h
+@@ -27,7 +27,7 @@ namespace butil {
+ // NOTE: Using ascii_tolower instead of ::tolower shortens 150ns in
+ // FlatMapTest.perf_small_string_map (with -O2 added, -O0 by default)
+ inline char ascii_tolower(char c) {
+- extern const char* const g_tolower_map;
++ extern const signed char* const g_tolower_map;
+ return g_tolower_map[(int)c];
+ }
diff --git a/var/spack/repos/builtin/packages/brpc/package.py b/var/spack/repos/builtin/packages/brpc/package.py
new file mode 100644
index 0000000000..ba1417babf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/brpc/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Brpc(CMakePackage):
+ """An industrial-grade RPC framework used throughout Baidu, with
+ 1,000,000+ instances(not counting clients) and thousands kinds of
+ services, called "baidu-rpc" inside Baidu. Only C++ implementatioo
+ on is opensourced right now."""
+
+ homepage = "https://github.com/apache/incubator-brpc"
+ url = "https://github.com/apache/incubator-brpc/archive/0.9.7.tar.gz"
+
+ version('0.9.7', sha256='722cd342baf3b05189ca78ecf6c56ea6ffec22e62fc2938335e4e5bab545a49c')
+ version('0.9.6', sha256='b872ca844999e0ba768acd823b409761f126590fb34cb0183da915a595161446')
+ version('0.9.5', sha256='11ca8942242a4c542c11345b7463a4aea33a11ca33e91d9a2f64f126df8c70e9')
+
+ depends_on('gflags')
+ depends_on('protobuf')
+ depends_on('leveldb')
+
+ patch('narrow.patch', sha256='d7393029443853ddda6c09e3d2185ac2f60920a36a8b685eb83b6b80c1535539', when='@:0.9.7')