Added fmt package
PATCH 1/1 Added fmt package
--- package/Config.in | 1 + package/fmt/Config.in | 6 ++++++ package/fmt/fmt.hash | 2 ++ package/fmt/fmt.mk | 28 ++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100755 package/fmt/Config.in create mode 100755 package/fmt/fmt.hash create mode 100755 package/fmt/fmt.mk
package/Config.in +1 -0
@@ -1434,6 +1434,7 @@ menu "Text and terminal handling" source "package/augeas/Config.in" source "package/enchant/Config.in" source "package/icu/Config.in" + source "package/fmt/Config.in" source "package/libcli/Config.in" source "package/libedit/Config.in" source "package/libenca/Config.in"
package/fmt/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_FMT + bool "fmt" + + help + fmt is an open-source formatting library for C++. It can be used + as a safe alternative to printf or as a fast alternative to IOStreams.
package/fmt/fmt.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8 fmt-c03f55ec3a0511611fa7f0537f858544a0ed03bd.tar.gz
package/fmt/fmt.mk new file +28 -0
@@ -0,0 +1,28 @@ +################################################################################ +# +# fmt +# +################################################################################ + +FMT_VERSION = 3.0.1 +FMT_SITE = git at github.com:fmtlib/fmt.git +FMT_SITE_METHOD = git +FMT_LICENSE = GPLv2 +FMT_LICENSE_FILES = COPYING +FMT_DEPENDENCIES = host-cmake +FMT_INSTALL_STAGING = YES +FMT_INSTALL_TARGET = NO + +FMT_CONF_OPTS += -DBUILD_SHARED_LIBS=ON +FMT_CONF_OPTS += -DHAVE_OPEN=ON +FMT_CONF_OPTS += -DFMT_INSTALL=ON +FMT_CONF_OPTS += -DFMT_TEST=OFF + +define FMT_INSTALL_STAGING_CMDS + rm -rf $(STAGING_DIR)/usr/include/fmt + mkdir -p $(STAGING_DIR)/usr/include/fmt + $(INSTALL) -D $(@D)/fmt/*.h $(STAGING_DIR)/usr/include/fmt + $(INSTALL) -D $(@D)/fmt/*.cc $(STAGING_DIR)/usr/include/fmt +endef + +$(eval $(cmake-package))
Signature · 1 line
2.7.4
PATCH 1/1 Added fmt package
Hello,
Thanks a lot for your contribution, and for resubmiting on the mailing list rather than as a Github pull request!
First of all, the title of the commit should be:
fmt: new package
Quoted 1 line · Sam
Signed-off-by Sam <[email protected]>
Please use your real first name + last name for contributing.
package/fmt/Config.in line 3
Quoted 9 lines
package/fmt/Config.in new file +3
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_FMT + bool "fmt" +
Unneeded empty line.
package/fmt/Config.in line 6
Quoted 3 lines
package/fmt/Config.in new file +3
-0+ help + fmt is an open-source formatting library for C++. It can be used + as a safe alternative to printf or as a fast alternative to IOStreams.
Indentation for help should be one tab + two spaces. Also please wrap at 72 characters.
Quoted 1 line
\ No newline at end of file
Please make sure you have a newline at the end of the file.
Quoted 6 lines
package/fmt/fmt.mk new file +0
-0
package/fmt/fmt.mk line 9
Quoted 9 lines
package/fmt/fmt.mk new file +9
-0@@ -0,0 +1,28 @@ +################################################################################ +# +# fmt +# +################################################################################ + +FMT_VERSION = 3.0.1 +FMT_SITE = git at github.com:fmtlib/fmt.git +FMT_SITE_METHOD = git
Please use the Github helper.
package/fmt/fmt.mk line 10
Quoted 1 line
package/fmt/fmt.mk new file +1
-0+FMT_LICENSE = GPLv2
Have you actually looked at the license of this package? According to
https://github.com/fmtlib/fmt/blob/master/LICENSE.rst, it's clearly not GPLv2, but a BSD 2 Clause. So this variable should be " BSD-2-Clause".
package/fmt/fmt.mk line 11
Quoted 1 line
package/fmt/fmt.mk new file +1
-0+FMT_LICENSE_FILES = COPYING
I don't see any file named COPYING in https://github.com/fmtlib/fmt.
You should use LICENSE.rst.
package/fmt/fmt.mk line 12
Quoted 1 line
package/fmt/fmt.mk new file +1
-0+FMT_DEPENDENCIES = host-cmake
Not needed, this dependency is automatically pulled in because it's a cmake-package.
package/fmt/fmt.mk line 14
Quoted 2 lines
package/fmt/fmt.mk new file +2
-0+FMT_INSTALL_STAGING = YES +FMT_INSTALL_TARGET = NO
Add a comment above those lines to explain why.
package/fmt/fmt.mk line 16
Quoted 1 line
package/fmt/fmt.mk new file +1
-0+FMT_CONF_OPTS += -DBUILD_SHARED_LIBS=ON
This most likely isn't correct when BR2_STATIC_LIBS=y.
package/fmt/fmt.mk line 19
Quoted 3 lines
package/fmt/fmt.mk new file +3
-0+FMT_CONF_OPTS += -DHAVE_OPEN=ON +FMT_CONF_OPTS += -DFMT_INSTALL=ON +FMT_CONF_OPTS += -DFMT_TEST=OFF
Please do all of this on one line:
FMT_CONF_OPTS = \ -D.... \ -D.... \ -D....
package/fmt/fmt.mk line 22
Quoted 2 lines
package/fmt/fmt.mk new file +2
-0+define FMT_INSTALL_STAGING_CMDS + rm -rf $(STAGING_DIR)/usr/include/fmt
Don't remove before installing, just overwrite.
package/fmt/fmt.mk line 25
Quoted 3 lines
package/fmt/fmt.mk new file +3
-0+ mkdir -p $(STAGING_DIR)/usr/include/fmt + $(INSTALL) -D $(@D)/fmt/*.h $(STAGING_DIR)/usr/include/fmt + $(INSTALL) -D $(@D)/fmt/*.cc $(STAGING_DIR)/usr/include/fmt
Use "cp -dpfr" to do such copies. Two questions however:
1. Why are you installing .cc source files?
2. Why aren't you using the installation logic provided by CMake ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com