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-r5.ebuild (1516B)


  1. # Copyright 2022-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit toolchain-funcs multilib-minimal
  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-666:0"
  14. PATCHES=(
  15. "${FILESDIR}"/gettext-0.3.2-respect-CFLAGS.patch
  16. "${FILESDIR}"/gettext-0.3.2-xgettext-version-output.patch
  17. "${FILESDIR}"/gettext-0.3.2-autopoint-parenthesis.patch
  18. "${FILESDIR}"/gettext-0.3.2-autopoint_serial.patch
  19. "${FILESDIR}"/gettext-0.3.2-autopoint_mkdir.patch
  20. )
  21. DOCS=( README.md docs )
  22. src_prepare() {
  23. default
  24. # Needs to be set early, otherwise scripts like autopoint have a wrong prefix value
  25. sed -i "s;^prefix=.*;prefix=${EPREFIX}/usr;" Makefile || die
  26. multilib_copy_sources
  27. }
  28. multilib_src_compile() {
  29. tc-export AR RANLIB CC
  30. emake
  31. }
  32. multilib_src_install() {
  33. local libintl_type
  34. if use shim ; then
  35. if use elibc_musl ; then
  36. libintl_type=MUSL
  37. else
  38. libintl_type=NOOP
  39. fi
  40. else
  41. # If they don't want the shim (e.g. glibc users who have their own libintl),
  42. # don't install a libintl and just install the binaries.
  43. libintl_type=NONE
  44. fi
  45. emake LIBINTL="${libintl_type}" DESTDIR="${D}" libdir="${EPREFIX}/usr/$(get_libdir)" install
  46. }