Skip to contentSkip to conversation

package/ft8_lib: new package

PATCH New jmfriedt 2 participants 2 messages Jan 12, 2021 – Jan 23, 2021

lore
Share & tools
lore

jmfriedt

author
#0 lore raw

PATCH 1/1 package/ft8_lib: new package

From: jfriedt <[email protected]>

A C++ implementation of FT8 protocol, mostly intended for experimental use on microcontrollers.

---
 DEVELOPERS                   |  3 +++
 package/Config.in            |  1 +
 package/ft8_lib/Config.in    |  7 +++++++
 package/ft8_lib/ft8_lib.hash |  4 ++++
 package/ft8_lib/ft8_lib.mk   | 27 +++++++++++++++++++++++++++
 5 files changed, 42 insertions(+)
 create mode 100644 package/ft8_lib/Config.in
 create mode 100644 package/ft8_lib/ft8_lib.hash
 create mode 100644 package/ft8_lib/ft8_lib.mk
DEVELOPERS +3 -0
index 05b509c9c4..2e1f423fbe 100644
@@ -1241,6 +1241,9 @@ F:	package/librtlsdr/
 N:	Jean Burgat <[email protected]>
 F:	package/openfpgaloader/
 
+N:	Jean-Michel Friedt <[email protected]>
+F:	package/ft8_lib/
+
 N:	Jens Kleintje <[email protected]>
 F:	package/gcnano-binaries/
 
package/Config.in +1 -0
index 5a16814ca8..526335b80d 100644
@@ -1866,6 +1866,7 @@ menu "Other"
 	source "package/flann/Config.in"
 	source "package/flatbuffers/Config.in"
 	source "package/flatcc/Config.in"
+	source "package/ft8_lib/Config.in"
 	source "package/gconf/Config.in"
 	source "package/gflags/Config.in"
 	source "package/gli/Config.in"
package/ft8_lib/Config.in new file +7 -0
new file mode 100644
index 0000000000..b0e449789b
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FT8_LIB
+	bool "ft8_lib"
+	help
+	  A C++ implementation of FT8 protocol, mostly intended for
+	  experimental use on microcontrollers.
+
+	  https://github.com/kgoba/ft8_lib
package/ft8_lib/ft8_lib.hash new file +4 -0
new file mode 100644
index 0000000000..52b0df7aac
@@ -0,0 +1,4 @@
+# Locally calculated after checking pgp signature
+sha256  0b9a575eded512eca39e4118697dfbb38f2666e7070504e65f5e05e31fffed4f  ft8_lib-c6d79b961cd5425ede48ba5e5f3c279d0932c806.tar.gz
+# License files, locally calculated
+sha256  4c816505e73feef31f1ffafcf70d51e2aae65a88296e77d6c37715f31ce63230  LICENSE
package/ft8_lib/ft8_lib.mk new file +27 -0
new file mode 100644
index 0000000000..5c0c2d5d25
@@ -0,0 +1,27 @@
+################################################################################
+#
+# ft8_lib
+#
+################################################################################
+
+FT8_LIB_VERSION = c6d79b961cd5425ede48ba5e5f3c279d0932c806
+FT8_LIB_SITE = $(call github,kgoba,ft8_lib,$(FT8_LIB_VERSION))
+
+FT8_LIB_INSTALL_STAGING = YES
+FT8_LIB_LICENSE = MIT
+FT8_LIB_LICENSE_FILES = LICENSE
+
+define FT8_LIB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
+	$(TARGET_AR) rc $(@D)/libft8.a $(@D)/ft8/constants.o $(@D)/ft8/encode.o $(@D)/ft8/pack.o \
+		$(@D)/ft8/text.o $(@D)/common/wave.o
+endef
+
+define FT8_LIB_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/libft8.a $(STAGING_DIR)/usr/lib/libft8.a
+	mkdir -p $(STAGING_DIR)/usr/include/ft8
+	$(INSTALL) -D -m 0755 $(@D)/ft8/*.h $(STAGING_DIR)/usr/include/ft8/
+	$(INSTALL) -D -m 0755 $(@D)/common/wave.h $(STAGING_DIR)/usr/include/ft8/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.30.0
#1 lore raw

PATCH 1/1 package/ft8_lib: new package

Jean-Michel, All,

On 2021-01-12 14:44 +0100, jmfriedt spake thusly:

Quoted 1 line

From: jfriedt <[email protected]>

Please use your "Real Name" as author, not your "username"; I'd guess that would be:

Jean-Michel Friedt <[email protected]>

Quoted 4 lines

A C++ implementation of FT8 protocol, mostly intended for experimental use on microcontrollers.

Ditto, use your Real Name.

[--SNIP--]

package/ft8_lib/Config.in line 2

Quoted 8 lines
package/ft8_lib/Config.in new file +2 -0
new file mode 100644
index 0000000000..b0e449789b
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FT8_LIB
+	bool "ft8_lib"

It's a C++ library; it should: depends on BR2_INSTALL_LIBSTDCPP

package/ft8_lib/Config.in line 7

Quoted 5 lines
package/ft8_lib/Config.in new file +5 -0
+	help
+	  A C++ implementation of FT8 protocol, mostly intended for
+	  experimental use on microcontrollers.
+
+	  https://github.com/kgoba/ft8_lib

... and so a comment should be added:

comment "ft8_lib needs a toolchain w/ C++"
depends on !BR2_INSTALL_LIBSTDCPP

Also, I see that this only installs a static library, so it should:
depends on !BR2_SHARED_LIBS

See:

https://buildroot.org/downloads/manual/manual.html#depends-on-vs-select

Quoted 23 lines
package/ft8_lib/ft8_lib.hash new file +4 -0
new file mode 100644
index 0000000000..52b0df7aac
@@ -0,0 +1,4 @@
+# Locally calculated after checking pgp signature
+sha256  0b9a575eded512eca39e4118697dfbb38f2666e7070504e65f5e05e31fffed4f  ft8_lib-c6d79b961cd5425ede48ba5e5f3c279d0932c806.tar.gz
+# License files, locally calculated
+sha256  4c816505e73feef31f1ffafcf70d51e2aae65a88296e77d6c37715f31ce63230  LICENSE
package/ft8_lib/ft8_lib.mk new file +7 -0
new file mode 100644
index 0000000000..5c0c2d5d25
@@ -0,0 +1,27 @@
+################################################################################
+#
+# ft8_lib
+#
+################################################################################
+
+FT8_LIB_VERSION = c6d79b961cd5425ede48ba5e5f3c279d0932c806

package/ft8_lib/ft8_lib.mk line 17

Quoted 10 lines
package/ft8_lib/ft8_lib.mk new file +10 -0
+FT8_LIB_SITE = $(call github,kgoba,ft8_lib,$(FT8_LIB_VERSION))
+
+FT8_LIB_INSTALL_STAGING = YES
+FT8_LIB_LICENSE = MIT
+FT8_LIB_LICENSE_FILES = LICENSE
+
+define FT8_LIB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
+	$(TARGET_AR) rc $(@D)/libft8.a $(@D)/ft8/constants.o $(@D)/ft8/encode.o $(@D)/ft8/pack.o \
+		$(@D)/ft8/text.o $(@D)/common/wave.o

Direct calls to TARGET_AR are not something we see everyday, so maybe a little blurb in the commit log would be in order to explain why this is needed...

package/ft8_lib/ft8_lib.mk line 21

Quoted 4 lines
package/ft8_lib/ft8_lib.mk new file +4 -0
+endef
+
+define FT8_LIB_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/libft8.a $(STAGING_DIR)/usr/lib/libft8.a

A static library should proably be 0644, not 0755 (it does not need to be executable!)

package/ft8_lib/ft8_lib.mk line 22

Quoted 1 line
package/ft8_lib/ft8_lib.mk new file +1 -0
+	mkdir -p $(STAGING_DIR)/usr/include/ft8

Just for consistence, use INSTALL to also create the directory:

    $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/ft8

package/ft8_lib/ft8_lib.mk line 24

Quoted 2 lines
package/ft8_lib/ft8_lib.mk new file +2 -0
+	$(INSTALL) -D -m 0755 $(@D)/ft8/*.h $(STAGING_DIR)/usr/include/ft8/
+	$(INSTALL) -D -m 0755 $(@D)/common/wave.h $(STAGING_DIR)/usr/include/ft8/

When INSTALLing multiple files with a glob, the -D option is not needed, (and does not make sense).

Also, headers should 0644, not 0755 (they don't need to be executable!)

Regards,
Yann E. MORIN.

Quoted 10 lines
package/ft8_lib/ft8_lib.mk new file +3 -0
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
2.30.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'