gnuconfig-20160402.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils
  5. if [[ ${PV} == "99999999" ]] ; then
  6. EGIT_REPO_URI="git://git.savannah.gnu.org/config.git
  7. http://git.savannah.gnu.org/r/config.git"
  8. inherit git-2
  9. else
  10. SRC_URI="mirror://gentoo/${P}.tar.bz2"
  11. 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"
  12. fi
  13. DESCRIPTION="Updated config.sub and config.guess file from GNU"
  14. HOMEPAGE="https://savannah.gnu.org/projects/config"
  15. LICENSE="GPL-2"
  16. SLOT="0"
  17. IUSE=""
  18. S=${WORKDIR}
  19. maint_pkg_create() {
  20. cd "${S}"
  21. local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
  22. [[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
  23. cp "${FILESDIR}"/${PV}/*.patch . || die
  24. local tar="${T}/gnuconfig-${ver}.tar.bz2"
  25. tar -jcf ${tar} ./* || die "creating tar failed"
  26. einfo "Packaged tar now available:"
  27. einfo "$(du -b ${tar})"
  28. }
  29. src_unpack() {
  30. if [[ ${PV} == "99999999" ]] ; then
  31. git-2_src_unpack
  32. maint_pkg_create
  33. else
  34. unpack ${A}
  35. fi
  36. }
  37. src_prepare() {
  38. epatch "${WORKDIR}"/*.patch
  39. use elibc_uclibc && sed -i 's:linux-gnu:linux-uclibc:' testsuite/config-guess.data #180637
  40. }
  41. src_compile() { :;}
  42. src_test() {
  43. emake check
  44. }
  45. src_install() {
  46. insinto /usr/share/${PN}
  47. doins config.{sub,guess} || die
  48. fperms +x /usr/share/${PN}/config.{sub,guess}
  49. dodoc ChangeLog
  50. }