pystring, bump version (#10608)

This commit is contained in:
Schrijvers Luc
2024-06-18 17:08:43 +02:00
committed by GitHub
parent 90e44ad9f6
commit f8951b7064
3 changed files with 47 additions and 94 deletions

View File

@@ -1,81 +0,0 @@
From 754fcd9ebc523d3d4de39b9d0e443841a717e1c0 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Wed, 14 Jul 2021 19:21:21 +0000
Subject: Import open PR from https://github.com/imageworks/pystring/pull/29
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@")
--
2.30.2

View File

@@ -0,0 +1,39 @@
From ded9c50841ff5383ab61ccbf15a49ebf4575ea7b Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Tue, 18 Jun 2024 16:37:59 +0200
Subject: applying patch cmake-project-version.patch
https://src.fedoraproject.org/rpms/pystring/blob/rawhide/f/cmake-project-version.patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fed418f..e877cd6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.2)
-project(pystring CXX)
+project(pystring VERSION 1.1.4 LANGUAGES CXX)
set(BUILD_SHARED_LIBS YES)
@@ -7,6 +7,10 @@ add_library(pystring
pystring.cpp
pystring.h
)
+set_target_properties(pystring PROPERTIES
+ PUBLIC_HEADER "pystring.h"
+ VERSION ${PROJECT_VERSION}
+)
add_executable (pystring_test test.cpp)
TARGET_LINK_LIBRARIES (pystring_test pystring)
@@ -18,5 +22,6 @@ include(GNUInstallDirs)
install(TARGETS pystring
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
--
2.45.1

View File

@@ -12,25 +12,21 @@ included to match python interfaces.
Note: Despite the infrequent updates, this repo is not dead/abandoned - just \
stable! We use it every day at Imageworks."
HOMEPAGE="http://opensource.imageworks.com/"
COPYRIGHT="2008-2010 Sony Pictures Imageworks Inc"
COPYRIGHT="2008-present Contributors to the Pystring project"
LICENSE="BSD (3-clause)"
REVISION="1"
srcGitRev="281419de2f91f9e0f2df6acddfea3b06a43436be"
SOURCE_URI="https://github.com/imageworks/pystring/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="46161e75f85a3e8867233aebb6f4399f405c565db76dc07731a7ef662459609d"
SOURCE_FILENAME="pystring-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="pystring-$srcGitRev"
SOURCE_URI="https://github.com/imageworks/pystring/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="49da0fe2a049340d3c45cce530df63a2278af936003642330287b68cefd788fb"
SOURCE_FILENAME="pystring-v$portVersion.tar.gz"
SOURCE_DIR="pystring-$portVersion"
PATCHES="pystring-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="0.0"
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
PROVIDES="
pystring$secondaryArchSuffix = $portVersion
lib:libpystring$secondaryArchSuffix = $libVersionCompat
lib:libpystring$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -38,7 +34,7 @@ REQUIRES="
PROVIDES_devel="
pystring${secondaryArchSuffix}_devel = $portVersion
devel:libpystring$secondaryArchSuffix = $libVersionCompat
devel:libpystring$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
pystring$secondaryArchSuffix == $portVersion base
@@ -70,8 +66,7 @@ INSTALL()
prepareInstalledDevelLib \
libpystring
packageEntries devel \
$developDir \
$libDir/cmake
$developDir
}
TEST()