Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tree/, dev-cpp/tree/files/
Date: Sat, 14 Dec 2019 21:17:05
Message-Id: 1576358201.e047bed35a8f1071bdd77c503d573e0cb3c82264.soap@gentoo
1 commit: e047bed35a8f1071bdd77c503d573e0cb3c82264
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 14 21:16:41 2019 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 14 21:16:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e047bed3
7
8 dev-cpp/tree: Port to EAPI 7
9
10 Package-Manager: Portage-2.3.81, Repoman-2.3.20
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 dev-cpp/tree/files/tree-2.62-test.patch | 17 ----------------
14 dev-cpp/tree/files/tree-2.81-test.patch | 36 +++++++++++++++++++++++++++++++++
15 dev-cpp/tree/tree-2.81.ebuild | 35 +++++++++++++++-----------------
16 3 files changed, 52 insertions(+), 36 deletions(-)
17
18 diff --git a/dev-cpp/tree/files/tree-2.62-test.patch b/dev-cpp/tree/files/tree-2.62-test.patch
19 deleted file mode 100644
20 index f7022426698..00000000000
21 --- a/dev-cpp/tree/files/tree-2.62-test.patch
22 +++ /dev/null
23 @@ -1,17 +0,0 @@
24 ---- test_tree.output 2008-08-28 11:16:11.000000000 +0100
25 -+++ test_tree.output.new 2009-04-15 19:06:53.174832287 +0100
26 -@@ -1,3 +1,8 @@
27 -+-----
28 -+hi
29 -+ 1
30 -+ 0
31 -+-----
32 - empty tree to begin with:
33 - 0
34 - 'more text' is sibling 2 in its sibling range
35 -@@ -309,3 +314,5 @@
36 - D
37 - I
38 - -----
39 -+G
40 -+H
41
42 diff --git a/dev-cpp/tree/files/tree-2.81-test.patch b/dev-cpp/tree/files/tree-2.81-test.patch
43 new file mode 100644
44 index 00000000000..c9e675dc795
45 --- /dev/null
46 +++ b/dev-cpp/tree/files/tree-2.81-test.patch
47 @@ -0,0 +1,36 @@
48 +--- a/Makefile
49 ++++ b/Makefile
50 +@@ -1,13 +1,6 @@
51 +-
52 +-%.o: %.cc
53 +- g++ -c -I. $^
54 +-
55 +-test1: test1.o
56 +- g++ -o test1 test1.o
57 +-
58 +-run_tests: test1 test1.req
59 +- ./test1 > test1.res
60 +- @diff test1.res test1.req
61 ++check: test_tree
62 ++ ./test_tree > mytest.output && \
63 ++ diff -Nu test_tree.output mytest.output
64 + @echo "*** All tests OK ***"
65 +
66 + clean:
67 +--- a/test_tree.output
68 ++++ b/test_tree.output
69 +@@ -1,3 +1,8 @@
70 ++-----
71 ++hi
72 ++ 1
73 ++ 0
74 ++-----
75 + empty tree to begin with:
76 + 0
77 + 'more text' is sibling 2 in its sibling range
78 +@@ -309,3 +314,5 @@
79 + D
80 + I
81 + -----
82 ++G
83 ++H
84
85 diff --git a/dev-cpp/tree/tree-2.81.ebuild b/dev-cpp/tree/tree-2.81.ebuild
86 index db3b12d4964..cce24586ed8 100644
87 --- a/dev-cpp/tree/tree-2.81.ebuild
88 +++ b/dev-cpp/tree/tree-2.81.ebuild
89 @@ -1,9 +1,9 @@
90 -# Copyright 1999-2017 Gentoo Foundation
91 +# Copyright 1999-2019 Gentoo Authors
92 # Distributed under the terms of the GNU General Public License v2
93
94 -EAPI=4
95 +EAPI=7
96
97 -inherit eutils toolchain-funcs
98 +inherit toolchain-funcs
99
100 DESCRIPTION="An STL-like tree class"
101 HOMEPAGE="http://www.aei.mpg.de/~peekas/tree/"
102 @@ -14,28 +14,25 @@ SLOT="0"
103 KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
104 IUSE="doc"
105
106 -S="${S}"/src
107 +S="${WORKDIR}/${P}/src"
108
109 -src_prepare() {
110 - rm Makefile || die
111 - epatch "${FILESDIR}"/${PN}-2.62-test.patch
112 -}
113 -
114 -src_test() {
115 - local test
116 - test="$(tc-getCXX) ${CXXFLAGS} ${LDAFLAGS} test_tree.cc -o test_tree"
117 +PATCHES=( "${FILESDIR}"/${P}-test.patch )
118
119 - echo ${test}
120 - eval ${test} || die "compile test failed"
121 - ./test_tree > mytest.output || die "running test failed"
122 - diff -Nu test_tree.output mytest.output || die "test dist failed"
123 +src_configure() {
124 + tc-export CXX
125 }
126
127 src_install() {
128 - insinto /usr/include
129 - doins tree.hh tree_util.hh
130 + doheader tree.hh tree_util.hh
131 dodoc tree_example.cc
132 +
133 if use doc; then
134 - dohtml "${S}"/../doc/*
135 + dodoc ../doc/treefig.*
136 + rm ../doc/treefig.* || die
137 +
138 + docinto html
139 + rm ../doc/{doxygen_tree.config,favicon.ico,tree.tex} || die
140 + dodoc -r ../doc/.
141 fi
142 + docompress -x /usr/share/doc/${PF}
143 }