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.

100 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_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_libpcrecpp
  20. include $(INCLUDE_DIR)/uclibc++.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libpcre/default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. URL:=https://www.pcre.org/
  26. endef
  27. define Package/libpcre
  28. $(call Package/libpcre/default)
  29. TITLE:=A Perl Compatible Regular Expression library
  30. endef
  31. define Package/libpcre16
  32. $(call Package/libpcre/default)
  33. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  34. endef
  35. define Package/libpcrecpp
  36. $(call Package/libpcre/default)
  37. TITLE:=C++ wrapper for Perl Compatible Regular Expression library
  38. DEPENDS:=+libpcre $(CXX_DEPENDS)
  39. endef
  40. TARGET_CFLAGS += $(FPIC)
  41. CONFIGURE_ARGS += \
  42. --enable-utf8 \
  43. --enable-unicode-properties \
  44. --enable-pcre16 \
  45. --with-match-limit-recursion=16000 \
  46. $(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp
  47. MAKE_FLAGS += \
  48. CFLAGS="$(TARGET_CFLAGS)"
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
  52. $(INSTALL_DIR) $(2)/bin
  53. $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
  54. $(INSTALL_DIR) $(1)/usr/include
  55. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  60. endef
  61. define Package/libpcre/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
  65. endef
  66. define Package/libpcre16/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/
  69. endef
  70. define Package/libpcrecpp/install
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
  73. endef
  74. $(eval $(call BuildPackage,libpcre))
  75. $(eval $(call BuildPackage,libpcre16))
  76. $(eval $(call BuildPackage,libpcrecpp))