automake-1.14.1.ebuild 2.5 KB

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