asciidoc-8.6.9-r5.ebuild 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 pypy )
  5. inherit python-single-r1 readme.gentoo-r1
  6. DESCRIPTION="AsciiDoc is a plain text human readable/writable document format"
  7. HOMEPAGE="http://asciidoc.org/"
  8. SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz"
  9. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. IUSE="examples graphviz highlight test"
  13. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  14. RDEPEND="
  15. app-text/docbook-xml-dtd:4.5
  16. >=app-text/docbook-xsl-stylesheets-1.75
  17. dev-libs/libxslt
  18. ${PYTHON_DEPS}
  19. graphviz? ( media-gfx/graphviz )
  20. highlight? (
  21. || (
  22. dev-util/source-highlight
  23. dev-python/pygments[${PYTHON_USEDEP}]
  24. app-text/highlight
  25. )
  26. )"
  27. DEPEND="
  28. test? (
  29. app-text/dvipng
  30. dev-texlive/texlive-latex
  31. dev-util/source-highlight
  32. media-gfx/graphviz
  33. media-gfx/imagemagick
  34. media-sound/lilypond
  35. ${PYTHON_DEPS}
  36. )"
  37. DOC_CONTENTS="
  38. If you are going to use a2x, please also look at a2x(1) under
  39. REQUISITES for a list of runtime dependencies.
  40. "
  41. src_prepare() {
  42. default
  43. # Only needed for prefix - harmless (does nothing) otherwise
  44. sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \
  45. "${S}/asciidoc.py" || die
  46. }
  47. src_configure() {
  48. econf --sysconfdir="${EPREFIX}"/usr/share
  49. }
  50. src_test() {
  51. local -x ASCIIDOC_PY=asciidoc.py
  52. "${EPYTHON}" tests/test${PN}.py update || die
  53. "${EPYTHON}" tests/test${PN}.py run || die
  54. }
  55. src_install() {
  56. default
  57. python_fix_shebang "${ED%/}"/usr/bin/*.py
  58. readme.gentoo_create_doc
  59. dodoc CHANGELOG docbook-xsl/asciidoc-docbook-xsl.txt \
  60. dblatex/dblatex-readme.txt filters/code/code-filter-readme.txt
  61. # Below results in some files being installed twice in different locations, but they are
  62. # in the right place, uncompressed, and there won't be any broken links. See bug #483336
  63. if use examples; then
  64. # examples/website is full of relative symlinks,
  65. # deref them for copying, which dodoc doesn't do
  66. cp -rL examples/website "${ED%/}"/usr/share/doc/${PF}/examples || die
  67. docompress -x /usr/share/doc/${PF}/examples
  68. fi
  69. }
  70. pkg_postinst() {
  71. readme.gentoo_print_elog
  72. }