summaryrefslogtreecommitdiff
path: root/dev-cpp/ctemplate/ctemplate-2.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-cpp/ctemplate/ctemplate-2.4.ebuild
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-cpp/ctemplate/ctemplate-2.4.ebuild')
-rw-r--r--dev-cpp/ctemplate/ctemplate-2.4.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-cpp/ctemplate/ctemplate-2.4.ebuild b/dev-cpp/ctemplate/ctemplate-2.4.ebuild
new file mode 100644
index 000000000000..7d1ec59b62d8
--- /dev/null
+++ b/dev-cpp/ctemplate/ctemplate-2.4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit autotools elisp-common python-any-r1
+
+DESCRIPTION="A simple but powerful template language for C++"
+HOMEPAGE="https://github.com/olafvdspek/ctemplate"
+SRC_URI="https://github.com/OlafvdSpek/ctemplate/archive/${P}.tar.gz"
+S="${WORKDIR}/ctemplate-${P}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc emacs vim-syntax static-libs test"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
+RDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+ vim-syntax? ( >=app-editors/vim-core-7 )"
+
+SITEFILE="70ctemplate-gentoo.el"
+
+# Some tests are broken in 2.3
+RESTRICT="test"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use emacs; then
+ elisp-compile contrib/tpl-mode.el
+ fi
+}
+
+src_install() {
+ default
+ if ! use doc; then
+ rm -r "${ED}"/usr/share/doc/${PF}/html || die
+ fi
+
+ if use vim-syntax; then
+ cd "${S}/contrib" || die
+ sh highlighting.vim || die "unpacking vim scripts failed"
+ insinto /usr/share/vim/vimfiles
+ doins -r .vim/.
+ fi
+
+ if use emacs; then
+ cd "${S}/contrib" || die
+ elisp-install ${PN} tpl-mode.el tpl-mode.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ # package provides .pc files
+ find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}