automake-1.14.1-r1.ebuild 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Copyright 1999-2017 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 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  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. epatch "${FILESDIR}"/${PN}-1.15-perl-escape-curly-bracket.patch
  32. sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
  33. }
  34. src_configure() {
  35. econf --docdir="\$(datarootdir)/doc/${PF}"
  36. }
  37. src_test() {
  38. emake check
  39. }
  40. # slot the info pages. do this w/out munging the source so we don't have
  41. # to depend on texinfo to regen things. #464146 (among others)
  42. slot_info_pages() {
  43. pushd "${ED}"/usr/share/info >/dev/null
  44. rm -f dir
  45. # Rewrite all the references to other pages.
  46. # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
  47. # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
  48. local p pages=( *.info ) args=()
  49. for p in "${pages[@]/%.info}" ; do
  50. args+=(
  51. -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
  52. -e "s:(${p}):(${p}-${SLOT}):g"
  53. )
  54. done
  55. sed -i "${args[@]}" * || die
  56. # Rewrite all the file references, and rename them in the process.
  57. local f d
  58. for f in * ; do
  59. d=${f/.info/-${SLOT}.info}
  60. mv "${f}" "${d}" || die
  61. sed -i -e "s:${f}:${d}:g" * || die
  62. done
  63. popd >/dev/null
  64. }
  65. src_install() {
  66. default
  67. slot_info_pages
  68. rm "${ED}"/usr/share/aclocal/README || die
  69. rmdir "${ED}"/usr/share/aclocal || die
  70. rm \
  71. "${ED}"/usr/bin/{aclocal,automake} \
  72. "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
  73. # remove all config.guess and config.sub files replacing them
  74. # w/a symlink to a specific gnuconfig version
  75. local x
  76. for x in guess sub ; do
  77. dosym ../gnuconfig/config.${x} /usr/share/${PN}-${SLOT}/config.${x}
  78. done
  79. }