automake-1.7.9-r3.ebuild 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  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.bz2"
  8. LICENSE="GPL-2"
  9. # Use Gentoo versioning for slotting.
  10. SLOT="${PV:0:3}"
  11. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~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. src_prepare() {
  19. export WANT_AUTOCONF=2.5
  20. epatch "${FILESDIR}"/${P}-infopage-namechange.patch
  21. epatch "${FILESDIR}"/${P}-test-fixes.patch
  22. epatch "${FILESDIR}"/${PN}-1.9.6-subst-test.patch #222225
  23. epatch "${FILESDIR}"/${P}-libtool-2.patch #257544
  24. epatch "${FILESDIR}"/${PN}-1.10-ccnoco-ldflags.patch #203914
  25. epatch "${FILESDIR}"/${PN}-1.5-CVE-2009-4029.patch #295357
  26. epatch "${FILESDIR}"/${PN}-1.5-perl-5.11.patch
  27. }
  28. # slot the info pages. do this w/out munging the source so we don't have
  29. # to depend on texinfo to regen things. #464146 (among others)
  30. slot_info_pages() {
  31. pushd "${ED}"/usr/share/info >/dev/null
  32. rm -f dir
  33. # Rewrite all the references to other pages.
  34. # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
  35. # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
  36. local p pages=( *.info ) args=()
  37. for p in "${pages[@]/%.info}" ; do
  38. args+=(
  39. -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
  40. -e "s:(${p}):(${p}-${SLOT}):g"
  41. )
  42. done
  43. sed -i "${args[@]}" * || die
  44. # Rewrite all the file references, and rename them in the process.
  45. local f d
  46. for f in * ; do
  47. d=${f/.info/-${SLOT}.info}
  48. mv "${f}" "${d}" || die
  49. sed -i -e "s:${f}:${d}:g" * || die
  50. done
  51. popd >/dev/null
  52. }
  53. src_install() {
  54. default
  55. slot_info_pages
  56. rm -f "${ED}"/usr/bin/{aclocal,automake}
  57. # remove all config.guess and config.sub files replacing them
  58. # w/a symlink to a specific gnuconfig version
  59. local x
  60. for x in guess sub ; do
  61. dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}
  62. done
  63. }