logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

gettext-0.3.2-r1.ebuild (1079B)


  1. # Copyright 2022 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit toolchain-funcs
  5. DESCRIPTION="Stub and/or lightweight replacements of the GNU gettext suite"
  6. HOMEPAGE="https://github.com/sabotage-linux/gettext-tiny"
  7. SRC_URI="https://github.com/sabotage-linux/gettext-tiny/archive/refs/tags/v${PV}.tar.gz -> gettext-tiny-${PV}.tar.gz"
  8. S="${WORKDIR}/gettext-tiny-${PV}/"
  9. LICENSE="MIT"
  10. SLOT="tiny"
  11. KEYWORDS="~amd64"
  12. IUSE="shim"
  13. RDEPEND="!sys-devel/gettext:0"
  14. PATCHES=(
  15. "${FILESDIR}"/${P}-respect-CFLAGS.patch
  16. "${FILESDIR}"/${P}-xgettext-version-output.patch
  17. )
  18. DOCS=( README.md docs )
  19. src_compile() {
  20. tc-export AR RANLIB CC
  21. emake
  22. }
  23. src_install() {
  24. local libintl_type
  25. if use shim ; then
  26. if use elibc_musl ; then
  27. libintl_type=MUSL
  28. else
  29. libintl_type=NOOP
  30. fi
  31. else
  32. # If they don't want the shim (e.g. glibc users who have their own libintl),
  33. # don't install a libintl and just install the binaries.
  34. libintl_type=NONE
  35. fi
  36. emake LIBINTL="${libintl_type}" DESTDIR="${D}" prefix="${EPREFIX}/usr" install
  37. }