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.

105 lines
2.5 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.34
  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:=74c473ffaba9e13db6951fd146e0143fe9887852ce73406a03277af1d9b798ca
  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_FIXUP:=autoreconf
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. PKG_CONFIG_DEPENDS:=\
  22. CONFIG_PCRE2_JIT_ENABLED
  23. include $(INCLUDE_DIR)/package.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. TARGET_CFLAGS += $(FPIC)
  45. CONFIGURE_ARGS += \
  46. --enable-pcre2-16 \
  47. --enable-pcre2-32 \
  48. $(if $(CONFIG_PCRE2_JIT_ENABLED),--enable-jit,--disable-jit)
  49. MAKE_FLAGS += \
  50. CFLAGS="$(TARGET_CFLAGS)"
  51. define Build/InstallDev
  52. $(INSTALL_DIR) $(1)/usr/bin
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre2-config $(1)/usr/bin/
  54. $(INSTALL_DIR) $(2)/bin
  55. $(LN) $(STAGING_DIR)/usr/bin/pcre2-config $(2)/bin
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
  60. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  62. endef
  63. define Package/libpcre2/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
  66. endef
  67. define Package/libpcre2-16/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
  70. endef
  71. define Package/libpcre2-32/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
  74. endef
  75. $(eval $(call BuildPackage,libpcre2))
  76. $(eval $(call BuildPackage,libpcre2-16))
  77. $(eval $(call BuildPackage,libpcre2-32))