1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit readme.gentoo elisp
9 DESCRIPTION="An Emacs mode for notes and project planning"
10 HOMEPAGE="http://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-fbsd ~x86-macos"
16 IUSE="contrib doc odt-schema"
19 DEPEND="doc? ( virtual/texi2dvi )"
21 S="${WORKDIR}/org-${PV}"
22 SITEFILE="50${PN}-gentoo.el"
25 Org mode has a large variety of run-time dependencies, so you may have to
26 install one or more additional packages. A non-exhaustive list of these
27 dependencies may be found at <http://orgmode.org/worg/org-dependencies.html>.
31 emake datadir="${EPREFIX}${SITEETC}/${PN}"
32 use doc && emake pdf card
38 ETCDIRS="styles $(use odt-schema && echo schema)" \
39 lispdir="${EPREFIX}${SITELISP}/${PN}" \
40 datadir="${EPREFIX}${SITEETC}/${PN}" \
41 infodir="${EPREFIX}/usr/share/info" \
44 cp "${FILESDIR}/${SITEFILE}" "${T}/${SITEFILE}" || die
47 elisp-install ${PN}/contrib contrib/lisp/{org,ob,ox}*.el
48 insinto /usr/share/doc/${PF}/contrib
49 doins -r contrib/README contrib/scripts
50 find "${ED}/usr/share/doc/${PF}/contrib" -type f -name '.*' \
52 # add the contrib subdirectory to load-path
53 sed -i -e 's:\(.*@SITELISP@\)\(.*\):&\n\1/contrib\2:' \
54 "${T}/${SITEFILE}" || die
57 elisp-site-file-install "${T}/${SITEFILE}"
58 readme.gentoo_create_doc
59 dodoc README doc/library-of-babel.org doc/orgcard.txt etc/ORG-NEWS
60 use doc && dodoc doc/org.pdf doc/orgcard.pdf doc/orgguide.pdf