package/re2: new package
authorMichael Nosthoff <buildroot@heine.tech>
Thu, 13 Aug 2020 14:45:48 +0000 (16:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 16 Aug 2020 21:30:34 +0000 (23:30 +0200)
RE2 is a fast, safe, thread-friendly alternative to backtracking
regular expression engines like those used in PCRE, Perl, and
Python. It is a C++ library.

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/Config.in
package/re2/Config.in [new file with mode: 0644]
package/re2/re2.hash [new file with mode: 0644]
package/re2/re2.mk [new file with mode: 0644]

index b5285a66a29ebbcab1bb54e4a58cd760ceb4d27c..81ee3273f80940a48bd3f04f1a86ef01acae80b4 100644 (file)
@@ -1945,6 +1945,7 @@ menu "Text and terminal handling"
        source "package/pcre/Config.in"
        source "package/pcre2/Config.in"
        source "package/popt/Config.in"
+       source "package/re2/Config.in"
        source "package/readline/Config.in"
        source "package/slang/Config.in"
        source "package/tclap/Config.in"
diff --git a/package/re2/Config.in b/package/re2/Config.in
new file mode 100644 (file)
index 0000000..004185a
--- /dev/null
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_RE2
+       bool "re2"
+       depends on BR2_INSTALL_LIBSTDCPP
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # needs C++11
+       help
+         RE2 is a fast, safe, thread-friendly alternative
+         to backtracking regular expression engines like
+         those used in PCRE, Perl, and Python.
+         It is a C++ library.
+
+         https://github.com/google/re2
+
+comment "re2 needs a toolchain w/ C++, gcc >= 4.8"
+       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
diff --git a/package/re2/re2.hash b/package/re2/re2.hash
new file mode 100644 (file)
index 0000000..b8a8051
--- /dev/null
@@ -0,0 +1,3 @@
+# locally calculated
+sha256  6f4c8514249cd65b9e85d3e6f4c35595809a63ad71c5d93083e4d1dcdf9e0cd6  re2-2020-08-01.tar.gz
+sha256  6040cda75d90b1738292a631d89934c411ef7ffd543c4d6a1b7edfc8edf29449  LICENSE
diff --git a/package/re2/re2.mk b/package/re2/re2.mk
new file mode 100644 (file)
index 0000000..0a3c204
--- /dev/null
@@ -0,0 +1,17 @@
+################################################################################
+#
+# re2
+#
+################################################################################
+
+RE2_VERSION = 2020-08-01
+RE2_SITE = $(call github,google,re2,$(RE2_VERSION))
+RE2_LICENSE = BSD-3-Clause
+RE2_LICENSE_FILES = LICENSE
+RE2_INSTALL_STAGING = YES
+
+RE2_CONF_OPTS += -DRE2_BUILD_TESTING=OFF
+HOST_RE2_CONF_OPTS += -DRE2_BUILD_TESTING=OFF
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))