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.

48 lines
1.1 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=re2
  3. PKG_VERSION:=2020-04-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:=98794bc5416326817498384a9c43cbb5a406bab8da9f84f83c39ecad43ed5cea
  8. PKG_MAINTAINER:=
  9. PKG_LICENSE:=BSD-3-Clause
  10. PKG_LICENSE_FILES:=LICENSE
  11. CMAKE_INSTALL:=1
  12. PKG_BUILD_PARALLEL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. define Package/re2
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. DEPENDS:=+libstdcpp
  19. TITLE:=RE2 - C++ regular expression library
  20. URL:=https://github.com/google/re2
  21. ABI_VERSION:=6
  22. endef
  23. define Package/re2/description
  24. RE2 is a fast, safe, thread-friendly alternative to backtracking regular
  25. expression engines like those used in PCRE, Perl, and Python.
  26. It is a C++ library.
  27. endef
  28. CMAKE_OPTIONS += \
  29. -DBUILD_SHARED_LIBS=ON
  30. TARGET_LDFLAGS += \
  31. $(if $(CONFIG_USE_GLIBC),-lm) \
  32. -Wl,--as-needed,--gc-sections
  33. define Package/re2/install
  34. $(INSTALL_DIR) $(1)/usr/lib
  35. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so $(1)/usr/lib/
  36. endef
  37. $(eval $(call BuildPackage,re2))