summaryrefslogtreecommitdiff
path: root/dev-cpp/ctemplate
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-cpp/ctemplate
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-cpp/ctemplate')
-rw-r--r--dev-cpp/ctemplate/Manifest5
-rw-r--r--dev-cpp/ctemplate/ctemplate-2.3-r1.ebuild77
-rw-r--r--dev-cpp/ctemplate/files/70ctemplate-gentoo.el7
-rw-r--r--dev-cpp/ctemplate/files/ctemplate-2.3-fix-build-system.patch29
-rw-r--r--dev-cpp/ctemplate/metadata.xml12
5 files changed, 130 insertions, 0 deletions
diff --git a/dev-cpp/ctemplate/Manifest b/dev-cpp/ctemplate/Manifest
new file mode 100644
index 000000000000..a4ad064508dd
--- /dev/null
+++ b/dev-cpp/ctemplate/Manifest
@@ -0,0 +1,5 @@
+AUX 70ctemplate-gentoo.el 282 BLAKE2B 6004cc2b2e543f47c0c808bf494160c4b7e7e4768a954c1b0d99bc065a89145875dfc2b1e386bdf3a5e4dbb375a0bf5badc45b1666320f2a00fa8bd108f16c09 SHA512 36bc5424cb6dce40026f1d08b8764bf43d42159ff20e7d81484f5baf1c1e3c2042c12b1a60fc3cef48e297e816a12dbc41169988a6537ee41a2e2528b3c834a3
+AUX ctemplate-2.3-fix-build-system.patch 1196 BLAKE2B db2efeaaae0a33b33bf81c6b968b809e31dfdf91ab5adb2a9851748c01a883e19a4b590002c20ca13e517c142264b8361fd6e5f3582a3650388bc4e0a5d6340d SHA512 4402af1034780d00f733231d9ce534cf54a4474a1153bc534274bc2f5163aba8b39e2ad7613151ffd34f3b7d4ba1d3a0c51badf8f1712aea6a1b65d963e3bea4
+DIST ctemplate-2.3.tar.bz2 564389 BLAKE2B e0c95ac534eb0b7fdff3e87e08f3b1b8aa735bec8eef05bebcf87a51375cbc93e768a18ba005248edda023869b21679dbadaf3d6462e71666fa5d85b96172851 SHA512 546645389a8bfed59686b62b43cb7d53714ac98e1b75311c217bb0f3b6201d5d486766b1ce7e35bf15032372e45c36b27008f54085bd0c9ef0dd0b7e04b8e3f5
+EBUILD ctemplate-2.3-r1.ebuild 1533 BLAKE2B 598894d1f1daaeef3ac7549454dda62c80822bbe33a5c725b2e104ae7edef09c4703015fe4cddd1cd1e71aa9eff07a59c4b2330d553b63d9fdc6622bb294060f SHA512 8e338af1b10165d16b113eb008f744ff96d68e4f242efa6aea3abe0add00526095ee7055e2b832f012042d182e573c4b3811c8974e33fb621935cdfbcd52ea63
+MISC metadata.xml 395 BLAKE2B 5a8e6c489e65ef8e9ee930a2e1bedcd7bb76f34f6c017b7b17993b8e5b8502ae15bd36c7f5508ea836d9a54b67ef8155810465b36b31d1813a816f552ed51345 SHA512 5b2ac214c10f83e739157b6530e9d19f9197eef74261f9581aa3861f0e7480e5476e6265c1769d0e944b434a78c8a17dc286918665e261757b79127d2f55b93a
diff --git a/dev-cpp/ctemplate/ctemplate-2.3-r1.ebuild b/dev-cpp/ctemplate/ctemplate-2.3-r1.ebuild
new file mode 100644
index 000000000000..a578d0f6a249
--- /dev/null
+++ b/dev-cpp/ctemplate/ctemplate-2.3-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+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://dev.gentoo.org/~pinkbyte/distfiles/${P}.tar.bz2"
+
+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? ( virtual/emacs )
+ vim-syntax? ( >=app-editors/vim-core-7 )"
+
+SITEFILE="70ctemplate-gentoo.el"
+
+# Some tests are broken in 2.3
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.3-fix-build-system.patch )
+
+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
+}
diff --git a/dev-cpp/ctemplate/files/70ctemplate-gentoo.el b/dev-cpp/ctemplate/files/70ctemplate-gentoo.el
new file mode 100644
index 000000000000..a7fce964c3e4
--- /dev/null
+++ b/dev-cpp/ctemplate/files/70ctemplate-gentoo.el
@@ -0,0 +1,7 @@
+;;; ctemplate site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+
+(setq auto-mode-alist (cons '("\\.tpl$" . tpl-mode) auto-mode-alist))
+(autoload 'tpl-mode "tpl-mode" "Major mode for editing CTemplate files." t)
+(add-hook 'tpl-mode-hook '(lambda () (font-lock-mode 1)))
diff --git a/dev-cpp/ctemplate/files/ctemplate-2.3-fix-build-system.patch b/dev-cpp/ctemplate/files/ctemplate-2.3-fix-build-system.patch
new file mode 100644
index 000000000000..4178f5ed3655
--- /dev/null
+++ b/dev-cpp/ctemplate/files/ctemplate-2.3-fix-build-system.patch
@@ -0,0 +1,29 @@
+* Do not override $(docdir) as userflag in the GNU conventions
+* Only build tests programs when running 'make check'
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -54,12 +54,11 @@
+ src/ctemplate/per_expand_data.h.in \
+ src/ctemplate/str_ref.h.in
+
+-docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
+ ## This is for HTML and other documentation you want to install.
+ ## Add your documentation files (in doc/) in addition to these
+ ## top-level boilerplate files. Also add a TODO file if you have one.
+-dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README README_windows.txt \
+- doc/designstyle.css doc/index.html \
++dist_doc_DATA = AUTHORS ChangeLog NEWS README README_windows.txt
++dist_html_DATA = doc/designstyle.css doc/index.html \
+ doc/howto.html doc/guide.html doc/reference.html \
+ doc/tips.html doc/example.html doc/auto_escape.html \
+ doc/xss_resources.html
+@@ -452,7 +451,7 @@
+
+ ## This should always include $(TESTS), but may also include other
+ ## binaries that you compile but don't want automatically installed.
+-noinst_PROGRAMS = $(TESTS)
++check_PROGRAMS = $(TESTS)
+
+ rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
+ @cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
diff --git a/dev-cpp/ctemplate/metadata.xml b/dev-cpp/ctemplate/metadata.xml
new file mode 100644
index 000000000000..02bed0f21004
--- /dev/null
+++ b/dev-cpp/ctemplate/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cpp@gentoo.org</email>
+ <name>Gentoo C++ Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">google-ctemplate</remote-id>
+ <remote-id type="github">olafvdspek/ctemplate</remote-id>
+ </upstream>
+</pkgmetadata>