* [Buildroot] [PATCH] Added fmt package
[not found] <Adding fmt package>
@ 2017-04-06 5:50 ` Sam
2017-04-06 6:52 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Sam @ 2017-04-06 5:50 UTC (permalink / raw)
To: buildroot
Signed-off-by: Sam <semenak94@mail.ru>
---
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
diff --git a/package/Config.in b/package/Config.in
index 71bd44a..6f3399f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/fmt/Config.in b/package/fmt/Config.in
new file mode 100755
index 0000000..9e085bc
--- /dev/null
+++ b/package/fmt/Config.in
@@ -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.
\ No newline at end of file
diff --git a/package/fmt/fmt.hash b/package/fmt/fmt.hash
new file mode 100755
index 0000000..e865da4
--- /dev/null
+++ b/package/fmt/fmt.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8 fmt-c03f55ec3a0511611fa7f0537f858544a0ed03bd.tar.gz
diff --git a/package/fmt/fmt.mk b/package/fmt/fmt.mk
new file mode 100755
index 0000000..20984d3
--- /dev/null
+++ b/package/fmt/fmt.mk
@@ -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))
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] Added fmt package
2017-04-06 5:50 ` [Buildroot] [PATCH] Added fmt package Sam
@ 2017-04-06 6:52 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-04-06 6:52 UTC (permalink / raw)
To: buildroot
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
On Thu, 6 Apr 2017 08:50:12 +0300, Sam wrote:
> Signed-off-by: Sam <semenak94@mail.ru>
Please use your real first name + last name for contributing.
> diff --git a/package/fmt/Config.in b/package/fmt/Config.in
> new file mode 100755
> index 0000000..9e085bc
> --- /dev/null
> +++ b/package/fmt/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_FMT
> + bool "fmt"
> +
Unneeded empty line.
> + 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.
> \ No newline at end of file
Please make sure you have a newline at the end of the file.
> diff --git a/package/fmt/fmt.mk b/package/fmt/fmt.mk
> new file mode 100755
> index 0000000..20984d3
> --- /dev/null
> +++ b/package/fmt/fmt.mk
> @@ -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.
> +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".
> +FMT_LICENSE_FILES = COPYING
I don't see any file named COPYING in https://github.com/fmtlib/fmt.
You should use LICENSE.rst.
> +FMT_DEPENDENCIES = host-cmake
Not needed, this dependency is automatically pulled in because it's a
cmake-package.
> +FMT_INSTALL_STAGING = YES
> +FMT_INSTALL_TARGET = NO
Add a comment above those lines to explain why.
> +FMT_CONF_OPTS += -DBUILD_SHARED_LIBS=ON
This most likely isn't correct when BR2_STATIC_LIBS=y.
> +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....
> +define FMT_INSTALL_STAGING_CMDS
> + rm -rf $(STAGING_DIR)/usr/include/fmt
Don't remove before installing, just overwrite.
> + 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-06 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Adding fmt package>
2017-04-06 5:50 ` [Buildroot] [PATCH] Added fmt package Sam
2017-04-06 6:52 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox