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.

97 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.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_CPE_ID:=cpe:/a:pcre:pcre
  18. PKG_FIXUP:=autoreconf
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libpcre2/default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. URL:=https://www.pcre.org/
  26. endef
  27. define Package/libpcre2
  28. $(call Package/libpcre2/default)
  29. TITLE:=A Perl Compatible Regular Expression library
  30. endef
  31. define Package/libpcre2-16
  32. $(call Package/libpcre2/default)
  33. TITLE:=A Perl Compatible Regular Expression library (16bit support)
  34. endef
  35. define Package/libpcre2-32
  36. $(call Package/libpcre2/default)
  37. TITLE:=A Perl Compatible Regular Expression library (32bit support)
  38. endef
  39. TARGET_CFLAGS += $(FPIC)
  40. CONFIGURE_ARGS += \
  41. --enable-pcre2-16 \
  42. --enable-pcre2-32
  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/pcre2-config $(1)/usr/bin/
  48. $(INSTALL_DIR) $(2)/bin
  49. $(LN) $(STAGING_DIR)/usr/bin/pcre2-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. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
  56. endef
  57. define Package/libpcre2/install
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-{8,posix}.so* $(1)/usr/lib/
  60. endef
  61. define Package/libpcre2-16/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-16.so* $(1)/usr/lib/
  64. endef
  65. define Package/libpcre2-32/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre2-32.so* $(1)/usr/lib/
  68. endef
  69. $(eval $(call BuildPackage,libpcre2))
  70. $(eval $(call BuildPackage,libpcre2-16))
  71. $(eval $(call BuildPackage,libpcre2-32))