pkgname=uchardet pkgver=0.0.8 pkgdesc="Encoding detector library" homepage="https://www.freedesktop.org/wiki/Software/uchardet/" license=("GPL-2+") _patches=("${pkgname}-${pkgver}-cmake4.patch") _patch_sums=("812378feee2affbba6fb7b4c7c8ab29413577f55317f7603f6ce883c1857fd149707d658b3bf2dc5d42a27ead04d74afd98d86e97ab7b1920f3a37882099a5e0") sources=("${pkgname}-${pkgver}.tar.xz" "${_patches[@]}" ) urls=("https://www.freedesktop.org/software/uchardet/releases/${sources[0]}" "${_patches[@]}" ) sha512sums=("4a5dcc9ff021352f3b252e103ff1475cec62c974294b264ee9243f024633c3ae44be8c7733608624066113e635f8b156ecb08c8ff87c736d04b07641eb166382" "${_patch_sums[@]}" ) src_prepare() { tar -xf ${distdir}/${sources[0]} --strip-components=1 for _patch in ${_patches[@]}; do patch -p1 -i ${filedir}/${_patch} done } src_build() { local cmake_args=( -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=release -D BUILD_STATIC=no -D CHECK_SSE2=yes ) cmake -B build "${cmake_args[@]}" cmake --build build } src_install() { DESTDIR="$pkgdir" cmake --install build } # vim:ft=sh syn=sh et sw=2: