automake-1.4_p6-r2.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. MY_P="${P/_/-}"
  6. DESCRIPTION="Used to generate Makefile.in from Makefile.am"
  7. HOMEPAGE="https://www.gnu.org/software/automake/"
  8. SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
  9. LICENSE="GPL-2"
  10. # Use Gentoo versioning for slotting.
  11. SLOT="${PV:0:3}"
  12. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
  13. IUSE=""
  14. RDEPEND="dev-lang/perl
  15. >=sys-devel/automake-wrapper-10
  16. >=sys-devel/autoconf-2.69
  17. sys-devel/gnuconfig"
  18. DEPEND="${RDEPEND}"
  19. S=${WORKDIR}/${MY_P}
  20. src_prepare() {
  21. export WANT_AUTOCONF=2.5
  22. epatch "${FILESDIR}"/${PN}-1.4-nls-nuisances.patch #121151
  23. epatch "${FILESDIR}"/${PN}-1.4-libtoolize.patch
  24. epatch "${FILESDIR}"/${PN}-1.4-subdirs-89656.patch
  25. epatch "${FILESDIR}"/${PN}-1.4-ansi2knr-stdlib.patch
  26. epatch "${FILESDIR}"/${PN}-1.4-CVE-2009-4029.patch #295357
  27. epatch "${FILESDIR}"/${PN}-1.4-perl-5.11.patch
  28. epatch "${FILESDIR}"/${PN}-1.4-perl-dyn-call.patch
  29. sed -i 's:error\.test::' tests/Makefile.in #79529
  30. }
  31. # slot the info pages. do this w/out munging the source so we don't have
  32. # to depend on texinfo to regen things. #464146 (among others)
  33. slot_info_pages() {
  34. pushd "${ED}"/usr/share/info >/dev/null
  35. rm -f dir
  36. # Rewrite all the references to other pages.
  37. # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
  38. # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
  39. local p pages=( *.info ) args=()
  40. for p in "${pages[@]/%.info}" ; do
  41. args+=(
  42. -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
  43. -e "s:(${p}):(${p}-${SLOT}):g"
  44. )
  45. done
  46. sed -i "${args[@]}" * || die
  47. # Rewrite all the file references, and rename them in the process.
  48. local f d
  49. for f in * ; do
  50. d=${f/.info/-${SLOT}.info}
  51. mv "${f}" "${d}" || die
  52. sed -i -e "s:${f}:${d}:g" * || die
  53. done
  54. popd >/dev/null
  55. }
  56. src_install() {
  57. emake install DESTDIR="${D}" \
  58. pkgdatadir=/usr/share/automake-${SLOT} \
  59. m4datadir=/usr/share/aclocal-${SLOT}
  60. slot_info_pages
  61. rm -f "${ED}"/usr/bin/{aclocal,automake}
  62. dosym automake-${SLOT} /usr/share/automake
  63. dodoc NEWS README THANKS TODO AUTHORS ChangeLog
  64. # remove all config.guess and config.sub files replacing them
  65. # w/a symlink to a specific gnuconfig version
  66. for x in guess sub ; do
  67. dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}
  68. done
  69. }