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.

63 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2018 Othmar Truniger
  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:=libfmt
  9. PKG_VERSION:=5.1.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/fmtlib/fmt.git
  13. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_MIRROR_HASH:=458debd5a0fbfdc36715ce63a0c1b1be84140ee9fbe28232a27c90448630469c
  17. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  18. PKG_LICENSE:=BSD-2-Clause
  19. PKG_LICENSE_FILES:=LICENSE.rst
  20. CMAKE_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON
  24. CMAKE_OPTIONS += -DFMT_DOC=OFF
  25. CMAKE_OPTIONS += -DFMT_TEST=OFF
  26. define Package/libfmt
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE:=Small, safe and fast formatting library
  30. URL:=https://github.com/fmtlib/fmt
  31. DEPENDS:=+libstdcpp
  32. endef
  33. define Package/libfmt/description
  34. fmt is an open-source formatting library for C++.
  35. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.
  36. endef
  37. define Package/libfmt/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/
  40. endef
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(1)/usr/include/fmt
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/fmt/*.h $(1)/usr/include/fmt/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/
  46. $(INSTALL_DIR) $(1)/usr/lib/cmake
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/* $(1)/usr/lib/cmake/
  48. endef
  49. $(eval $(call BuildPackage,libfmt))