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.

95 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2017 Shane Peelar
  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:=pcre2
  9. PKG_VERSION:=10.30
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  13. PKG_HASH:=90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db
  14. PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
  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/libpcre2/default
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. URL:=http://www.pcre.org/
  24. endef
  25. define Package/libpcre2
  26. $(call Package/libpcre2/default)
  27. TITLE:=A Perl Compatible Regular Expression library
  28. endef
  29. define Package/libpcre2-16
  30. $(call Package/libpcre2/default)
  31. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  32. endef
  33. define Package/libpcre2-32
  34. $(call Package/libpcre2/default)
  35. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  36. endef
  37. TARGET_CFLAGS += $(FPIC)
  38. CONFIGURE_ARGS += \
  39. --enable-pcre2-16 \
  40. --enable-pcre2-32
  41. MAKE_FLAGS += \
  42. CFLAGS="$(TARGET_CFLAGS)"
  43. define Build/InstallDev
  44. $(INSTALL_DIR) $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre2-config $(1)/usr/bin/
  46. $(INSTALL_DIR) $(2)/bin
  47. $(LN) $(STAGING_DIR)/usr/bin/pcre2-config $(2)/bin
  48. $(INSTALL_DIR) $(1)/usr/include
  49. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
  52. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  54. endef
  55. define Package/libpcre2/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
  58. endef
  59. define Package/libpcre2-16/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
  62. endef
  63. define Package/libpcre2-32/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
  66. endef
  67. $(eval $(call BuildPackage,libpcre2))
  68. $(eval $(call BuildPackage,libpcre2-16))
  69. $(eval $(call BuildPackage,libpcre2-32))