public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/simpleini] epel8: Use libicu for charset conversion by default
@ 2026-11-23 17:10 Zephyr Lykos
0 siblings, 0 replies; only message in thread
From: Zephyr Lykos @ 2026-11-23 17:10 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/simpleini
Branch : epel8
Commit : 22e57b368fdaa2cc134ea45119ace7bdb2c1cf2b
Author : Zephyr Lykos <git@mochaa.ws>
Date : 2024-04-30T22:09:17+08:00
Stats : +109/-4 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/simpleini/c/22e57b368fdaa2cc134ea45119ace7bdb2c1cf2b?branch=epel8
Log:
Use libicu for charset conversion by default
---
diff --git a/.gitignore b/.gitignore
index 5c22a65..04234e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-/simpleini-4.22.tar.gz
-/aeacf861a8ad8add5f4974792a88ffea393e41db.patch
+/simpleini-*.tar.gz
diff --git a/0001-cmake-fix-namespace-and-include-dir-74.patch b/0001-cmake-fix-namespace-and-include-dir-74.patch
new file mode 100644
index 0000000..91d8da9
--- /dev/null
+++ b/0001-cmake-fix-namespace-and-include-dir-74.patch
@@ -0,0 +1,44 @@
+From aeacf861a8ad8add5f4974792a88ffea393e41db Mon Sep 17 00:00:00 2001
+From: Alexandre Bouvier <contact@amb.tf>
+Date: Tue, 2 Jan 2024 08:42:03 +0100
+Subject: [PATCH] cmake: fix namespace and include dir (#74)
+
+---
+ CMakeLists.txt | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f09295..7804947 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,7 +48,7 @@ configure_package_config_file(${PROJECT_NAME}Config.cmake.in
+ )
+
+ install(FILES SimpleIni.h
+- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+
+ install(TARGETS ${PROJECT_NAME}
+@@ -62,12 +62,15 @@ install(FILES
+ )
+ install(EXPORT ${PROJECT_NAME}Targets
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}
+- NAMESPACE EXPORT_NAMESPACE
++ NAMESPACE ${EXPORT_NAMESPACE}
+ )
+
+-target_include_directories(${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
++target_include_directories(${PROJECT_NAME} INTERFACE
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
++ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
++)
+
+ if(IS_TOPLEVEL_PROJECT)
+- enable_testing()
++ include(CTest)
+ add_subdirectory(tests)
+ endif()
+--
+2.44.0
+
diff --git a/0001-convert-use-libicu-by-default.patch b/0001-convert-use-libicu-by-default.patch
new file mode 100644
index 0000000..19a02f9
--- /dev/null
+++ b/0001-convert-use-libicu-by-default.patch
@@ -0,0 +1,59 @@
+From 1b5b5c5b120404000b09a687aba045810a62f399 Mon Sep 17 00:00:00 2001
+From: Zephyr Lykos <git@mochaa.ws>
+Date: Tue, 30 Apr 2024 21:46:45 +0800
+Subject: [PATCH] convert: use libicu by default
+
+---
+ CMakeLists.txt | 5 ++++-
+ SimpleIni.h | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4b360ad..540978a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,6 +15,8 @@ endif()
+
+ option(SIMPLEINI_USE_SYSTEM_GTEST "Use system GoogleTest dependency" OFF)
+
++find_package(ICU COMPONENTS uc REQUIRED)
++
+ # Disable in-source builds:
+ get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
+ get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
+@@ -32,7 +34,8 @@ endif()
+ set(EXPORT_NAMESPACE "${PROJECT_NAME}::")
+ set(HEADERS SimpleIni.h)
+
+-add_library(${PROJECT_NAME} INTERFACE)
++add_library(${PROJECT_NAME} INTERFACE ${HEADERS})
++target_link_libraries(${PROJECT_NAME} INTERFACE ICU::uc)
+ add_library(${EXPORT_NAMESPACE}${PROJECT_NAME} ALIAS ${PROJECT_NAME})
+
+ include(GNUInstallDirs)
+diff --git a/SimpleIni.h b/SimpleIni.h
+index 1f0c0ae..ed82555 100644
+--- a/SimpleIni.h
++++ b/SimpleIni.h
+@@ -2844,7 +2844,7 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::DeleteString(
+ # ifdef _WIN32
+ # define SI_CONVERT_WIN32
+ # else
+-# define SI_CONVERT_GENERIC
++# define SI_CONVERT_ICU
+ # endif
+ #endif
+
+@@ -3012,6 +3012,9 @@ public:
+ // ---------------------------------------------------------------------------
+ #ifdef SI_CONVERT_GENERIC
+
++#pragma warning ("SI_CONVERT_GENERIC isn't available on Fedora by default.")
++#pragma message ("Supply ConvertUTF.h/.c yourself, and optionally not linking to ICU.")
++
+ #define SI_Case SI_GenericCase
+ #define SI_NoCase SI_GenericNoCase
+
+--
+2.44.0
+
diff --git a/simpleini.spec b/simpleini.spec
index df11e4d..6823386 100644
--- a/simpleini.spec
+++ b/simpleini.spec
@@ -12,11 +12,14 @@ License: MIT
URL: %{forgeurl}
Source0: %{forgesource}
-Patch0: https://github.com/brofield/simpleini/commit/aeacf861a8ad8add5f4974792a88ffea393e41db.patch
+# https://github.com/brofield/simpleini/pull/74
+Patch0: 0001-cmake-fix-namespace-and-include-dir-74.patch
+Patch1: 0001-convert-use-libicu-by-default.patch
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: cmake(GTest)
+BuildRequires: libicu-devel
%description
simpleini is a cross-platform library that provides a simple API to read and
@@ -28,6 +31,7 @@ MIT licence.
%package devel
Summary: Development files for %{name}
Provides: %{name}-static = %{version}-%{release}
+Requires: libicu-devel
%description devel
The %{name}-devel package contains development files for %{name}.
diff --git a/sources b/sources
index b0938f5..b5d244c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
SHA512 (simpleini-4.22.tar.gz) = 6c198636816a0018adbf7f735d402c64245c6fcd540b7360d4388d46f007f3a520686cdaec4705cb8cb31401b2cb4797a80b42ea5d08a6a5807c0848386f7ca1
-SHA512 (aeacf861a8ad8add5f4974792a88ffea393e41db.patch) = 47d36acfc954008d735b74969ad4d93fa54bbbb29922831aecb6377876968a9accf98411fd4345bd87afecf41f19e2ca2eb5af8fa764a5a314a1fc6be6033fe8
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 17:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 17:10 [rpms/simpleini] epel8: Use libicu for charset conversion by default Zephyr Lykos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox