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.

102 lines
2.4 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:=1
  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)/package.mk
  20. define Package/libpcre/default
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. URL:=http://www.pcre.org/
  24. endef
  25. define Package/libpcre
  26. $(call Package/libpcre/default)
  27. TITLE:=A Perl Compatible Regular Expression library
  28. endef
  29. define Package/libpcre16
  30. $(call Package/libpcre/default)
  31. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  32. endef
  33. define Package/libpcrecpp
  34. $(call Package/libpcre/default)
  35. TITLE:=C++ wrapper for Perl Compatible Regular Expression library
  36. DEPENDS:=+libpcre +libstdcpp
  37. endef
  38. TARGET_CFLAGS += $(FPIC)
  39. CONFIGURE_ARGS += \
  40. --enable-utf8 \
  41. --enable-unicode-properties \
  42. --enable-pcre16 \
  43. --with-match-limit-recursion=16000 \
  44. ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
  45. CONFIGURE_ARGS+= --enable-cpp
  46. else
  47. CONFIGURE_ARGS+= --disable-cpp
  48. endif
  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/pcre-config $(1)/usr/bin/
  54. $(INSTALL_DIR) $(2)/bin
  55. $(LN) $(STAGING_DIR)/usr/bin/pcre-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/libpcre/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
  67. endef
  68. define Package/libpcre16/install
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/
  71. endef
  72. define Package/libpcrecpp/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
  75. endef
  76. $(eval $(call BuildPackage,libpcre))
  77. $(eval $(call BuildPackage,libpcre16))
  78. $(eval $(call BuildPackage,libpcrecpp))