mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 05:36:38 +02:00
Remove -Os and -O1 in $CFLAGS and $LDFLAGS respectively when running tests on armhf, which triggered a test-memset_explicit test failure.
97 lines
2.6 KiB
Text
97 lines
2.6 KiB
Text
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
|
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
|
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
pkgname=gettext
|
|
pkgver=0.24
|
|
pkgrel=0
|
|
pkgdesc="GNU locale utilities"
|
|
url="https://www.gnu.org/software/gettext/gettext.html"
|
|
arch="all"
|
|
license="GPL-3.0-or-later AND LGPL-2.1-or-later AND MIT"
|
|
# do _not_ add the optional dependencies on libcroco or glib
|
|
# they depend on gettext and would introduce cyclic dependencies
|
|
# xz for autopoint autoreconf
|
|
depends_dev="!musl-libintl xz"
|
|
makedepends="perl ncurses-dev libxml2-dev~2.13 libunistring-dev"
|
|
checkdepends="coreutils"
|
|
subpackages="
|
|
$pkgname-dbg
|
|
$pkgname-doc
|
|
$pkgname-static
|
|
$pkgname-dev
|
|
$pkgname-lang
|
|
$pkgname-envsubst:_envsubst
|
|
libintl
|
|
$pkgname-asprintf
|
|
$pkgname-libs
|
|
"
|
|
source="https://ftp.gnu.org/gnu/gettext/gettext-$pkgver.tar.xz
|
|
cwd.patch
|
|
skip-tests-musl.patch
|
|
"
|
|
|
|
# secfixes:
|
|
# 0.20.1-r0:
|
|
# - CVE-2018-18751
|
|
|
|
build() {
|
|
# force using system posix complaint printf
|
|
# the test is broken and fails with ash
|
|
gt_cv_func_printf_posix=yes \
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--enable-threads=posix \
|
|
--disable-java \
|
|
--enable-static
|
|
make
|
|
}
|
|
|
|
check() {
|
|
case "$CARCH" in
|
|
# test-verify fails if run in parallel
|
|
# test-memset_explicit fails on armhf if -Os/-01 are set in CFLAGS/LDFLAGS
|
|
armhf) make -j1 check CFLAGS="${CFLAGS/-Os/}" LDFLAGS="${LDFLAGS/-O1,/}" ;;
|
|
*) make -j1 check ;;
|
|
esac
|
|
|
|
}
|
|
|
|
package() {
|
|
depends="$pkgname-envsubst=$pkgver-r$pkgrel"
|
|
make -j1 DESTDIR="$pkgdir" install
|
|
|
|
# nothing in here is particularly useful, mostly just hello world examples in
|
|
# every single programming language for using gettext
|
|
rm -r "$pkgdir"/usr/share/doc
|
|
}
|
|
|
|
libintl() {
|
|
pkgdesc="GNU gettext runtime library"
|
|
license="LGPL-2.1-or-later"
|
|
|
|
amove usr/lib/libintl.so.*
|
|
chmod +x "$subpkgdir"/usr/lib/libintl.so.*
|
|
}
|
|
|
|
asprintf() {
|
|
pkgdesc="GNU gettext asprintf library"
|
|
license="LGPL-2.1-or-later"
|
|
|
|
amove usr/lib/libasprintf.so.*
|
|
}
|
|
|
|
_envsubst() {
|
|
pkgdesc="GNU gettext envsubst binary"
|
|
provides="envsubst"
|
|
provider_priority=100 # highest (other provider of cmd:envsubst is testing/envsubst)
|
|
|
|
amove usr/bin/envsubst
|
|
}
|
|
|
|
sha512sums="
|
|
8e362d99f5e2e13b7d3dd71b80d6fe53e4337fc2ca9cc75d23b7635caae20262f3f6ee6f4665e1db64ff56b99a0afa1411f0c859673428e8b81a7943feec1549 gettext-0.24.tar.xz
|
|
31796534e40c1569b08cf48e25375ca1d0f439df8aa0d24283769d52a290e28522760128f11f5bd04217605974ae1fdee9557ec189ed32b11b2a45b4af3b0f4a cwd.patch
|
|
a16963f804ce4abe8480da211228f7b24a0715d6ef3ff7d5e5c58a1387d6c4260ee237864081b05b164f082ef199a592494ce691dd0c96c61978e4c451707c7a skip-tests-musl.patch
|
|
"
|