From ee0817a5da62065080ffdcb6af7ee5e09b321501 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sat, 19 Jun 2021 02:26:08 +0200 Subject: [PATCH] dev-cpp/dtl: initial import Signed-off-by: Alessandro Barbieri --- dev-cpp/dtl/Manifest | 1 + dev-cpp/dtl/dtl-1.19_p20210531.ebuild | 57 +++++++++++++++++++ .../dtl-1.19_p20210531-do-not-append-O2.patch | 11 ++++ dev-cpp/dtl/metadata.xml | 8 +++ 4 files changed, 77 insertions(+) create mode 100644 dev-cpp/dtl/Manifest create mode 100644 dev-cpp/dtl/dtl-1.19_p20210531.ebuild create mode 100644 dev-cpp/dtl/files/dtl-1.19_p20210531-do-not-append-O2.patch create mode 100644 dev-cpp/dtl/metadata.xml diff --git a/dev-cpp/dtl/Manifest b/dev-cpp/dtl/Manifest new file mode 100644 index 0000000000..1bfa96ce00 --- /dev/null +++ b/dev-cpp/dtl/Manifest @@ -0,0 +1 @@ +DIST dtl-1.19_p20210531.tar.gz 26011 BLAKE2B 1ac4194cf536c072c45c2e2da0f0fd26232a5bf2e7aa57e8323457b5d43222df6a8579a41e54cd941cc69e013d4dac9fd051ad33950ed89692629ef57564a5f6 SHA512 2ac1f3d9871ed39f4183ebf0d9d8a1381ef2dacc3677f525d025eb292fbf4676a5a67abe34dfa1ff12bdb66e0fa71a83b8a99130e2e8048e08d3392327e84a9a diff --git a/dev-cpp/dtl/dtl-1.19_p20210531.ebuild b/dev-cpp/dtl/dtl-1.19_p20210531.ebuild new file mode 100644 index 0000000000..d48ee9892d --- /dev/null +++ b/dev-cpp/dtl/dtl-1.19_p20210531.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +COMMIT="18e674e4a6fdc8c22534a207ff7812ed932a5e61" +PYTHON_COMPAT=( python3_{8..9} pypy3 ) + +inherit python-any-r1 scons-utils toolchain-funcs + +DESCRIPTION="diff template library written by C++" +HOMEPAGE="https://github.com/cubicdaiya/dtl" +SRC_URI="https://github.com/cubicdaiya/dtl/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="examples test" +RESTRICT="!test? ( test )" + +DEPEND=" + test? ( + dev-cpp/gtest + ) +" + +PATCHES=( "${FILESDIR}/${P}-do-not-append-O2.patch" ) + +src_compile() { + escons CC="$(tc-getCC)" + if use test; then + pushd test || die + escons CC="$(tc-getCC)" + popd || die + fi + if use examples; then + pushd examples || die + escons CC="$(tc-getCC)" + popd || die + fi +} + +src_install() { + escons prefix="${T}" install + doheader "${T}/dtl/include"/* + if use examples; then + cd examples || die + rm SConstruct *.o *.cpp *.hpp || die + exeinto /usr/libexec/dtl/examples + doexe * + fi +} + +src_test() { + cd test || die + escons check +} diff --git a/dev-cpp/dtl/files/dtl-1.19_p20210531-do-not-append-O2.patch b/dev-cpp/dtl/files/dtl-1.19_p20210531-do-not-append-O2.patch new file mode 100644 index 0000000000..4b6f99943c --- /dev/null +++ b/dev-cpp/dtl/files/dtl-1.19_p20210531-do-not-append-O2.patch @@ -0,0 +1,11 @@ +--- a/examples/SConstruct ++++ b/examples/SConstruct +@@ -7,7 +7,7 @@ + if debug == 'y' or debug == 'yes': + env.Append(CPPFLAGS = ['-Wall', '-g']) + else: +- env.Append(CPPFLAGS = ['-Wall', '-O2']) ++ env.Append(CPPFLAGS = ['-Wall']) + + if os.sys.platform != "win32": + env.Append(CPPDEFINES = ['HAVE_UNISTD_H']) diff --git a/dev-cpp/dtl/metadata.xml b/dev-cpp/dtl/metadata.xml new file mode 100644 index 0000000000..4f8e72c5c4 --- /dev/null +++ b/dev-cpp/dtl/metadata.xml @@ -0,0 +1,8 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + +