Skip to content

Commit

Permalink
main/inih: use pkgver to decide version used on pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
maxice8 committed Dec 13, 2020
1 parent 19f3b0a commit 4b7c29e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 24 deletions.
10 changes: 8 additions & 2 deletions main/inih/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Maintainer: Leo <[email protected]>
pkgname=inih
pkgver=52
pkgrel=0
pkgrel=1
pkgdesc="Simple .INI file parser for embedded systems"
options="!check" # No testsuite in Meson, unittests always return 0
url="https://github.com/benhoyt/inih"
Expand All @@ -20,6 +20,12 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/benhoyt/inih/archive/r$pkgve
"
builddir="$srcdir/inih-r$pkgver"

prepare() {
default_prepare

sed -i "s|@PKGVER@|$pkgver|" meson.build
}

build() {
abuild-meson \
-Ddefault_library=both \
Expand Down Expand Up @@ -61,4 +67,4 @@ _dev() {


sha512sums="14c0d0dbd78efc99bec8df12067107d130eef8b124e0616f7d83dc4e14530b57f0c8fcf0b8862d425b5a0b84d6c6a6bff7b3c852c9b2e2364ef56c8f64a1f339 inih-52.tar.gz
9123df4d2ed4b416c925ef7fd87278a10073e257eabf7c67724628d856100228eda4f80462556192ea08ed1b62ae7df891b34c1a0e0d907b22160065d8f341cf fix-pkgconfig-version.patch"
08ec7ae51fb4b4877c3c7f6900f54fc5b26f71d3d8a7c1a3818759c7c677b6d77870227a157d5884226b07e5de3c3e0ff1f6753836ec58dbf34fd2dcf9964970 fix-pkgconfig-version.patch"
32 changes: 10 additions & 22 deletions main/inih/fix-pkgconfig-version.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,28 @@
diff --git a/meson.build b/meson.build
index 4602326..f63a913 100644
index 4602326..9dd9f8f 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'
@@ -2,6 +2,7 @@ project('inih',
['c','cpp'],
default_options : ['default_library=static'],
license : 'BSD-3-Clause',
+ version : '@PKGVER@',
)

if distro_install
#### options ####
@@ -73,6 +74,7 @@ if distro_install
pkg.generate(lib_inih,
name : 'inih',
description : 'simple .INI file parser',
+ version : '0'
+ version : meson.project_version(),
)
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')
@@ -99,6 +101,7 @@ if get_option('with_INIReader')
pkg.generate(lib_INIReader,
name : 'INIReader',
description : 'simple .INI file parser for C++',
+ version : '0'
+ version : meson.project_version(),
)
endif

0 comments on commit 4b7c29e

Please sign in to comment.