blob: 10d39643a5a349502a204bf0b6c42a60c4c4b728 (
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
|
# Contributor: omni <omni+alpine@hack.org>
# Maintainer: Paul Morgan <jumanjiman@gmail.com>
pkgname=editorconfig
_pkgname=$pkgname-core-c
pkgver=0.12.5
_testname=editorconfig-core-test
_testver=0.13
pkgrel=1
pkgdesc="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 samurai"
subpackages="lib$pkgname:libs $pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/editorconfig/$_pkgname/archive/v$pkgver.tar.gz
$_testname-$_testver.tar.gz::https://github.com/editorconfig/$_testname/archive/v$_testver.tar.gz
use-compiled-binary.patch
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 -B build -G Ninja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_DOCUMENTATION=False
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
# Remove symlink to editorconfig-$pkgver.
rm -f "$pkgdir"/usr/bin/"$pkgname"
mv -f "$pkgdir"/usr/bin/"$pkgname"-"$pkgver" "$pkgdir"/usr/bin/"$pkgname"
}
sha512sums="
7d54c8c1ade8ecef5dc8f35e006f0e226455b7ed9541442a846bbebc26765e92abbbb29b991748164015bcfaff8764a0ac007e4384e163678a2922f7ca6b2e03 editorconfig-0.12.5.tar.gz
655da56c688e06ec0fb6fee06c89ad2eeef7be48ec2df861ed5ce20417801b4fe8ddf2df31026a8b2fb35fe1ab96daadedceb34f4d3231f931c30f109a5d894b editorconfig-core-test-0.13.tar.gz
52c969479e62f8cd3fe751cb3421dc06cf39e50eaf7dfd39626cbbdaaa46ec51d348f1a5f4908300855bcebd32760cb4995f2861c2010d5d76a2063be9aea761 use-compiled-binary.patch
fa283b90a5aa6f64e02963c861456968614dc8cac367bb7583a0d511050ac5339f16d94a0fb47386f197c497a64fcb86ef2ae0c5e8c3111e38b4aeb0880d737d disable-failing-test.patch
"
|