summaryrefslogtreecommitdiff
path: root/user/editorconfig-core-c/APKBUILD
blob: 710447c9d9f30a31e28e725ac231a2a3c6c3f153 (plain) (blame)
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
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=editorconfig-core-c
pkgver=0.12.6
pkgrel=0
pkgdesc="Core library for maintaining editor config between editors"
url="https://editorconfig.org/"
arch="all"
options="!check"  # tests not shipped???
license="BSD-2-Clause AND BSD-3-Clause AND BSD-1-Clause"
depends=""
makedepends="cmake doxygen pcre2-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="editorconfig-core-c-$pkgver.tar.gz::https://github.com/editorconfig/editorconfig-core-c/archive/v$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS} \
		.
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="7cf69ed48c0d28694fc1f54cd8ae89202a3f0a13b5302fd316f50d0f99a606f54af9709874f0da75ad11ab6f4cc36edacb4cd8639717d44842a309140be3a968  editorconfig-core-c-0.12.6.tar.gz"