blob: 67fd7ce7e82995cdf34463c870aec066204f9153 (
plain)
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
51
52
53
54
55
56
57
58
59
|
# Contributor:
# Maintainer: Paul Morgan <jumanjiman@gmail.com>
pkgname=editorconfig
_pkgname=$pkgname-core-c
pkgver=0.12.3
_testname=editorconfig-core-test
_testver=0.12
pkgrel=0
pkgdesc="EditorConfig core library written in C (for use by plugins supporting EditorConfig parsing)"
url="https://github.com/editorconfig/editorconfig-core-c"
arch="all"
license="BSD-2-Clause"
makedepends="cmake pcre2-dev"
subpackages="lib$pkgname:libs $pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/editorconfig/$_pkgname/archive/v$pkgver.tar.gz
https://github.com/editorconfig/$_testname/archive/v${_testver}.tar.gz
disable-failing-test.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
prepare() {
# Tests are taken from a github release tarball so place them in the tree
rmdir tests
mv ../${_testname}-${_testver} tests
default_prepare
}
build() {
cmake . \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL="$CFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_DOCUMENTATION=False
make
}
check() {
make test
}
package() {
make install DESTDIR="$pkgdir"
# Remove symlink to editorconfig-$pkgver.
rm -f "$pkgdir/usr/bin/$pkgname"
mv -f "$pkgdir/usr/bin/$pkgname-$pkgver" "$pkgdir/usr/bin/$pkgname"
}
static() {
depends=""
pkgdesc="$pkgdesc (static library)"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}
sha512sums="4a17cd6317bd45f8b0131070165d852569d020f1cf74e72b44057b97672184b4992aee54aae6e3222c669fdce8bb6b1f3482235e6518acffcef05e1d74087e6e editorconfig-0.12.3.tar.gz
6a6334ad9de88062eab2de8c7dee60e45766cd2657cf41daf9fff6a3bc8ba3f9c9b9629d0c189d2127f6c8e615d0e8bd401e8e294f3f2c02cbd6fe452ca15e7c v0.12.tar.gz
dbbd15f1559cf3fd03d8cfbcd122276c2f054d373e4a1ac0a5c867768d9f5ae3847bffb64e7109d816ed1c1934968b88cd690bc9429be1876bcf69df2eb3e62d disable-failing-test.patch"
|