gzip-1.7.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic
  5. DESCRIPTION="Standard GNU compressor"
  6. HOMEPAGE="https://www.gnu.org/software/gzip/"
  7. SRC_URI="mirror://gnu-alpha/gzip/${P}.tar.xz
  8. mirror://gnu/gzip/${P}.tar.xz
  9. mirror://gentoo/${P}.tar.xz"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  13. IUSE="pic static"
  14. PATCHES=(
  15. "${FILESDIR}/${PN}-1.3.8-install-symlinks.patch"
  16. "${FILESDIR}/${PN}-1.4-asmv.patch"
  17. )
  18. src_prepare() {
  19. epatch "${PATCHES[@]}"
  20. }
  21. src_configure() {
  22. use static && append-flags -static
  23. # avoid text relocation in gzip
  24. use pic && export DEFS="NO_ASM"
  25. econf
  26. }
  27. src_install() {
  28. default
  29. docinto txt
  30. dodoc algorithm.doc gzip.doc
  31. # keep most things in /usr, just the fun stuff in /
  32. dodir /bin
  33. mv "${ED}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED}"/bin/ || die
  34. sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die
  35. }