automake-9999.ebuild 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
  5. http://git.savannah.gnu.org/r/${PN}.git"
  6. inherit eutils git-2
  7. DESCRIPTION="Used to generate Makefile.in from Makefile.am"
  8. HOMEPAGE="https://www.gnu.org/software/automake/"
  9. SRC_URI=""
  10. LICENSE="GPL-2"
  11. # Use Gentoo versioning for slotting.
  12. SLOT="${PV:0:4}"
  13. KEYWORDS=""
  14. IUSE=""
  15. RDEPEND="dev-lang/perl
  16. >=sys-devel/automake-wrapper-10
  17. >=sys-devel/autoconf-2.69
  18. >=sys-apps/texinfo-4.7
  19. sys-devel/gnuconfig"
  20. DEPEND="${RDEPEND}
  21. sys-apps/help2man"
  22. src_prepare() {
  23. export WANT_AUTOCONF=2.5
  24. # Don't try wrapping the autotools this thing runs as it tends
  25. # to be a bit esoteric, and the script does `set -e` itself.
  26. ./bootstrap.sh
  27. }
  28. src_configure() {
  29. econf --docdir="\$(datarootdir)/doc/${PF}"
  30. }
  31. src_test() {
  32. emake check
  33. }
  34. # slot the info pages. do this w/out munging the source so we don't have
  35. # to depend on texinfo to regen things. #464146 (among others)
  36. slot_info_pages() {
  37. pushd "${ED}"/usr/share/info >/dev/null
  38. rm -f dir
  39. # Rewrite all the references to other pages.
  40. # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
  41. # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
  42. local p pages=( *.info ) args=()
  43. for p in "${pages[@]/%.info}" ; do
  44. args+=(
  45. -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
  46. -e "s:(${p}):(${p}-${SLOT}):g"
  47. )
  48. done
  49. sed -i "${args[@]}" * || die
  50. # Rewrite all the file references, and rename them in the process.
  51. local f d
  52. for f in * ; do
  53. d=${f/.info/-${SLOT}.info}
  54. mv "${f}" "${d}" || die
  55. sed -i -e "s:${f}:${d}:g" * || die
  56. done
  57. popd >/dev/null
  58. }
  59. src_install() {
  60. default
  61. slot_info_pages
  62. # SLOT the docs and junk
  63. local x
  64. for x in aclocal automake ; do
  65. help2man "perl -Ilib ${x}" > ${x}-${SLOT}.1
  66. doman ${x}-${SLOT}.1
  67. rm -f "${ED}"/usr/bin/${x}
  68. done
  69. # remove all config.guess and config.sub files replacing them
  70. # w/a symlink to a specific gnuconfig version
  71. for x in guess sub ; do
  72. dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}
  73. done
  74. }