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
:=1250e4cc58bf06ee631567523f48848dc4596133e163f02615c97f78bab6c811
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
23 PKG_CPE_ID
:=cpe
:/a
:fmt
:fmt
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/cmake.mk
30 CMAKE_OPTIONS
+= -DBUILD_SHARED_LIBS
=ON
31 CMAKE_OPTIONS
+= -DFMT_DOC
=OFF
32 CMAKE_OPTIONS
+= -DFMT_TEST
=OFF
37 TITLE
:=Small
, safe and fast formatting library
38 URL
:=https
://github.com
/fmtlib
/fmt
42 define Package
/libfmt
/description
43 fmt is an open-source formatting library for C
++.
44 It can be used
as a safe alternative to printf or
as a fast alternative to IOStreams.
47 define Build
/InstallDev
48 $(call Build
/InstallDev
/cmake
,$(1))
49 $(SED
) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr
/lib
/pkgconfig
/fmt.
pc
50 $(SED
) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr
/lib
/pkgconfig
/fmt.
pc
53 define Package
/libfmt
/install
54 $(INSTALL_DIR
) $(1)/usr
/lib
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfmt.so
* $(1)/usr
/lib
/
58 $(eval
$(call BuildPackage
,libfmt
))