blob: 216980f7924019c2d75245dbf0832a55ebf99e67 (
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
|
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=uchardet
pkgver=0.0.7
pkgrel=0
pkgdesc="Encoding detector library ported from Mozilla"
url="https://www.freedesktop.org/wiki/Software/uchardet"
arch="all"
license="MPL-1.1"
makedepends="cmake"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://www.freedesktop.org/software/uchardet/releases/uchardet-$pkgver.tar.xz"
build() {
case "$CARCH" in
# Failing tests without SSE2 enabled
# https://gitlab.freedesktop.org/uchardet/uchardet/-/issues/16
x86)
export CXXFLAGS="$CXXFLAGS -mfpmath=sse -msse2"
;;
esac
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
$CMAKE_CROSSOPTS
make -C build
}
check() {
make -C build test
}
package() {
make -C build DESTDIR="$pkgdir" install
}
sha512sums="ddb7b63dd09c1d9acbe620d86217e583d9aa5340780ab4010ec9faa4fd331498859d5efa7829bf8847da89325accf8f7304b51d410210178fc1ffa6658064a6f uchardet-0.0.7.tar.xz"
|