automake-1.11.6-r2.ebuild 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils
  5. DESCRIPTION="Used to generate Makefile.in from Makefile.am"
  6. HOMEPAGE="https://www.gnu.org/software/automake/"
  7. SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
  8. LICENSE="GPL-2"
  9. # Use Gentoo versioning for slotting.
  10. SLOT="${PV:0:4}"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
  12. IUSE=""
  13. RDEPEND="dev-lang/perl
  14. >=sys-devel/automake-wrapper-10
  15. >=sys-devel/autoconf-2.69
  16. sys-devel/gnuconfig"
  17. DEPEND="${RDEPEND}
  18. sys-apps/help2man"
  19. src_prepare() {
  20. export WANT_AUTOCONF=2.5
  21. epatch "${FILESDIR}"/${PN}-1.10-perl-5.16.patch #424453
  22. epatch "${FILESDIR}"/${PN}-1.13-perl-escape-curly-bracket.patch
  23. chmod a+rx tests/*.test
  24. export HELP2MAN=true
  25. sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
  26. export TZ="UTC" #589138
  27. }
  28. src_configure() {
  29. econf --docdir="\$(datarootdir)/doc/${PF}"
  30. }
  31. src_compile() {
  32. default
  33. local x
  34. for x in aclocal automake; do
  35. help2man "perl -Ilib ${x}" > doc/${x}-${SLOT}.1
  36. done
  37. }
  38. # slot the info pages. do this w/out munging the source so we don't have
  39. # to depend on texinfo to regen things. #464146 (among others)
  40. slot_info_pages() {
  41. pushd "${ED}"/usr/share/info >/dev/null
  42. rm -f dir
  43. # Rewrite all the references to other pages.
  44. # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
  45. # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
  46. local p pages=( *.info ) args=()
  47. for p in "${pages[@]/%.info}" ; do
  48. args+=(
  49. -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
  50. -e "s:(${p}):(${p}-${SLOT}):g"
  51. )
  52. done
  53. sed -i "${args[@]}" * || die
  54. # Rewrite all the file references, and rename them in the process.
  55. local f d
  56. for f in * ; do
  57. d=${f/.info/-${SLOT}.info}
  58. mv "${f}" "${d}" || die
  59. sed -i -e "s:${f}:${d}:g" * || die
  60. done
  61. popd >/dev/null
  62. }
  63. src_install() {
  64. default
  65. slot_info_pages
  66. rm \
  67. "${ED}"/usr/bin/{aclocal,automake} \
  68. "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
  69. # remove all config.guess and config.sub files replacing them
  70. # w/a symlink to a specific gnuconfig version
  71. local x
  72. for x in guess sub ; do
  73. dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}
  74. done
  75. }