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.

103 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.35
  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:=9ccba8e02b0ce78046cdfb52e5c177f0f445e421059e43becca4359c669d4613
  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_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_CONFIG_DEPENDS:=\
  21. CONFIG_PCRE2_JIT_ENABLED
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libpcre2/default
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. URL:=https://www.pcre.org/
  27. endef
  28. define Package/libpcre2/config
  29. source "$(SOURCE)/Config.in"
  30. endef
  31. define Package/libpcre2
  32. $(call Package/libpcre2/default)
  33. TITLE:=A Perl Compatible Regular Expression library
  34. endef
  35. define Package/libpcre2-16
  36. $(call Package/libpcre2/default)
  37. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  38. endef
  39. define Package/libpcre2-32
  40. $(call Package/libpcre2/default)
  41. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  42. endef
  43. TARGET_CFLAGS += $(FPIC)
  44. CONFIGURE_ARGS += \
  45. --enable-pcre2-16 \
  46. --enable-pcre2-32 \
  47. $(if $(CONFIG_PCRE2_JIT_ENABLED),--enable-jit,--disable-jit)
  48. MAKE_FLAGS += \
  49. CFLAGS="$(TARGET_CFLAGS)"
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/bin
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre2-config $(1)/usr/bin/
  53. $(INSTALL_DIR) $(2)/bin
  54. $(LN) $(STAGING_DIR)/usr/bin/pcre2-config $(2)/bin
  55. $(INSTALL_DIR) $(1)/usr/include
  56. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
  59. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  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))