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.

46 lines
1.1 KiB

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