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.

93 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.36
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
  13. PKG_HASH:=a9ef39278113542968c7c73a31cfcb81aca1faa64690f400b907e8ab6b4a665c
  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_BUILD_PARALLEL:=1
  19. PKG_CONFIG_DEPENDS:=\
  20. CONFIG_PACKAGE_libpcre2-16 \
  21. CONFIG_PACKAGE_libpcre2-32 \
  22. CONFIG_PCRE2_JIT_ENABLED
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/cmake.mk
  25. define Package/libpcre2/default
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. URL:=https://www.pcre.org/
  29. endef
  30. define Package/libpcre2/config
  31. source "$(SOURCE)/Config.in"
  32. endef
  33. define Package/libpcre2
  34. $(call Package/libpcre2/default)
  35. TITLE:=A Perl Compatible Regular Expression library
  36. endef
  37. define Package/libpcre2-16
  38. $(call Package/libpcre2/default)
  39. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  40. endef
  41. define Package/libpcre2-32
  42. $(call Package/libpcre2/default)
  43. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  44. endef
  45. CMAKE_OPTIONS += \
  46. -DBUILD_SHARED_LIBS=ON \
  47. -DPCRE2_BUILD_PCRE2_8=ON \
  48. -DPCRE2_BUILD_PCRE2_16=O$(if $(CONFIG_PACKAGE_libpcre2-16),N,FF) \
  49. -DPCRE2_BUILD_PCRE2_32=O$(if $(CONFIG_PACKAGE_libpcre2-32),N,FF) \
  50. -DPCRE2_DEBUG=OFF \
  51. -DPCRE2_DISABLE_PERCENT_ZT=ON \
  52. -DPCRE2_SUPPORT_JIT=O$(if $(CONFIG_PCRE2_JIT_ENABLED),N,FF) \
  53. -DPCRE2_SHOW_REPORT=OFF \
  54. -DPCRE2_BUILD_PCRE2GREP=OFF \
  55. -DPCRE2_BUILD_TESTS=OFF
  56. define Build/InstallDev
  57. $(call Build/InstallDev/cmake,$(1))
  58. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/pcre2-config
  59. $(INSTALL_DIR) $(2)/bin
  60. $(LN) ../../usr/bin/pcre2-config $(2)/bin/pcre2-config
  61. endef
  62. define Package/libpcre2/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
  65. endef
  66. define Package/libpcre2-16/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
  69. endef
  70. define Package/libpcre2-32/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
  73. endef
  74. $(eval $(call BuildPackage,libpcre2))
  75. $(eval $(call BuildPackage,libpcre2-16))
  76. $(eval $(call BuildPackage,libpcre2-32))