Gentoo Archives: gentoo-commits

From: Jian Lin <jlin.gentoo@×××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-cpp/pcg-cpp/, dev-cpp/pcg-cpp/files/
Date: Thu, 01 Jul 2021 05:20:31
Message-Id: 1625115506.8f70aa7e7a6f9beead1d2ebcb31235af8621a0ba.jian@gentoo
1 commit: 8f70aa7e7a6f9beead1d2ebcb31235af8621a0ba
2 Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Sun Jun 27 09:37:24 2021 +0000
4 Commit: Jian Lin <jlin.gentoo <AT> outlook <DOT> com>
5 CommitDate: Thu Jul 1 04:58:26 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8f70aa7e
7
8 dev-cpp/pcg-cpp: add .pc file + examples use flag
9
10 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
11
12 dev-cpp/pcg-cpp/files/pcg-cpp.pc | 9 ++++++++
13 dev-cpp/pcg-cpp/metadata.xml | 1 +
14 ...6.ebuild => pcg-cpp-0.98.1_p20210406-r1.ebuild} | 24 +++++++++++++---------
15 3 files changed, 24 insertions(+), 10 deletions(-)
16
17 diff --git a/dev-cpp/pcg-cpp/files/pcg-cpp.pc b/dev-cpp/pcg-cpp/files/pcg-cpp.pc
18 new file mode 100644
19 index 000000000..b289efc01
20 --- /dev/null
21 +++ b/dev-cpp/pcg-cpp/files/pcg-cpp.pc
22 @@ -0,0 +1,9 @@
23 +prefix=@PREFIX@
24 +exec_prefix=${prefix}
25 +includedir=${prefix}/include
26 +
27 +Name: pcg-cpp
28 +Description: Family of better random number generators
29 +URL: https://www.pcg-random.org
30 +Version: 0.98.1
31 +Cflags: -I${includedir}
32
33 diff --git a/dev-cpp/pcg-cpp/metadata.xml b/dev-cpp/pcg-cpp/metadata.xml
34 index 8f65b2c6a..48ce5f492 100644
35 --- a/dev-cpp/pcg-cpp/metadata.xml
36 +++ b/dev-cpp/pcg-cpp/metadata.xml
37 @@ -4,6 +4,7 @@
38 <upstream>
39 <remote-id type="github">mneme/pcg-cpp</remote-id>
40 <bugs-to>https://github.com/imneme/pcg-cpp/issues</bugs-to>
41 + <doc>https://www.pcg-random.org/using-pcg-cpp.html</doc>
42 </upstream>
43 <maintainer type="person">
44 <email>cyber+gentoo@×××××.in</email>
45
46 diff --git a/dev-cpp/pcg-cpp/pcg-cpp-0.98.1_p20210406.ebuild b/dev-cpp/pcg-cpp/pcg-cpp-0.98.1_p20210406-r1.ebuild
47 similarity index 64%
48 rename from dev-cpp/pcg-cpp/pcg-cpp-0.98.1_p20210406.ebuild
49 rename to dev-cpp/pcg-cpp/pcg-cpp-0.98.1_p20210406-r1.ebuild
50 index 1687284f6..c6afd3086 100644
51 --- a/dev-cpp/pcg-cpp/pcg-cpp-0.98.1_p20210406.ebuild
52 +++ b/dev-cpp/pcg-cpp/pcg-cpp-0.98.1_p20210406-r1.ebuild
53 @@ -1,9 +1,9 @@
54 # Copyright 2021 Gentoo Authors
55 # Distributed under the terms of the GNU General Public License v2
56
57 -EAPI=7
58 +EAPI=8
59
60 -inherit toolchain-funcs
61 +inherit multilib toolchain-funcs
62
63 COMMIT="ffd522e7188bef30a00c74dc7eb9de5faff90092"
64 DESCRIPTION="Family of better random number generators"
65 @@ -14,15 +14,10 @@ S="${WORKDIR}/${PN}-${COMMIT}"
66 LICENSE="|| ( Apache-2.0 MIT )"
67 SLOT="0"
68 KEYWORDS="~amd64 ~x86"
69 -IUSE="test"
70 +IUSE="examples test"
71 RESTRICT="!test? ( test )"
72
73 -src_prepare() {
74 - default
75 - sed "s/install: all/install:/" -i Makefile || die
76 -}
77 -
78 -# this code installs only headers
79 +# header-only library
80 src_compile() {
81 tc-export CXX
82 if use test ; then
83 @@ -37,5 +32,14 @@ src_test() {
84 }
85
86 src_install() {
87 - emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
88 + doheader include/*
89 +
90 + docompress -x /usr/share/doc/${PF}/sample
91 + use examples && dodoc -r sample
92 + einstalldocs
93 +
94 + insinto /usr/$(get_libdir)/pkgconfig
95 + doins "${FILESDIR}"/pcg-cpp.pc
96 + sed -e "s:@PREFIX@:${EPREFIX}/usr:" \
97 + -i "${ED}"/usr/$(get_libdir)/pkgconfig/pcg-cpp.pc || die
98 }