aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-12-12 02:21:43 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-12-12 02:21:43 -0300
commitcf4d1ee9c75dd6e65d3cbbbd99c284a0b7d9b479 (patch)
treee132f5bf33a36106d7706406059fa29d2aee4d84
parentafc41e6503945e528940fa6db07799104d9a7c0f (diff)
downloadaports-cf4d1ee9c75dd6e65d3cbbbd99c284a0b7d9b479.tar.gz
aports-cf4d1ee9c75dd6e65d3cbbbd99c284a0b7d9b479.tar.bz2
aports-cf4d1ee9c75dd6e65d3cbbbd99c284a0b7d9b479.tar.xz
main/inih: new aport
https://github.com/benhoyt/inih Simple .INI file parser for embedded systems This is required for xfsprogs
-rw-r--r--main/inih/APKBUILD64
-rw-r--r--main/inih/fix-pkgconfig-version.patch40
2 files changed, 104 insertions, 0 deletions
diff --git a/main/inih/APKBUILD b/main/inih/APKBUILD
new file mode 100644
index 0000000000..a1c4a69ef7
--- /dev/null
+++ b/main/inih/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
+# Maintainer: Leo <thinkabit.ukim@gmail.com>
+pkgname=inih
+pkgver=52
+pkgrel=0
+pkgdesc="Simple .INI file parser for embedded systems"
+options="!check" # No testsuite in Meson, unittests always return 0
+url="https://github.com/benhoyt/inih"
+arch="all"
+license="BSD-3-Clause"
+makedepends="meson"
+checkdepends="bash"
+subpackages="
+ $pkgname-dev:_dev
+ $pkgname-inireader
+ $pkgname-inireader-dev
+ "
+source="$pkgname-$pkgver.tar.gz::https://github.com/benhoyt/inih/archive/r$pkgver.tar.gz
+ fix-pkgconfig-version.patch
+ "
+builddir="$srcdir/inih-r$pkgver"
+
+build() {
+ abuild-meson \
+ -Ddefault_library=both \
+ -Ddistro_install=true \
+ -Dwith_INIReader=true \
+ -Dmulti-line_entries=true \
+ -Dutf-8_bom=true \
+ -Dinline_comments=true \
+ -Duse_heap=false \
+ . output
+ meson compile -j 1 -C output
+}
+
+package() {
+ DESTDIR="$pkgdir" meson install --no-rebuild -C output
+}
+
+inireader() {
+ pkgdesc="C++ library and API for inih"
+ amove usr/lib/libINIReader.so.*
+}
+
+_dev() {
+ default_dev
+
+ # Move inireader stuff out, it will be caught later
+ mkdir -p "$pkgdir"/usr/lib/pkgconfig "$pkgdir"/usr/include
+
+ # Headers
+ mv "$subpkgdir"/usr/include/INIReader.h "$pkgdir"/usr/include
+
+ # Static and Shared libraries
+ mv "$subpkgdir"/usr/lib/libINIReader.so "$pkgdir"/usr/lib
+ mv "$subpkgdir"/usr/lib/libINIReader.a "$pkgdir"/usr/lib
+
+ # Pkgconfig
+ mv "$subpkgdir"/usr/lib/pkgconfig/INIReader.pc "$pkgdir"/usr/lib/pkgconfig
+}
+
+
+sha512sums="14c0d0dbd78efc99bec8df12067107d130eef8b124e0616f7d83dc4e14530b57f0c8fcf0b8862d425b5a0b84d6c6a6bff7b3c852c9b2e2364ef56c8f64a1f339 inih-52.tar.gz
+9123df4d2ed4b416c925ef7fd87278a10073e257eabf7c67724628d856100228eda4f80462556192ea08ed1b62ae7df891b34c1a0e0d907b22160065d8f341cf fix-pkgconfig-version.patch"
diff --git a/main/inih/fix-pkgconfig-version.patch b/main/inih/fix-pkgconfig-version.patch
new file mode 100644
index 0000000000..dbabe24a86
--- /dev/null
+++ b/main/inih/fix-pkgconfig-version.patch
@@ -0,0 +1,40 @@
+diff --git a/meson.build b/meson.build
+index 4602326..f63a913 100644
+--- a/meson.build
++++ b/meson.build
+@@ -64,7 +64,8 @@ lib_inih = library('inih',
+ include_directories : inc_inih,
+ c_args : arg_static,
+ install : distro_install,
+- soversion : '0'
++ soversion : '0',
++ version: '0'
+ )
+
+ if distro_install
+@@ -73,6 +74,7 @@ if distro_install
+ pkg.generate(lib_inih,
+ name : 'inih',
+ description : 'simple .INI file parser',
++ version : '0'
+ )
+ endif
+
+@@ -90,7 +92,8 @@ if get_option('with_INIReader')
+ include_directories : inc_INIReader,
+ dependencies : inih_dep,
+ install : distro_install,
+- soversion : '0'
++ soversion : '0',
++ version: '0'
+ )
+
+ if distro_install
+@@ -99,6 +102,7 @@ if get_option('with_INIReader')
+ pkg.generate(lib_INIReader,
+ name : 'INIReader',
+ description : 'simple .INI file parser for C++',
++ version : '0'
+ )
+ endif
+