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.

119 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  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:=pcre
  9. PKG_VERSION:=8.44
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  13. PKG_HASH:=19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  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_PACKAGE_libpcrecpp \
  22. CONFIG_PCRE_JIT_ENABLED
  23. include $(INCLUDE_DIR)/uclibc++.mk
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/libpcre/default
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. URL:=https://www.pcre.org/
  29. endef
  30. define Package/libpcre/config
  31. source "$(SOURCE)/Config.in"
  32. endef
  33. define Package/libpcre
  34. $(call Package/libpcre/default)
  35. TITLE:=A Perl Compatible Regular Expression library
  36. endef
  37. define Package/libpcre16
  38. $(call Package/libpcre/default)
  39. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  40. endef
  41. define Package/libpcre32
  42. $(call Package/libpcre/default)
  43. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  44. endef
  45. define Package/libpcrecpp
  46. $(call Package/libpcre/default)
  47. TITLE:=C++ wrapper for Perl Compatible Regular Expression library
  48. DEPENDS:=+libpcre $(CXX_DEPENDS)
  49. endef
  50. TARGET_CFLAGS += $(FPIC)
  51. CONFIGURE_ARGS += \
  52. --enable-utf8 \
  53. --enable-unicode-properties \
  54. --enable-pcre16 \
  55. --enable-pcre32 \
  56. $(if $(CONFIG_PCRE_JIT_ENABLED),--enable-jit,--disable-jit) \
  57. --with-match-limit-recursion=16000 \
  58. $(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp
  59. MAKE_FLAGS += \
  60. CFLAGS="$(TARGET_CFLAGS)"
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
  64. $(INSTALL_DIR) $(2)/bin
  65. $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
  70. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  72. endef
  73. define Package/libpcre/install
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
  77. endef
  78. define Package/libpcre16/install
  79. $(INSTALL_DIR) $(1)/usr/lib
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/
  81. endef
  82. define Package/libpcre32/install
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre32.so* $(1)/usr/lib/
  85. endef
  86. define Package/libpcrecpp/install
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
  89. endef
  90. $(eval $(call BuildPackage,libpcre))
  91. $(eval $(call BuildPackage,libpcre16))
  92. $(eval $(call BuildPackage,libpcre32))
  93. $(eval $(call BuildPackage,libpcrecpp))