logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 549267478020c0f9ee3a59e78ec1aa09a2a5878f
parent b7b3cece1d2b565737e7e78cb89b6cc47a114239
Author: Sam James <sam@gentoo.org>
Date:   Wed,  4 May 2022 02:13:45 +0100

sys-devel/gettext: new package, add 0.3.2

Signed-off-by: Sam James <sam@gentoo.org>

Diffstat:

Asys-devel/gettext/Manifest1+
Asys-devel/gettext/files/gettext-0.3.2-respect-CFLAGS.patch17+++++++++++++++++
Asys-devel/gettext/gettext-0.3.2.ebuild46++++++++++++++++++++++++++++++++++++++++++++++
Asys-devel/gettext/metadata.xml20++++++++++++++++++++
Asys-devel/qbe/qbe-9999.ebuild10++++++++++
5 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/sys-devel/gettext/Manifest b/sys-devel/gettext/Manifest @@ -0,0 +1 @@ +DIST gettext-tiny-0.3.2.tar.gz 295387 BLAKE2B 5f1e4fe44cb16bb3173456ad14813b15ad0f7ace429553a95a70aa444f921dcde2eb8a3ada0958a9366eab47ef62603eb3b0d23b3b255598392390e1953c4a0b SHA512 0ed85599c8dc4114764b8eeed1e35cde97f11185c3f689e377d020758cc010ba4402febb84dba4cdc78e94fa2cd65614dafade8708ea078db5b2921925c36e78 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 @@ -0,0 +1,17 @@ +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/gettext-0.3.2.ebuild b/sys-devel/gettext/gettext-0.3.2.ebuild @@ -0,0 +1,46 @@ +# 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 +} diff --git a/sys-devel/gettext/metadata.xml b/sys-devel/gettext/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <use> + <flag name="shim"> + Install libintl library. Not suitable on glibc systems. + On musl systems, passes contents through and translates + via musl's libintl. + On other systems, provides a no-op library (returns + input text with no changes/translations). + </flag> + </use> + <upstream> + <remote-id type="github">sabotage-linux/gettext-tiny</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-devel/qbe/qbe-9999.ebuild b/sys-devel/qbe/qbe-9999.ebuild @@ -0,0 +1,10 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Pure C embeddable compiler backend" +HOMEPAGE="https://c9x.me/compile/" +LICENSE="MIT" +SLOT="0" +KEYWORDS="-amd64 -arm64"