logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://anongit.hacktivis.me/git/overlay.git/
commit: 0f3a38f47e3e972996f39b36835132a1f5cafe10
parent 6925b4b674a295c7e86a51753dd306dbcb03e37d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 16 Jan 2026 07:40:29 +0100

sys-devel/gettext: add 0.3.3, drop 0.3.2-r5

Diffstat:

Msys-devel/gettext/Manifest2+-
Dsys-devel/gettext/files/gettext-0.3.2-autopoint-parenthesis.patch41-----------------------------------------
Dsys-devel/gettext/files/gettext-0.3.2-autopoint_mkdir.patch41-----------------------------------------
Dsys-devel/gettext/files/gettext-0.3.2-autopoint_serial.patch40----------------------------------------
Dsys-devel/gettext/files/gettext-0.3.2-respect-CFLAGS.patch17-----------------
Dsys-devel/gettext/files/gettext-0.3.2-xgettext-version-output.patch19-------------------
Dsys-devel/gettext/gettext-0.3.2-r5.ebuild61-------------------------------------------------------------
Asys-devel/gettext/gettext-0.3.3.ebuild53+++++++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 54 insertions(+), 220 deletions(-)

diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest @@ -1 +1 @@ -DIST gettext-tiny-0.3.2.tar.gz 295387 BLAKE2B 5f1e4fe44cb16bb3173456ad14813b15ad0f7ace429553a95a70aa444f921dcde2eb8a3ada0958a9366eab47ef62603eb3b0d23b3b255598392390e1953c4a0b SHA512 0ed85599c8dc4114764b8eeed1e35cde97f11185c3f689e377d020758cc010ba4402febb84dba4cdc78e94fa2cd65614dafade8708ea078db5b2921925c36e78 +DIST gettext-tiny-0.3.3.tar.gz 296129 BLAKE2B 01f2adedb0fea487fe9852b1515128770523150ff2f469f1c9f360de386774cb96f75e7ecc795193519a2f2180166e493105c45fc4343ed6b4071eddda422d2e SHA512 6084c6af1e215f095589de6c766cd091c308062deca55b4b717bb6ae94d6e9148ead5dabeed40b50623d5009fb66daac4f4fdff84c2531b1189ff77523b34e04 diff --git a/sys-devel/gettext/files/gettext-0.3.2-autopoint-parenthesis.patch b/sys-devel/gettext/files/gettext-0.3.2-autopoint-parenthesis.patch @@ -1,41 +0,0 @@ -From 86d9b993d0e09d8f8788dcd18c308206a199a82a Mon Sep 17 00:00:00 2001 -From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me> -Date: Sun, 21 Jan 2024 08:57:33 +0100 -Subject: [PATCH] =?UTF-8?q?autopoint:=20Fix=20unescaped=20parenthesis=20in?= - =?UTF-8?q?=20${=E2=80=A6}?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Upstream: https://github.com/sabotage-linux/gettext-tiny/commit/86d9b993d0e09d8f8788dcd18c308206a199a82a - -Tested against mksh 59c, dash 0.5.12 and bash 5.1_p16 on Gentoo Linux while -in zbar-0.23.92 working directory. - -A quick `git grep '${.*('` doesn't leads to other scripts with similar issues. - -Closes: https://github.com/sabotage-linux/gettext-tiny/issues/65 ---- - src/autopoint.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/autopoint.in b/src/autopoint.in -index ce41116..fd00afd 100755 ---- a/src/autopoint.in -+++ b/src/autopoint.in -@@ -15,13 +15,13 @@ dirprefix="" - while read line - do - if [ "${line##*AC_CONFIG_AUX_DIR}" != "$line" ]; then -- dirprefix="${line##*([}" -- dirprefix="${dirprefix%%])*}" -+ dirprefix="${line##*'(['}" -+ dirprefix="${dirprefix%%'])'*}" - mkdir -p "${dirprefix}" - fi - - if [ "${line##*po/Makefile.in}" != "$line" ]; then -- poprefix="${line##*[}" -+ poprefix="${line##*'['}" - poprefix="${poprefix%%po/Makefile.in*}" - install -D -m 644 @datadir@/data/autopoint_Makefile.in "./${poprefix}/po/Makefile.in.in" - fi diff --git a/sys-devel/gettext/files/gettext-0.3.2-autopoint_mkdir.patch b/sys-devel/gettext/files/gettext-0.3.2-autopoint_mkdir.patch @@ -1,41 +0,0 @@ -From b756522f75009e01f79804bba1d1866434446faf Mon Sep 17 00:00:00 2001 -From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me> -Date: Fri, 24 May 2024 23:45:19 +0200 -Subject: [PATCH 2/2] autopoint.in: Use `mkdir -p` instead of `install -D` - -Unlike BusyBox, coreutils, and OpenBSD where `install -D` takes no argument, -in NetBSD and FreeBSD `install -D` takes a `destdir` argument. - -I picked `mkdir -p` in preference of `install -d` simply because mkdir is a defined standard. ---- - src/autopoint.in | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/autopoint.in b/src/autopoint.in -index c88e1c9..ef44810 100755 ---- a/src/autopoint.in -+++ b/src/autopoint.in -@@ -35,15 +35,17 @@ do - if [ "${line##*po/Makefile.in}" != "$line" ]; then - poprefix="${line##*'['}" - poprefix="${poprefix%%po/Makefile.in*}" -- install -D -m 644 @datadir@/data/autopoint_Makefile.in "./${poprefix}/po/Makefile.in.in" -+ mkdir -p "./${poprefix}/po" -+ install -m 644 @datadir@/data/autopoint_Makefile.in "./${poprefix}/po/Makefile.in.in" - fi - done < "configure.ac" - - touch "./${dirprefix}/config.rpath" ABOUT-NLS - -+mkdir -p intl po - for i in intl/Makefile.in po/Makefile.in.in ; do -- install -D -m 644 @datadir@/data/autopoint_Makefile.in "$i" -+ install -m 644 @datadir@/data/autopoint_Makefile.in "$i" - done - --install -D -m 644 @datadir@/data/Makevars.template po/Makevars.template -+install -m 644 @datadir@/data/Makevars.template po/Makevars.template - true --- -2.44.1 - diff --git a/sys-devel/gettext/files/gettext-0.3.2-autopoint_serial.patch b/sys-devel/gettext/files/gettext-0.3.2-autopoint_serial.patch @@ -1,40 +0,0 @@ -From 3407c90cacb976838b174b661f49f7565f77c5e5 Mon Sep 17 00:00:00 2001 -From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me> -Date: Fri, 24 May 2024 23:41:10 +0200 -Subject: [PATCH] autopoint.in: Skip overwriting on >= serial at destination - -Closes: https://github.com/sabotage-linux/gettext-tiny/issues/63 ---- - src/autopoint.in | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/autopoint.in b/src/autopoint.in -index fd00afd..c88e1c9 100755 ---- a/src/autopoint.in -+++ b/src/autopoint.in -@@ -1,6 +1,10 @@ - #!/bin/sh - m4src=@datadir@/m4 - -+get_m4_serial() { -+ sed -n -e '/^#.* serial /s;^#.* serial \([^ ]*\).*;\1;p' "$@" -+} -+ - if ! test -e configure.ac ; then - echo "$0: error: configure.ac not found" >&2 - exit 1 -@@ -8,6 +12,14 @@ fi - - mkdir -p m4 intl po - for i in $m4src/*.m4 ; do -+ dest="m4/$(basename "$i")" -+ if test -f "$dest"; then -+ serial_dest="$(get_m4_serial "$dest")" -+ serial_gettext="$(get_m4_serial "$i")" -+ -+ test "$serial_dest" -ge "$serial_gettext" && continue -+ fi -+ - cp -f $i m4/ - done - diff --git a/sys-devel/gettext/files/gettext-0.3.2-respect-CFLAGS.patch b/sys-devel/gettext/files/gettext-0.3.2-respect-CFLAGS.patch @@ -1,17 +0,0 @@ -https://github.com/sabotage-linux/gettext-tiny/commit/06a18283262b851e6f5965bcdfa3bf2724495728 - -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Tue, 13 Apr 2021 18:59:13 -0800 -Subject: [PATCH] build: respect cflags (#58) - ---- a/Makefile -+++ b/Makefile -@@ -32,7 +32,7 @@ ALL_TOOLS=msgfmt msgmerge xgettext autopoint - ALL_M4S=$(sort $(wildcard m4/*.m4)) - ALL_DATA=$(sort $(wildcard data/*)) - --CFLAGS=-O0 -fPIC -+CFLAGS ?= -O0 -fPIC - - AR ?= $(CROSS_COMPILE)ar - RANLIB ?= $(CROSS_COMPILE)ranlib diff --git a/sys-devel/gettext/files/gettext-0.3.2-xgettext-version-output.patch b/sys-devel/gettext/files/gettext-0.3.2-xgettext-version-output.patch @@ -1,19 +0,0 @@ -https://github.com/sabotage-linux/gettext-tiny/commit/bcb04de5afcf5532a110babfe3912b5725e7146b - -From: Patrycja <github@ptrcnull.me> -Date: Wed, 9 Mar 2022 15:42:21 +0100 -Subject: [PATCH] xgettext: fix --version output (#60) - -"\n" in the printf parameter doesn't expand -and the comma gets printed after format string ---- a/src/xgettext.sh -+++ b/src/xgettext.sh -@@ -16,7 +16,7 @@ syntax() { - } - - show_version() { -- printf "%s\n", "xgettext (GNU gettext-tools compatible) 99.9999.9999\n" -+ printf "%s\n" "xgettext (GNU gettext-tools-compatible) 99.99" - exit 0 - } - diff --git a/sys-devel/gettext/gettext-0.3.2-r5.ebuild b/sys-devel/gettext/gettext-0.3.2-r5.ebuild @@ -1,61 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit toolchain-funcs multilib-minimal - -DESCRIPTION="Stub and/or lightweight replacements of the GNU gettext suite" -HOMEPAGE="https://github.com/sabotage-linux/gettext-tiny" -SRC_URI="https://github.com/sabotage-linux/gettext-tiny/archive/refs/tags/v${PV}.tar.gz -> gettext-tiny-${PV}.tar.gz" -S="${WORKDIR}/gettext-tiny-${PV}/" - -LICENSE="MIT" -SLOT="tiny" -KEYWORDS="~amd64 ~arm64" -IUSE="shim" - -RDEPEND="!<sys-devel/gettext-666:0" - -PATCHES=( - "${FILESDIR}"/gettext-0.3.2-respect-CFLAGS.patch - "${FILESDIR}"/gettext-0.3.2-xgettext-version-output.patch - "${FILESDIR}"/gettext-0.3.2-autopoint-parenthesis.patch - "${FILESDIR}"/gettext-0.3.2-autopoint_serial.patch - "${FILESDIR}"/gettext-0.3.2-autopoint_mkdir.patch -) - -DOCS=( README.md docs ) - -src_prepare() { - default - - # Needs to be set early, otherwise scripts like autopoint have a wrong prefix value - sed -i "s;^prefix=.*;prefix=${EPREFIX}/usr;" Makefile || die - - multilib_copy_sources -} - -multilib_src_compile() { - tc-export AR RANLIB CC - - emake -} - -multilib_src_install() { - local libintl_type - - if use shim ; then - if use elibc_musl ; then - libintl_type=MUSL - else - libintl_type=NOOP - fi - else - # If they don't want the shim (e.g. glibc users who have their own libintl), - # don't install a libintl and just install the binaries. - libintl_type=NONE - fi - - emake LIBINTL="${libintl_type}" DESTDIR="${D}" libdir="${EPREFIX}/usr/$(get_libdir)" install -} diff --git a/sys-devel/gettext/gettext-0.3.3.ebuild b/sys-devel/gettext/gettext-0.3.3.ebuild @@ -0,0 +1,53 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Stub and/or lightweight replacements of the GNU gettext suite" +HOMEPAGE="https://github.com/sabotage-linux/gettext-tiny" +SRC_URI="https://github.com/sabotage-linux/gettext-tiny/archive/refs/tags/v${PV}.tar.gz -> gettext-tiny-${PV}.tar.gz" +S="${WORKDIR}/gettext-tiny-${PV}/" + +LICENSE="MIT" +SLOT="tiny" +KEYWORDS="~amd64 ~arm64" +IUSE="shim" + +RDEPEND="!<sys-devel/gettext-666:0" + +DOCS=( README.md docs ) + +src_prepare() { + default + + # Needs to be set early, otherwise scripts like autopoint have a wrong prefix value + sed -i "s;^prefix=.*;prefix=${EPREFIX}/usr;" Makefile || die + + multilib_copy_sources +} + +multilib_src_compile() { + tc-export AR RANLIB CC + + emake +} + +multilib_src_install() { + local libintl_type + + if use shim ; then + if use elibc_musl ; then + libintl_type=MUSL + else + libintl_type=NOOP + fi + else + # If they don't want the shim (e.g. glibc users who have their own libintl), + # don't install a libintl and just install the binaries. + libintl_type=NONE + fi + + emake LIBINTL="${libintl_type}" DESTDIR="${D}" libdir="${EPREFIX}/usr/$(get_libdir)" install +}