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