summaryrefslogtreecommitdiff
path: root/dev-cpp/pystring
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /dev-cpp/pystring
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'dev-cpp/pystring')
-rw-r--r--dev-cpp/pystring/Manifest4
-rw-r--r--dev-cpp/pystring/files/cmake.patch84
-rw-r--r--dev-cpp/pystring/metadata.xml15
-rw-r--r--dev-cpp/pystring/pystring-1.1.3-r1.ebuild32
4 files changed, 135 insertions, 0 deletions
diff --git a/dev-cpp/pystring/Manifest b/dev-cpp/pystring/Manifest
new file mode 100644
index 000000000000..346a2edd3360
--- /dev/null
+++ b/dev-cpp/pystring/Manifest
@@ -0,0 +1,4 @@
+AUX cmake.patch 2385 BLAKE2B dc19b5e192b6403c283b89055c5acbf6abc87722a7b76142c5e41dd6a8ba287981bb05337f6f6d775d9b1bf7c92dd602c4f459857570aac44ee5ec05279eeeb9 SHA512 533ef9fc79a48cfd51d4aa3b9ea77da9e25b3024082aaa40388453fb38b24701f20fa0c7c832a254a5ec61e67e77169294808f4dee4f9f573fbb532cfe415ca4
+DIST pystring-1.1.3.tar.gz 18364 BLAKE2B caab1a3b1dc688ad6ecbb32e5e8139bb883a88b78ce8a021229924d57376e94b17d89277e2fccf4f7ec478c81ee9259c5e56848f4388c44b2eab9cfb841bcfb8 SHA512 a46bb2e96d6eb351a4a8097cde46ac2877d28e88f9e57e0ac36c42e8fc8543517c4be70306a01e2f88a891fc53c612494aeb37f47a200d94b8e1b050ed16eff6
+EBUILD pystring-1.1.3-r1.ebuild 726 BLAKE2B 1124ab03be8243542fea5494903a397a938cf2caed7d388e5e1f84dc9b773450493ea346d54d7fcfcf82c06e449da7d1aa9e13fe67191b928bea7c62a5f61d95 SHA512 48c670b2660e257ffad81d20f6286ebd393464ddb5274bc93168a7eacc66b63837768a73f3ef5ea3f083cc182eec457ad3fa4dac545d8ecafc950f43d8ebca28
+MISC metadata.xml 485 BLAKE2B 4e8eec930350b75ccd1f00a9b283827f8e0e1e1ca10db2f35e7e6df1f1eedcefb3c6863fcbcd0d04a9b95a2ded7dff7c5bb230a11c80a0bcbdac99aa852516a1 SHA512 e8cc70cea2e1d991fe7feacccb373e7c2cf1793968c0ac8c229dba0975f8052dde2f3dec34e6f3c118e663451039cf3be1afaaa0a1ca6a7da6463722c52d15f6
diff --git a/dev-cpp/pystring/files/cmake.patch b/dev-cpp/pystring/files/cmake.patch
new file mode 100644
index 000000000000..bd4e01e6658b
--- /dev/null
+++ b/dev-cpp/pystring/files/cmake.patch
@@ -0,0 +1,84 @@
+From 4f653fc35421129eae8a2c424901ca7170059370 Mon Sep 17 00:00:00 2001
+From: Harry Mallon <harry.mallon@codex.online>
+Date: Thu, 15 Apr 2021 15:50:22 +0100
+Subject: [PATCH] Add a CMake configuration
+
+---
+ CMakeLists.txt | 56 +++++++++++++++++++++++++++++++++++
+ cmake/pystringConfig.cmake.in | 4 +++
+ 2 files changed, 60 insertions(+)
+ create mode 100644 CMakeLists.txt
+ create mode 100644 cmake/pystringConfig.cmake.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..0081a83
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,56 @@
++cmake_minimum_required(VERSION 3.2)
++
++option(BUILD_SHARED_LIBS "Create shared libraries if ON" OFF)
++
++project(pystring LANGUAGES CXX)
++
++# pystring library ======
++
++add_library(pystring
++ pystring.cpp
++ pystring.h
++)
++set_target_properties(pystring
++ PROPERTIES
++ PUBLIC_HEADER pystring.h
++ SOVERSION 0.0)
++
++set(EXPORT_NAME "${PROJECT_NAME}Targets")
++set(NAMESPACE "${PROJECT_NAME}::")
++
++# test ======
++
++include(CTest)
++
++if(BUILD_TESTING)
++ add_executable(pystring_test
++ test.cpp
++ unittest.h
++ )
++
++ target_link_libraries(pystring_test pystring)
++
++ add_test(NAME pystring_test COMMAND pystring_test)
++endif()
++
++# install and cmake configs ======
++
++include(GNUInstallDirs)
++install(TARGETS pystring
++ EXPORT "${EXPORT_NAME}"
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pystring)
++
++include(CMakePackageConfigHelpers)
++configure_package_config_file(cmake/pystringConfig.cmake.in
++ ${CMAKE_CURRENT_BINARY_DIR}/pystringConfig.cmake
++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pystring)
++
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pystringConfig.cmake
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pystring)
++
++install(EXPORT "${EXPORT_NAME}"
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pystring
++ NAMESPACE "${NAMESPACE}")
+diff --git a/cmake/pystringConfig.cmake.in b/cmake/pystringConfig.cmake.in
+new file mode 100644
+index 0000000..82e3995
+--- /dev/null
++++ b/cmake/pystringConfig.cmake.in
+@@ -0,0 +1,4 @@
++@PACKAGE_INIT@
++
++include("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@.cmake")
++check_required_components("@PROJECT_NAME@")
diff --git a/dev-cpp/pystring/metadata.xml b/dev-cpp/pystring/metadata.xml
new file mode 100644
index 000000000000..1ce859e3e5b3
--- /dev/null
+++ b/dev-cpp/pystring/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>darkdefende@gmail.com</email>
+ <name>Sebastian Parborg</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">imageworks/pystring</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-cpp/pystring/pystring-1.1.3-r1.ebuild b/dev-cpp/pystring/pystring-1.1.3-r1.ebuild
new file mode 100644
index 000000000000..808484d4a233
--- /dev/null
+++ b/dev-cpp/pystring/pystring-1.1.3-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="C++ functions matching the interface and behavior of python string methods"
+HOMEPAGE="https://github.com/imageworks/pystring"
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/imageworks/pystring.git"
+else
+ SRC_URI="https://github.com/imageworks/pystring/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+BDEPEND="
+ virtual/libc
+ sys-devel/libtool
+"
+RESTRICT="mirror"
+
+LICENSE="BSD"
+SLOT="0"
+
+PATCHES=(
+ # Patch to convert the project into cmake. Taken from:
+ # https://github.com/imageworks/pystring/pull/29
+ "${FILESDIR}/cmake.patch"
+)