1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 12:23:59 +02:00
openwrt-packages/libs/libre2/Makefile
Rosen Penev 57b2623d8b
re2: update to 2020-04-01
Massive cleanup of Makefile.

Remove inactive maintainer.

Remove completely unused host build.

Shorten title so that it shows under menuconfig.

Remove pointless static/shared choice.

Add C++17 patch as libcxx seems to need it with this package.

Add ABI_VERSION.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-14 16:19:18 -07:00

49 lines
1.1 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=re2
PKG_VERSION:=2020-04-01
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)?
PKG_HASH:=98794bc5416326817498384a9c43cbb5a406bab8da9f84f83c39ecad43ed5cea
PKG_MAINTAINER:=
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
CMAKE_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/re2
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libstdcpp
TITLE:=RE2 - C++ regular expression library
URL:=https://github.com/google/re2
ABI_VERSION:=6
endef
define Package/re2/description
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.
endef
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON
TARGET_LDFLAGS += \
$(if $(CONFIG_USE_GLIBC),-lm) \
-Wl,--as-needed,--gc-sections
define Package/re2/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,re2))