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.

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