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.

92 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2017 Shane Peelar
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pcre2
  9. PKG_VERSION:=10.37
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
  13. PKG_HASH:=4d95a96e8b80529893b4562be12648d798b957b1ba1aae39606bbc2ab956d270
  14. PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENCE
  17. PKG_CPE_ID:=cpe:/a:pcre:pcre
  18. PKG_CONFIG_DEPENDS:=\
  19. CONFIG_PACKAGE_libpcre2-16 \
  20. CONFIG_PACKAGE_libpcre2-32 \
  21. CONFIG_PCRE2_JIT_ENABLED
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/cmake.mk
  24. define Package/libpcre2/default
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. URL:=https://www.pcre.org/
  28. endef
  29. define Package/libpcre2/config
  30. source "$(SOURCE)/Config.in"
  31. endef
  32. define Package/libpcre2
  33. $(call Package/libpcre2/default)
  34. TITLE:=A Perl Compatible Regular Expression library
  35. endef
  36. define Package/libpcre2-16
  37. $(call Package/libpcre2/default)
  38. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  39. endef
  40. define Package/libpcre2-32
  41. $(call Package/libpcre2/default)
  42. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  43. endef
  44. CMAKE_OPTIONS += \
  45. -DBUILD_SHARED_LIBS=ON \
  46. -DPCRE2_BUILD_PCRE2_8=ON \
  47. -DPCRE2_BUILD_PCRE2_16=O$(if $(CONFIG_PACKAGE_libpcre2-16),N,FF) \
  48. -DPCRE2_BUILD_PCRE2_32=O$(if $(CONFIG_PACKAGE_libpcre2-32),N,FF) \
  49. -DPCRE2_DEBUG=OFF \
  50. -DPCRE2_DISABLE_PERCENT_ZT=ON \
  51. -DPCRE2_SUPPORT_JIT=O$(if $(CONFIG_PCRE2_JIT_ENABLED),N,FF) \
  52. -DPCRE2_SHOW_REPORT=OFF \
  53. -DPCRE2_BUILD_PCRE2GREP=OFF \
  54. -DPCRE2_BUILD_TESTS=OFF
  55. define Build/InstallDev
  56. $(call Build/InstallDev/cmake,$(1))
  57. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/pcre2-config
  58. $(INSTALL_DIR) $(2)/bin
  59. $(LN) ../../usr/bin/pcre2-config $(2)/bin/pcre2-config
  60. endef
  61. define Package/libpcre2/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
  64. endef
  65. define Package/libpcre2-16/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
  68. endef
  69. define Package/libpcre2-32/install
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
  72. endef
  73. $(eval $(call BuildPackage,libpcre2))
  74. $(eval $(call BuildPackage,libpcre2-16))
  75. $(eval $(call BuildPackage,libpcre2-32))