1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 inherit elisp readme.gentoo-r1
9 DESCRIPTION="An Emacs mode for notes and project planning"
10 HOMEPAGE="https://www.orgmode.org/"
11 SRC_URI="http://orgmode.org/org-${PV}.tar.gz"
13 LICENSE="GPL-3+ FDL-1.3+ contrib? ( GPL-2+ MIT ) odt-schema? ( OASIS-Open )"
15 KEYWORDS="amd64 ppc x86 ~x86-macos"
16 IUSE="contrib doc odt-schema"
19 BDEPEND="doc? ( virtual/texi2dvi )"
21 S="${WORKDIR}/org-${PV}"
22 SITEFILE="50${PN}-gentoo.el"
25 emake datadir="${EPREFIX}${SITEETC}/${PN}"
26 use doc && emake pdf card
32 ETCDIRS="styles $(use odt-schema && echo schema)" \
33 lispdir="${EPREFIX}${SITELISP}/${PN}" \
34 datadir="${EPREFIX}${SITEETC}/${PN}" \
35 infodir="${EPREFIX}/usr/share/info" \
38 cp "${FILESDIR}/${SITEFILE}" "${T}/${SITEFILE}" || die
41 elisp-install ${PN}/contrib contrib/lisp/{org,ob,ox}*.el
42 ( docinto contrib; dodoc -r contrib/README contrib/scripts )
43 find "${ED}/usr/share/doc/${PF}/contrib" -type f -name '.*' \
45 # add the contrib subdirectory to load-path
46 sed -i -e 's:\(.*@SITELISP@\)\(.*\):&\n\1/contrib\2:' \
47 "${T}/${SITEFILE}" || die
50 elisp-site-file-install "${T}/${SITEFILE}"
51 dodoc README etc/ORG-NEWS
52 use doc && dodoc doc/org.pdf doc/orgcard.pdf doc/orgguide.pdf
54 DOC_CONTENTS="Org mode has a large variety of run-time dependencies,
55 so you may have to install one or more additional packages.
56 A non-exhaustive list of these dependencies may be found at
57 <http://orgmode.org/worg/org-dependencies.html>."
58 readme.gentoo_create_doc