pkgname=gettext pkgver=0.22.5 pkgdesc="GNU internationalization library" homepage="https://www.gnu.org/software/gettext/" license=( GFDL-1.2-only GPL-2.0-only GPL-2.0-or-later LGPL-2.0-only ) sources=("${pkgname}-${pkgver}.tar.xz") urls=("https://ftp.gnu.org/gnu/${pkgname}/${sources[0]}") md5sums=("3ae5580599d84be93e6213930facb2db") src_prepare() { tar -xf ${DIST_DIR}/${pkgname}-${pkgver}/${sources[0]} --strip-components=1 } src_build() { ./configure --prefix=/usr \ --disable-static \ --docdir=/usr/share/doc/gettext-0.22.5 make } src_check() { leaf_record_message "If zh_CN.UTF-8 has been defined, then 5 tests are known to fail without libunistring:\n\ttest-ctype_alnum\n\ttest-ctype_alpha\n\ttest-ctype_graph\n\ttest-ctype_print\n\ttest-ctype_punct" make -k check } src_install() { make DESTDIR="${pkgdir}" install chmod -v 0755 "${pkgdir}/usr/lib/preloadable_libintl.so" }