2 # Copyright (C) 2018 Othmar Truniger
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_SOURCE_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=https
://codeload.github.com
/fmtlib
/$(PKG_SOURCE_NAME
)/tar.gz
/$(PKG_VERSION
)?
17 PKG_HASH
:=5dea48d1fcddc3ec571ce2058e13910a0d4a6bab4cc09a809d8b1dd1c88ae6f2
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_NAME
)-$(PKG_VERSION
)
20 PKG_MAINTAINER
:=Othmar Truniger
<github@truniger.ch
>
22 PKG_LICENSE_FILES
:=LICENSE.rst
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/cmake.mk
29 CMAKE_OPTIONS
+= -DBUILD_SHARED_LIBS
=ON
30 CMAKE_OPTIONS
+= -DFMT_DOC
=OFF
31 CMAKE_OPTIONS
+= -DFMT_TEST
=OFF
36 TITLE
:=Small
, safe and fast formatting library
37 URL
:=https
://github.com
/fmtlib
/fmt
41 define Package
/libfmt
/description
42 fmt is an open-source formatting library for C
++.
43 It can be used
as a safe alternative to printf or
as a fast alternative to IOStreams.
46 define Build
/InstallDev
47 $(call Build
/InstallDev
/cmake
,$(1))
48 $(SED
) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr
/lib
/pkgconfig
/fmt.
pc
49 $(SED
) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr
/lib
/pkgconfig
/fmt.
pc
52 define Package
/libfmt
/install
53 $(INSTALL_DIR
) $(1)/usr
/lib
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfmt.so
* $(1)/usr
/lib
/
57 $(eval
$(call BuildPackage
,libfmt
))