You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=re2
  3. PKG_VERSION:=2019-06-01
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)?
  7. PKG_HASH:=02b7d73126bd18e9fbfe5d6375a8bb13fadaf8e99e48cbb062e4500fc18e8e2e
  8. PKG_LICENSE:=BSD-3-Clause
  9. PKG_LICENSE_FILES:=LICENSE
  10. include $(INCLUDE_DIR)/package.mk
  11. include $(INCLUDE_DIR)/host-build.mk
  12. include $(INCLUDE_DIR)/cmake.mk
  13. PKG_BUILD_PARALLEL:=1
  14. HOST_BUILD_PARALLEL:=1
  15. CMAKE_OPTIONS:= \
  16. -DBUILD_SHARED_LIBS=$(if $(CONFIG_RE2_SHARED),ON,OFF)
  17. CMAKE_INSTALL:=1
  18. define Package/re2
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. DEPENDS:=+libstdcpp
  22. TITLE:=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.
  23. URL:=https://github.com/google/re2
  24. MAINTAINER:=Amol Bhave <ambhave@fb.com>
  25. endef
  26. define Package/re2/config
  27. choice
  28. prompt "Compile RE2 library."
  29. default RE2_SHARED
  30. help
  31. Choose which version to compile.
  32. -> Shared:
  33. - Only Shared lib will be compiled.
  34. -> Static:
  35. - Only Static lib will be compiled.
  36. config RE2_SHARED
  37. bool "Shared"
  38. config RE2_STATIC
  39. bool "Static"
  40. endchoice
  41. endef
  42. define Package/re2/description
  43. RE2 is a fast, safe, thread-friendly alternative to backtracking regular
  44. expression engines like those used in PCRE, Perl, and Python.
  45. It is a C++ library.
  46. endef
  47. define Package/re2/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/
  50. endef
  51. $(eval $(call BuildPackage,re2))
  52. $(eval $(call HostBuild))