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.

101 lines
2.5 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.43
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  13. PKG_HASH:=91e762520003013834ac1adb4a938d53b22a216341c061b0cf05603b290faf6b
  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_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_libpcrecpp
  21. include $(INCLUDE_DIR)/uclibc++.mk
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libpcre/default
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. URL:=https://www.pcre.org/
  27. endef
  28. define Package/libpcre
  29. $(call Package/libpcre/default)
  30. TITLE:=A Perl Compatible Regular Expression library
  31. endef
  32. define Package/libpcre16
  33. $(call Package/libpcre/default)
  34. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  35. endef
  36. define Package/libpcrecpp
  37. $(call Package/libpcre/default)
  38. TITLE:=C++ wrapper for Perl Compatible Regular Expression library
  39. DEPENDS:=+libpcre $(CXX_DEPENDS)
  40. endef
  41. TARGET_CFLAGS += $(FPIC)
  42. CONFIGURE_ARGS += \
  43. --enable-utf8 \
  44. --enable-unicode-properties \
  45. --enable-pcre16 \
  46. --with-match-limit-recursion=16000 \
  47. $(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp
  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/pcre-config $(1)/usr/bin/
  53. $(INSTALL_DIR) $(2)/bin
  54. $(LN) $(STAGING_DIR)/usr/bin/pcre-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/libpcre/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
  66. endef
  67. define Package/libpcre16/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/
  70. endef
  71. define Package/libpcrecpp/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
  74. endef
  75. $(eval $(call BuildPackage,libpcre))
  76. $(eval $(call BuildPackage,libpcre16))
  77. $(eval $(call BuildPackage,libpcrecpp))