summaryrefslogtreecommitdiff
path: root/user/utf8proc/APKBUILD
blob: 8b3234adb3678a4dd66dd6178a9a274a29252355 (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
41
42
43
44
45
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=utf8proc
pkgver=2.3.0
pkgrel=0
pkgdesc="C library for processing UTF-8 data"
url=" "
arch="all"
license="MIT AND Unicode-DFS-2016"
depends=""
makedepends=""
subpackages="$pkgname-dev"
source="utf8proc-$pkgver.tar.gz::https://github.com/JuliaStrings/utf8proc/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	mkdir build
}

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

check() {
	cd "$builddir"/build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="3935cd280e14ed570caa89a983b2d56a981e74da9298a1ea26064da78ece288ff48a73306446d3e1d777e6ecd8ea881f7a29169eaae2153cb015daefb8df8656  utf8proc-2.3.0.tar.gz"