blob: 03e7eaf22a59ede03ed53dba30b98b6456f02fa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
NEED_EMACS="28"
inherit elisp readme.gentoo-r1
DESCRIPTION="An Emacs mode for notes and project planning"
HOMEPAGE="https://orgmode.org/"
if [[ "${PV}" == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs/${PN}"
EGIT_CHECKOUT_DIR="${WORKDIR}/org"
S="${WORKDIR}/org"
else
# git archive --prefix=${P}/ release_${PV} | xz > ${P}.tar.xz
SRC_URI="https://dev.gentoo.org/~xgqt/distfiles/repackaged/${P}.tar.xz"
KEYWORDS="amd64 ~arm ~arm64 ppc ~riscv x86"
fi
LICENSE="GPL-3+ FDL-1.3+ CC-BY-SA-3.0 odt-schema? ( OASIS-Open )"
SLOT="0"
IUSE="doc odt-schema"
BDEPEND="
doc? (
virtual/texi2dvi
)
"
DOCS=( README.org CONTRIBUTE.org etc/ORG-NEWS )
SITEFILE="50${PN}-gentoo.el"
src_prepare() {
elisp_src_prepare
# Remove failing tests.
rm testing/lisp/test-{ob{,-exp,-tangle,-shell},org-clock,ox-icalendar}.el \
|| die "failed to remove some test files"
}
src_configure() {
elisp_src_configure
if use doc ; then
DOCS+=( doc/org.pdf doc/orgcard.pdf doc/orgguide.pdf )
fi
EMAKEARGS=(
ORGVERSION="${PV}"
ETCDIRS="styles csl $(usev odt-schema schema)"
lispdir="${EPREFIX}${SITELISP}/${PN}"
datadir="${EPREFIX}${SITEETC}/${PN}"
infodir="${EPREFIX}/usr/share/info"
)
}
src_compile() {
emake -j1 "${EMAKEARGS[@]}"
if use doc ; then
emake -j1 pdf
emake -j1 card
fi
}
src_test() {
local -x LANG="C"
emake -j1 "${EMAKEARGS[@]}" TEST_NO_AUTOCLEAN="TRUE" test-dirty
}
src_install() {
emake -j1 "${EMAKEARGS[@]}" DESTDIR="${D}" install
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
einstalldocs
local DOC_CONTENTS="Org mode has a large variety of run-time dependencies,
so you may have to install one or more additional packages.
A non-exhaustive list of these dependencies may be found at
<http://orgmode.org/worg/org-dependencies.html>."
readme.gentoo_create_doc
}
|