Skip to contentSkip to conversation

libcorrect: add package

PATCH New Joel Carlson 2 participants 3 messages Oct 9, 2018 – Oct 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libcorrect: add package

Adds the libcorrect package. Libcorrect by default builds a shared library, so require shared libraries. It also sets the -Wpedantic flag in its Debug build, which first exists starting in gcc 4.8.

---

Compile-tested using utils/test-pkg -a

---
 DEVELOPERS                         |  1 +
 package/Config.in                  |  1 +
 package/libcorrect/Config.in       | 13 +++++++++++++
 package/libcorrect/libcorrect.hash |  3 +++
 package/libcorrect/libcorrect.mk   | 13 +++++++++++++
 5 files changed, 31 insertions(+)
 create mode 100644 package/libcorrect/Config.in
 create mode 100644 package/libcorrect/libcorrect.hash
 create mode 100644 package/libcorrect/libcorrect.mk
DEVELOPERS +1 -0
index 0fb3738e9a..0757ebfcf2 100644
@@ -1073,6 +1073,7 @@ N:	Joel Carlson <[email protected]>
 F:	package/capnproto/
 F:	package/cmocka/
 F:	package/flatcc/
+F:	package/libcorrect/
 
 N:	Joel Stanley <[email protected]>
 F:	package/pdbg/
package/Config.in +1 -0
index 29e11441f9..aae7855ec3 100644
@@ -1609,6 +1609,7 @@ menu "Other"
 	source "package/libcap-ng/Config.in"
 	source "package/libcgroup/Config.in"
 	source "package/libcofi/Config.in"
+	source "package/libcorrect/Config.in"
 	source "package/libcroco/Config.in"
 	source "package/libcrossguid/Config.in"
 	source "package/libcsv/Config.in"
package/libcorrect/Config.in new file +13 -0
new file mode 100644
index 0000000000..e29b39caa0
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LIBCORRECT
+	bool "libcorrect"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # -Wpedantic first appears
+	depends on !BR2_STATIC_LIBS
+	help
+	  A C library for Forward Error Correction, providing
+	  convolutional codes and Reed-Solomon codes. It is part
+	  of the Quiet Modem Project.
+
+	  https://github.com/quiet/libcorrect
+
+comment "libcorrect needs a toolchain w/ gcc >= 4.8, dynamic library"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS
package/libcorrect/libcorrect.hash new file +3 -0
new file mode 100644
index 0000000000..20df38c158
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256	79861750540fb3a1cc501ee217cb4d1febc4855f3fb82e5eb60906eec5379890  libcorrect-ce6c17f1f988765ae3695315d7cce1f2a2e6cf0d.tar.gz
+sha256	135138cd4304aa637836758dc5edfb5f21b7d09ecc637d25288d206b151a5768  LICENSE
package/libcorrect/libcorrect.mk new file +13 -0
new file mode 100644
index 0000000000..0a84aa5c26
@@ -0,0 +1,13 @@
+################################################################################
+#
+# libcorrect
+#
+################################################################################
+
+LIBCORRECT_VERSION = ce6c17f1f988765ae3695315d7cce1f2a2e6cf0d
+LIBCORRECT_SITE = $(call github,quiet,libcorrect,$(LIBCORRECT_VERSION))
+LIBCORRECT_LICENSE = BSD-3-Clause
+LIBCORRECT_LICENSE_FILES = LICENSE
+LIBCORRECT_INSTALL_STAGING = YES
+
+$(eval $(cmake-package))
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 libcorrect: add package

Hello,

Quoted 6 lines · Joel Carlson

Adds the libcorrect package. Libcorrect by default builds a shared library, so require shared libraries. It also sets the -Wpedantic flag in its Debug build, which first exists starting in gcc 4.8.

---

After looking quickly at it, I decided to add a patch that uses -Wpedantic only if available, which allows to drop the dependency on the gcc version. The patch was submitted upstream.

Applied with this change. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 libcorrect: add package

Quoted 11 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · Joel Carlson

Adds the libcorrect package. Libcorrect by default builds a shared library, so require shared libraries. It also sets the -Wpedantic flag in its Debug build, which first exists starting in gcc 4.8.

---

Quoted 7 lines

After looking quickly at it, I decided to add a patch that uses -Wpedantic only if available, which allows to drop the dependency on the gcc version. The patch was submitted upstream.

Applied with this change. Thanks!

Thomas

Thank you for adding that patch/submitting it upstream. I had already made some other changes and took the lazy route of just excluding the older toolchains instead of trying to fix that as well. -Joel