Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/ctemplate/
Date: Sat, 15 Aug 2020 09:18:55
Message-Id: 1597483125.6edb36fe4a355040798286c0f05956d1083f1ed7.graaff@gentoo
1 commit: 6edb36fe4a355040798286c0f05956d1083f1ed7
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 15 09:18:27 2020 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 15 09:18:45 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6edb36fe
7
8 dev-cpp/ctemplate: add 2.4
9
10 This version uses python 3.
11
12 Closes: https://bugs.gentoo.org/735266
13 Package-Manager: Portage-2.3.103, Repoman-2.3.23
14 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
15
16 dev-cpp/ctemplate/Manifest | 1 +
17 dev-cpp/ctemplate/ctemplate-2.4.ebuild | 76 ++++++++++++++++++++++++++++++++++
18 2 files changed, 77 insertions(+)
19
20 diff --git a/dev-cpp/ctemplate/Manifest b/dev-cpp/ctemplate/Manifest
21 index 74737dea1ac..184cb62669c 100644
22 --- a/dev-cpp/ctemplate/Manifest
23 +++ b/dev-cpp/ctemplate/Manifest
24 @@ -1 +1,2 @@
25 DIST ctemplate-2.3.tar.bz2 564389 BLAKE2B e0c95ac534eb0b7fdff3e87e08f3b1b8aa735bec8eef05bebcf87a51375cbc93e768a18ba005248edda023869b21679dbadaf3d6462e71666fa5d85b96172851 SHA512 546645389a8bfed59686b62b43cb7d53714ac98e1b75311c217bb0f3b6201d5d486766b1ce7e35bf15032372e45c36b27008f54085bd0c9ef0dd0b7e04b8e3f5
26 +DIST ctemplate-2.4.tar.gz 391923 BLAKE2B 96b585ed6ca323fc461857e1f2f381e0ca5c229d8c6039c24efcf34fb9ddf45cc36bef141af337e591e1cdd95ca510ea5ba1e539554322c578c25187b1906195 SHA512 4955489e7327bce18802d50fd9dfc8ac12af685e556d1c9d0eb2b7a2f4a9b6086e30be8388d694ec8912623738973d0c76e9ca97196c63c139ee5b468d4858b7
27
28 diff --git a/dev-cpp/ctemplate/ctemplate-2.4.ebuild b/dev-cpp/ctemplate/ctemplate-2.4.ebuild
29 new file mode 100644
30 index 00000000000..da3638b6c1e
31 --- /dev/null
32 +++ b/dev-cpp/ctemplate/ctemplate-2.4.ebuild
33 @@ -0,0 +1,76 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{6,7,8} )
40 +
41 +inherit autotools elisp-common python-any-r1
42 +
43 +DESCRIPTION="A simple but powerful template language for C++"
44 +HOMEPAGE="https://github.com/olafvdspek/ctemplate"
45 +SRC_URI="https://github.com/OlafvdSpek/ctemplate/archive/${P}.tar.gz"
46 +S="${WORKDIR}/ctemplate-${P}"
47 +
48 +LICENSE="BSD"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
51 +IUSE="doc emacs vim-syntax static-libs test"
52 +
53 +DEPEND="test? ( ${PYTHON_DEPS} )"
54 +RDEPEND="
55 + emacs? ( >=app-editors/emacs-23.1:* )
56 + vim-syntax? ( >=app-editors/vim-core-7 )"
57 +
58 +SITEFILE="70ctemplate-gentoo.el"
59 +
60 +# Some tests are broken in 2.3
61 +RESTRICT="test"
62 +
63 +src_prepare() {
64 + default
65 + eautoreconf
66 +}
67 +
68 +src_configure() {
69 + econf $(use_enable static-libs static)
70 +}
71 +
72 +src_compile() {
73 + default
74 +
75 + if use emacs; then
76 + elisp-compile contrib/tpl-mode.el
77 + fi
78 +}
79 +
80 +src_install() {
81 + default
82 + if ! use doc; then
83 + rm -r "${ED%/}"/usr/share/doc/${PF}/html || die
84 + fi
85 +
86 + if use vim-syntax; then
87 + cd "${S}/contrib" || die
88 + sh highlighting.vim || die "unpacking vim scripts failed"
89 + insinto /usr/share/vim/vimfiles
90 + doins -r .vim/.
91 + fi
92 +
93 + if use emacs; then
94 + cd "${S}/contrib" || die
95 + elisp-install ${PN} tpl-mode.el tpl-mode.elc
96 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
97 + fi
98 +
99 + # package provides .pc files
100 + find "${D}" -name '*.la' -delete || die
101 +}
102 +
103 +pkg_postinst() {
104 + use emacs && elisp-site-regen
105 +}
106 +
107 +pkg_postrm() {
108 + use emacs && elisp-site-regen
109 +}