commit: 99433bda4ea0a40456924be48d727b456a7d34ec
parent 549267478020c0f9ee3a59e78ec1aa09a2a5878f
Author: Sam James <sam@gentoo.org>
Date: Wed, 4 May 2022 02:19:13 +0100
sys-devel/gettext: add xgettext version output fix
Diffstat:
3 files changed, 66 insertions(+), 46 deletions(-)
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
@@ -0,0 +1,19 @@
+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-r1.ebuild b/sys-devel/gettext/gettext-0.3.2-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+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="BSD-1"
+SLOT="tiny"
+KEYWORDS="~amd64"
+IUSE="shim"
+
+RDEPEND="!sys-devel/gettext:0"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-respect-CFLAGS.patch
+ "${FILESDIR}"/${P}-xgettext-version-output.patch
+)
+
+src_compile() {
+ tc-export AR RANLIB CC
+
+ emake
+}
+
+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}" prefix="${EPREFIX}/usr" install
+}
diff --git a/sys-devel/gettext/gettext-0.3.2.ebuild b/sys-devel/gettext/gettext-0.3.2.ebuild
@@ -1,46 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-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="BSD-1"
-SLOT="tiny"
-KEYWORDS="~amd64"
-IUSE="shim"
-
-RDEPEND="!sys-devel/gettext:0"
-
-PATCHES=(
- "${FILESDIR}"/${P}-respect-CFLAGS.patch
-)
-
-src_compile() {
- tc-export AR RANLIB CC
-
- emake
-}
-
-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}" prefix="${EPREFIX}/usr" install
-}