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.

96 lines
2.3 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.23
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
  13. PKG_MD5SUM:=b2cd00ca7e24049040099b0a46bb3649
  14. PKG_HASH:=dfc79b918771f02d33968bd34a749ad7487fa1014aeb787fad29dd392b78c56e
  15. PKG_MAINTAINER:=Shane Peelar <lookatyouhacker@gmail.com>
  16. PKG_LICENSE:=BSD-3-Clause
  17. PKG_LICENSE_FILES:=LICENCE
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libpcre2/default
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. URL:=http://www.pcre.org/
  25. endef
  26. define Package/libpcre2
  27. $(call Package/libpcre2/default)
  28. TITLE:=A Perl Compatible Regular Expression library
  29. endef
  30. define Package/libpcre2-16
  31. $(call Package/libpcre2/default)
  32. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  33. endef
  34. define Package/libpcre2-32
  35. $(call Package/libpcre2/default)
  36. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  37. endef
  38. TARGET_CFLAGS += $(FPIC)
  39. CONFIGURE_ARGS += \
  40. --enable-pcre2-16 \
  41. --enable-pcre2-32
  42. MAKE_FLAGS += \
  43. CFLAGS="$(TARGET_CFLAGS)"
  44. define Build/InstallDev
  45. $(INSTALL_DIR) $(1)/usr/bin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre2-config $(1)/usr/bin/
  47. $(INSTALL_DIR) $(2)/bin
  48. $(LN) $(STAGING_DIR)/usr/bin/pcre2-config $(2)/bin
  49. $(INSTALL_DIR) $(1)/usr/include
  50. $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
  53. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  55. endef
  56. define Package/libpcre2/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
  59. endef
  60. define Package/libpcre2-16/install
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
  63. endef
  64. define Package/libpcre2-32/install
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
  67. endef
  68. $(eval $(call BuildPackage,libpcre2))
  69. $(eval $(call BuildPackage,libpcre2-16))
  70. $(eval $(call BuildPackage,libpcre2-32))