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.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.32
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
  13. PKG_HASH:=f29e89cc5de813f45786580101aaee3984a65818631d4ddbda7b32f699b87c2e
  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_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libpcre2/default
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. URL:=https://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))