-
Notifications
You must be signed in to change notification settings - Fork 1
/
inih.cygport
50 lines (42 loc) · 1.4 KB
/
inih.cygport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
inherit meson
NAME=inih
VERSION=57
RELEASE=1
CATEGORY=Libs
SUMMARY='Simple .ini file parser'
DESCRIPTION='inih (INI Not Invented Here) is a simple .INI file parser written in C'
HOMEPAGE='https://github.com/benhoyt/inih'
LICENSE="BSD-3-Clause"
# cf. https://www.cygwin.com/packaging-hint-files.html#pvr-src.hint
# https://spdx.org/licenses/BSD-3-Clause.html
SRC_URI="https://github.com/benhoyt/inih/archive/refs/tags/r${PV}/inih-r${PV}.tar.gz"
SRC_DIR="inih-r${PV}"
BUILD_REQUIRES=meson
PATCH_URI=r57-correct-version.patch
PKG_NAMES="libinih-devel libinih0"
libinih0_SUMMARY="${SUMMARY% *} (runtime)"
libinih0_CATEGORY="${CATEGORY}"
libinih0_CONTENTS="\
usr/bin/*-0.dll\
usr/share/\
"
libinih_devel_SUMMARY="${SUMMARY% *} (devel)"
libinih_devel_CATEGORY="Devel ${CATEGORY}"
libinih_devel_CONTENTS="\
usr/include/\
usr/lib/\
"
# Based on the upstream .github/workflows/tests.yml
src_test () {
cd ${S}/tests
./unittest.sh
cd ${S}/examples
./cpptest.sh
# The upstream code checks for changes by using `git diff`, which works
# because they're running the tests in a working copy. We can't do
# that, so we check by comparing the origsrc with the src directory
# instead.
diff -uNr "${origsrcdir}/${SRC_DIR}/tests" "${srcdir}/${SRC_DIR}/tests"
diff -uNr "${origsrcdir}/${SRC_DIR}/examples" "${srcdir}/${SRC_DIR}/examples"
}
# vim: set ft=bash noexpandtab tabstop=8 listchars=tab\:\ \ ,trail\:-,lead\:- :