Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/pystring/
Date: Thu, 10 Jun 2021 00:51:43
Message-Id: 1623284357.b0aa532afd2954423184d67f407a1e866613b0f2.sam@gentoo
1 commit: b0aa532afd2954423184d67f407a1e866613b0f2
2 Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
3 AuthorDate: Mon May 17 09:03:08 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 10 00:19:17 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0aa532a
7
8 dev-cpp/pystring: New package
9
10 Pystring is a collection of C++ functions which match the interface and
11 behavior of python's string class methods using std::string. Implemented
12 in C++, it does not require or make use of a python interpreter. It
13 provides convenience and familiarity for common string operations not
14 included in the standard C++ library. It's also useful in environments
15 where both C++ and python are used.
16
17 Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
18 Signed-off-by: Sam James <sam <AT> gentoo.org>
19
20 dev-cpp/pystring/Manifest | 1 +
21 dev-cpp/pystring/metadata.xml | 15 ++++++++++++++
22 dev-cpp/pystring/pystring-1.1.3.ebuild | 38 ++++++++++++++++++++++++++++++++++
23 3 files changed, 54 insertions(+)
24
25 diff --git a/dev-cpp/pystring/Manifest b/dev-cpp/pystring/Manifest
26 new file mode 100644
27 index 00000000000..eb3773a17b3
28 --- /dev/null
29 +++ b/dev-cpp/pystring/Manifest
30 @@ -0,0 +1 @@
31 +DIST pystring-1.1.3.tar.gz 18364 BLAKE2B caab1a3b1dc688ad6ecbb32e5e8139bb883a88b78ce8a021229924d57376e94b17d89277e2fccf4f7ec478c81ee9259c5e56848f4388c44b2eab9cfb841bcfb8 SHA512 a46bb2e96d6eb351a4a8097cde46ac2877d28e88f9e57e0ac36c42e8fc8543517c4be70306a01e2f88a891fc53c612494aeb37f47a200d94b8e1b050ed16eff6
32
33 diff --git a/dev-cpp/pystring/metadata.xml b/dev-cpp/pystring/metadata.xml
34 new file mode 100644
35 index 00000000000..1ce859e3e5b
36 --- /dev/null
37 +++ b/dev-cpp/pystring/metadata.xml
38 @@ -0,0 +1,15 @@
39 +<?xml version="1.0" encoding="UTF-8"?>
40 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
41 +<pkgmetadata>
42 + <maintainer type="person" proxied="yes">
43 + <email>darkdefende@×××××.com</email>
44 + <name>Sebastian Parborg</name>
45 + </maintainer>
46 + <maintainer type="project" proxied="proxy">
47 + <email>proxy-maint@g.o</email>
48 + <name>Proxy Maintainers</name>
49 + </maintainer>
50 + <upstream>
51 + <remote-id type="github">imageworks/pystring</remote-id>
52 + </upstream>
53 +</pkgmetadata>
54
55 diff --git a/dev-cpp/pystring/pystring-1.1.3.ebuild b/dev-cpp/pystring/pystring-1.1.3.ebuild
56 new file mode 100644
57 index 00000000000..78410abecfd
58 --- /dev/null
59 +++ b/dev-cpp/pystring/pystring-1.1.3.ebuild
60 @@ -0,0 +1,38 @@
61 +# Copyright 2020-2021 Gentoo Authors
62 +# Distributed under the terms of the GNU General Public License v2
63 +
64 +EAPI=7
65 +
66 +DESCRIPTION="C++ functions matching the interface and behavior of python string methods"
67 +HOMEPAGE="https://github.com/imageworks/pystring"
68 +
69 +if [[ "${PV}" == "9999" ]]; then
70 + inherit git-r3
71 + EGIT_REPO_URI="https://github.com/imageworks/pystring.git"
72 +else
73 + SRC_URI="https://github.com/imageworks/pystring/archive/v${PV}.tar.gz -> ${P}.tar.gz"
74 + KEYWORDS="~amd64"
75 +fi
76 +
77 +BDEPEND="
78 + virtual/libc
79 + sys-devel/libtool
80 +"
81 +RESTRICT="mirror"
82 +
83 +LICENSE="all-rights-reserved"
84 +SLOT="0"
85 +
86 +src_compile() {
87 + sed -i -e "s|-O3|${CXXFLAGS}|g" Makefile || die
88 + emake LIBDIR="${S}" install
89 +
90 + # Fix header location
91 + mkdir ${S}/pystring || die
92 + mv ${S}/pystring.h ${S}/pystring || die
93 +}
94 +
95 +src_install() {
96 + dolib.so ${S}/libpystring.so{,.0{,.0.0}}
97 + doheader -r ${S}/pystring
98 +}