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.

92 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2006-2011 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.35
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/pcre
  13. PKG_MD5SUM:=6aacb23986adccd9b3bc626c00979958
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  15. PKG_LICENSE:=BSD-3c
  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/libpcrecpp
  30. $(call Package/libpcre/default)
  31. TITLE:=C++ wrapper for Perl Compatible Regular Expression library
  32. DEPENDS:=+libpcre +libstdcpp
  33. endef
  34. TARGET_CFLAGS += $(FPIC)
  35. CONFIGURE_ARGS += \
  36. --enable-utf8 \
  37. --enable-unicode-properties \
  38. ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
  39. CONFIGURE_ARGS+= --enable-cpp
  40. else
  41. CONFIGURE_ARGS+= --disable-cpp
  42. endif
  43. MAKE_FLAGS += \
  44. CFLAGS="$(TARGET_CFLAGS)"
  45. define Build/InstallDev
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
  48. $(INSTALL_DIR) $(2)/bin
  49. $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
  50. $(INSTALL_DIR) $(1)/usr/include
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib//
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
  55. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  57. endef
  58. define Package/libpcre/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
  62. endef
  63. define Package/libpcrecpp/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
  66. endef
  67. $(eval $(call BuildPackage,libpcre))
  68. $(eval $(call BuildPackage,libpcrecpp))