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.

57 lines
1.5 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:=7.1.3
  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:=5cae7072042b3043e12d53d50ef404bbb76949dad1de368d7f993a15c8c05ecc
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
  16. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  17. PKG_LICENSE:=MIT
  18. PKG_LICENSE_FILES:=LICENSE.rst
  19. CMAKE_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include ../../devel/ninja/ninja-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 Build/InstallDev
  37. $(call Build/InstallDev/cmake,$(1))
  38. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fmt.pc
  39. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fmt.pc
  40. endef
  41. define Package/libfmt/install
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfmt.so* $(1)/usr/lib/
  44. endef
  45. $(eval $(call BuildPackage,libfmt))