aboutsummaryrefslogtreecommitdiffstats
path: root/community/uchardet/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/uchardet/APKBUILD')
-rw-r--r--community/uchardet/APKBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/community/uchardet/APKBUILD b/community/uchardet/APKBUILD
new file mode 100644
index 0000000000..f8ab9b6d3e
--- /dev/null
+++ b/community/uchardet/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+pkgname=uchardet
+pkgver=0.0.6
+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"
+options="!check" # fail on x86, upstream is dead
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://www.freedesktop.org/software/uchardet/releases/uchardet-${pkgver}.tar.xz"
+builddir="$srcdir/uchardet-$pkgver"
+
+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=Release \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS}
+ make
+}
+
+check() {
+ # overwrite failing test
+ touch test/th/utf-8.txt test/th/tis-620.txt
+ make test
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="eceeadae060bf277e298d709856609dde32921271140dc1fb0a33c7b6e1381033fc2960d616ebbd82c92815936864d2c0743b1b5ea1b7d4a200df87df80d6de5 uchardet-0.0.6.tar.xz"