package/inih: new package
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 10 Jan 2021 21:24:50 +0000 (22:24 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Mon, 25 Jan 2021 21:56:45 +0000 (22:56 +0100)
needed for xfsprogs >= 5.10.0:
https://www.spinics.net/lists/linux-xfs/msg47554.html

Added upstream patch to avoid dependency for c++.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[yann.morin.1998@free.fr: license is BSD-3-Clause, not BSD]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
DEVELOPERS
package/Config.in
package/inih/0001-meson-optionally-depend-on-c.patch [new file with mode: 0644]
package/inih/Config.in [new file with mode: 0644]
package/inih/inih.hash [new file with mode: 0644]
package/inih/inih.mk [new file with mode: 0644]

index 4142406b023b74534ff09e305784c40d22290329..c7501056236cddd0b94cd4091d9536e5bb696227 100644 (file)
@@ -332,6 +332,7 @@ F:  package/gli/
 F:     package/glmark2/
 F:     package/gpsd/
 F:     package/hdparm/
+F:     package/inih/
 F:     package/jsoncpp/
 F:     package/kodi*
 F:     package/lame/
index 8ff03635b0b6230f2bd87fc129b207b28de4248b..06dfc32cc6ab2149175653890ca8a8c0fb259c44 100644 (file)
@@ -1982,6 +1982,7 @@ menu "Text and terminal handling"
        source "package/fmt/Config.in"
        source "package/fstrcmp/Config.in"
        source "package/icu/Config.in"
+       source "package/inih/Config.in"
        source "package/libcli/Config.in"
        source "package/libedit/Config.in"
        source "package/libenca/Config.in"
diff --git a/package/inih/0001-meson-optionally-depend-on-c.patch b/package/inih/0001-meson-optionally-depend-on-c.patch
new file mode 100644 (file)
index 0000000..a039dde
--- /dev/null
@@ -0,0 +1,34 @@
+From e192e4762749cfe3bc350e0353aa82b1a849256d Mon Sep 17 00:00:00 2001
+From: bkuhls <bkuhls@users.noreply.github.com>
+Date: Sun, 10 Jan 2021 21:56:56 +0100
+Subject: [PATCH] meson: optionally depend on c++ (#124)
+
+This fix is needed to allow building with toolchains which lack c++.
+
+Downloaded from upstream commit:
+https://github.com/benhoyt/inih/commit/e192e4762749cfe3bc350e0353aa82b1a849256d
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4602326..5393af4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,5 +1,5 @@
+ project('inih',
+-    ['c','cpp'],
++    ['c'],
+     default_options : ['default_library=static'],
+     license : 'BSD-3-Clause',
+ )
+@@ -83,6 +83,7 @@ inih_dep = declare_dependency(
+ #### INIReader ####
+ if get_option('with_INIReader')
++    add_languages('cpp')
+     inc_INIReader = include_directories('cpp')
+     lib_INIReader = library('INIReader',
diff --git a/package/inih/Config.in b/package/inih/Config.in
new file mode 100644 (file)
index 0000000..2c6553a
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_INIH
+       bool "inih"
+       help
+         inih (INI Not Invented Here) is a simple .INI file parser
+         written in C.
+
+         https://github.com/benhoyt/inih/
diff --git a/package/inih/inih.hash b/package/inih/inih.hash
new file mode 100644 (file)
index 0000000..2560a91
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  439cff9ce9a8afc52d08772ac3e93b3cecd79c7707f871fb4534fb3a48201880  inih-52.tar.gz
+sha256  9ae3b39e83e9158e44b67733baa3bb2d84e80efdcfb14a5820210a42c7abdf7f  LICENSE.txt
diff --git a/package/inih/inih.mk b/package/inih/inih.mk
new file mode 100644 (file)
index 0000000..ccc549b
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#
+# INIH
+#
+################################################################################
+
+INIH_VERSION = 52
+INIH_SITE = $(call github,benhoyt,inih,r$(INIH_VERSION))
+INIH_INSTALL_STAGING = YES
+INIH_LICENSE = BSD-3-Clause
+INIH_LICENSE_FILES = LICENSE.txt
+INIH_CONF_OPTS = -Ddistro_install=true
+
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+INIH_CONF_OPTS += -Dwith_INIReader=true
+else
+INIH_CONF_OPTS += -Dwith_INIReader=false
+endif
+
+$(eval $(meson-package))