logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 753881caeb6f67424dde6fe2c495548c79c94ceb
parent 35f64d466b294887f847d447915b2cb2bf4537d1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 20 Jan 2024 21:18:42 +0100

sys-devel/gettext: Fix value of prefix for scripts

Diffstat:

Dsys-devel/gettext/gettext-0.3.2-r1.ebuild49-------------------------------------------------
Asys-devel/gettext/gettext-0.3.2-r2.ebuild56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 49 deletions(-)

diff --git a/sys-devel/gettext/gettext-0.3.2-r1.ebuild b/sys-devel/gettext/gettext-0.3.2-r1.ebuild @@ -1,49 +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="MIT" -SLOT="tiny" -KEYWORDS="~amd64" -IUSE="shim" - -RDEPEND="!sys-devel/gettext:0" - -PATCHES=( - "${FILESDIR}"/${P}-respect-CFLAGS.patch - "${FILESDIR}"/${P}-xgettext-version-output.patch -) - -DOCS=( README.md docs ) - -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-r2.ebuild b/sys-devel/gettext/gettext-0.3.2-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 2022-2024 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="MIT" +SLOT="tiny" +KEYWORDS="~amd64" +IUSE="shim" + +RDEPEND="!sys-devel/gettext:0" + +PATCHES=( + "${FILESDIR}"/${P}-respect-CFLAGS.patch + "${FILESDIR}"/${P}-xgettext-version-output.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 +} + +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}" install +}