forked from pool/libcomps
Compare commits
45 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 993ef51d6e | |||
| 212b952230 | |||
| 0d8bdd92c9 | |||
| 3300cf1232 | |||
| 29091720cf | |||
| 431237afd2 | |||
| 763a7d9d8a | |||
| 0bd1f56707 | |||
| 05e0bf3cda | |||
| 316cdd693f | |||
| 9f121b3fee | |||
| b3d60a3b26 | |||
| 538ca762a9 | |||
| 081cce3cb6 | |||
| 31df78f30f | |||
| 6648ee9e36 | |||
| d862bdece3 | |||
| 6c8ef0d968 | |||
| afb037c97a | |||
| 45e2c0a6f1 | |||
| b4e3f6a0d8 | |||
| 1cd39d88ed | |||
| 2f1cd634c2 | |||
| 8ad4616b49 | |||
| f121976ecf | |||
| c2207ceba7 | |||
| 356c15a34f | |||
| d9b0b948a8 | |||
| ffbbc6430d | |||
| 25bb21a4d6 | |||
| 97d5f75328 | |||
| 491e0f635f | |||
| 7229b469bb | |||
| c8970bd270 | |||
| cc827e6154 | |||
| d021959930 | |||
| 628794cdfa | |||
| 37348cb777 | |||
| b68245df9b | |||
| 97dcd370ae | |||
| da46e43399 | |||
| 552a7d1fc3 | |||
| 81d3dad9e3 | |||
| 31015cb935 | |||
| c963288164 |
129
702ec142.patch
Normal file
129
702ec142.patch
Normal file
@@ -0,0 +1,129 @@
|
||||
From 702ec1423fb9b53244b902923fd87ef19b63a7f5 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
Date: Mon, 23 Jun 2025 08:32:18 +0200
|
||||
Subject: [PATCH] libcomps: Support builds with CMake 4+
|
||||
|
||||
- Bump minimum required version to 3.10, the lowest one CMake 4+ don't complain
|
||||
about. It's also possible to use 3.5, but that results in a deprecation
|
||||
warning. The 'cmake_minimum_required()' invocation has been moved before the
|
||||
initial 'project()' call as CMake complained about the wrong order.
|
||||
|
||||
- Set policy CMP0148 [0] to OLD to unblock build without additional changes.
|
||||
Eventually, the usage of the 'PythonInterp' and 'PythonLibs' find modules will
|
||||
be need to be updated to use 'Python3' instead.
|
||||
|
||||
- Set policy CMP0175 [1] to NEW and fix warnings.
|
||||
|
||||
- Fix the 'No TARGET ... has been created in this directory' error in
|
||||
'src/python'.
|
||||
|
||||
- Fix 'Utility target <foo> must not be used as the target of a
|
||||
target_link_libraries call' errors (see [2]).
|
||||
|
||||
- Mark the 'check' library as required when tests are enabled to prevent test
|
||||
targets from linking a non-existing library in case it's not installed.
|
||||
|
||||
[0]: https://cmake.org/cmake/help/latest/policy/CMP0148.html
|
||||
[1]: https://cmake.org/cmake/help/latest/policy/CMP0175.html
|
||||
[2]: https://cmake.org/cmake/help/latest/policy/CMP0039.html
|
||||
---
|
||||
README.md | 3 +--
|
||||
libcomps/CMakeLists.txt | 7 +++++--
|
||||
libcomps/src/python/docs/CMakeLists.txt | 3 ++-
|
||||
libcomps/src/python/pycopy.cmake | 7 ++++---
|
||||
libcomps/tests/CMakeLists.txt | 2 --
|
||||
5 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/README.md b/README.md
|
||||
index 7f8314d..24bf8a2 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -27,7 +27,7 @@ for python bindings:
|
||||
|
||||
for C library tests:
|
||||
|
||||
-* check http://check.sourceforge.net/
|
||||
+* check https://github.com/libcheck/check
|
||||
|
||||
for documentation build:
|
||||
|
||||
@@ -128,4 +128,3 @@ Here's the most direct way to get your work merged into the project.
|
||||
|
||||
1. Push the branch to your fork
|
||||
1. Send a pull request for your branch
|
||||
-
|
||||
diff --git a/libcomps/CMakeLists.txt b/libcomps/CMakeLists.txt
|
||||
index d8d628a..3957e63 100644
|
||||
--- a/libcomps/CMakeLists.txt
|
||||
+++ b/libcomps/CMakeLists.txt
|
||||
@@ -1,5 +1,8 @@
|
||||
+cmake_minimum_required (VERSION 3.10)
|
||||
project(libcomps C)
|
||||
-cmake_minimum_required (VERSION 2.8.10)
|
||||
+
|
||||
+cmake_policy(SET CMP0148 OLD)
|
||||
+cmake_policy(SET CMP0175 NEW)
|
||||
|
||||
include (GNUInstallDirs)
|
||||
include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
|
||||
@@ -32,7 +35,7 @@ include_directories("${PROJECT_SOURCE_DIR}/src")
|
||||
#include_directories("${PROJECT_SOURCE_DIR}/src/libcomps")
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
- find_library(CHECK_LIBRARY NAMES check)
|
||||
+ find_library(CHECK_LIBRARY REQUIRED NAMES check)
|
||||
endif()
|
||||
find_library(EXPAT_LIBRARY NAMES expat)
|
||||
|
||||
diff --git a/libcomps/src/python/docs/CMakeLists.txt b/libcomps/src/python/docs/CMakeLists.txt
|
||||
index c4b388c..9c92b2d 100644
|
||||
--- a/libcomps/src/python/docs/CMakeLists.txt
|
||||
+++ b/libcomps/src/python/docs/CMakeLists.txt
|
||||
@@ -26,7 +26,8 @@ add_dependencies(pydocs pycomps)
|
||||
include(../pycopy.cmake)
|
||||
add_custom_command(TARGET pydocs PRE_BUILD COMMAND set -E $ENV{LD_LIBRARY_PATH} "${LIBCOMPS_OUT}:$ENV{LD_LIBRARY_PATH}")
|
||||
|
||||
-add_custom_command(TARGET pydocs COMMAND ${PYTHON_EXECUTABLE} ${SPHINX_EXECUTABLE} -E -b html
|
||||
+add_custom_command(TARGET pydocs POST_BUILD
|
||||
+ COMMAND ${PYTHON_EXECUTABLE} ${SPHINX_EXECUTABLE} -E -b html
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/doc-sources/"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/html/"
|
||||
COMMENT "LDLP $ENV{LD_LIBRARY_PATH}")
|
||||
diff --git a/libcomps/src/python/pycopy.cmake b/libcomps/src/python/pycopy.cmake
|
||||
index b22f835..0e99e38 100644
|
||||
--- a/libcomps/src/python/pycopy.cmake
|
||||
+++ b/libcomps/src/python/pycopy.cmake
|
||||
@@ -6,9 +6,10 @@ math (EXPR len "${len} - 1")
|
||||
|
||||
#set(pycopy "py${pversion}-copy")
|
||||
|
||||
-#if (NOT TARGET ${pycopy})
|
||||
+if (NOT TARGET ${pycopy})
|
||||
+ add_custom_target(${pycopy} DEPENDS pycomps)
|
||||
+endif()
|
||||
|
||||
-#add_custom_target(${pycopy} DEPENDS pycomps)
|
||||
set (pycomps_SRCDIR "${PROJECT_SOURCE_DIR}/src/python/src/")
|
||||
set (pycomps_TESTDIR "${PROJECT_SOURCE_DIR}/src/python/tests/")
|
||||
set (pycomps_LIBPATH ${PYCOMPS_LIB_PATH})#"${PROJECT_BINARY_DIR}/src/python/src/python${pversion}")
|
||||
@@ -16,7 +17,7 @@ set (pycomps_LIBPATH ${PYCOMPS_LIB_PATH})#"${PROJECT_BINARY_DIR}/src/python/src/
|
||||
#add_custom_command(TARGET pycopy PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
|
||||
# make_directory "${CP_DST}")
|
||||
|
||||
-add_custom_command(TARGET ${pycopy} COMMAND ${CMAKE_COMMAND} -E
|
||||
+add_custom_command(TARGET ${pycopy} POST_BUILD COMMAND ${CMAKE_COMMAND} -E
|
||||
make_directory ${pycomps_LIBPATH}/libcomps/comps/)
|
||||
|
||||
foreach(x RANGE 0 ${len})
|
||||
diff --git a/libcomps/tests/CMakeLists.txt b/libcomps/tests/CMakeLists.txt
|
||||
index 23ced74..9d6e428 100644
|
||||
--- a/libcomps/tests/CMakeLists.txt
|
||||
+++ b/libcomps/tests/CMakeLists.txt
|
||||
@@ -87,7 +87,5 @@ add_custom_target(test_parse_run
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS test_parse
|
||||
COMMENT "Running comps_parse test")
|
||||
-target_link_libraries(test_parse_run libcomps)
|
||||
-target_link_libraries(test_comps_run libcomps)
|
||||
|
||||
add_dependencies(ctest test_comps_run test_parse_run)
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e93299e34da26c14b210f48f324c0c2540515f79f9d748311139f77498317a18
|
||||
size 3710869
|
||||
3
libcomps-0.1.21.tar.gz
Normal file
3
libcomps-0.1.21.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84d7555ed795458f3799d57cceccb096634c38461c3db7cb1739d42c038b2785
|
||||
size 3711111
|
||||
@@ -1,48 +0,0 @@
|
||||
From a71bce7e62990550a57688e51b14eb82d6de196b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
|
||||
Date: Tue, 2 Jan 2024 08:32:55 +0100
|
||||
Subject: [PATCH] Fix build: use correct variable for category and env
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Upstream: this is a backport of a commit actually pushed upstream
|
||||
References: boo#1221700
|
||||
|
||||
|
||||
Fixes:
|
||||
- error: assignment to ‘COMPS_DocGroup *’ from incompatible pointer type ‘COMPS_DocCategory *’
|
||||
- error: assignment to ‘COMPS_DocGroup *’ from incompatible pointer type ‘COMPS_DocEnv *’
|
||||
|
||||
For: https://fedoraproject.org/wiki/Changes/PortingToModernC
|
||||
(https://fedoraproject.org/wiki/Toolchain/PortingToModernC)
|
||||
(https://gitlab.com/fweimer-rh/fedora-modernc-logs/-/blob/main/logs/l/libcomps.log)
|
||||
---
|
||||
libcomps/tests/check_parse.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libcomps/tests/check_parse.c b/libcomps/tests/check_parse.c
|
||||
index 9c2874b..f279708 100644
|
||||
--- a/libcomps/tests/check_parse.c
|
||||
+++ b/libcomps/tests/check_parse.c
|
||||
@@ -585,8 +585,8 @@ START_TEST(test_arch)
|
||||
list = comps_doc_categories(doc2);
|
||||
ck_assert(list->len == 2);
|
||||
for (it = list->first, x=0; it != NULL; it = it->next, x++) {
|
||||
- g = (COMPS_DocCategory*)it->comps_obj;
|
||||
- str = (COMPS_Str*)comps_doccategory_get_id(g);
|
||||
+ c = (COMPS_DocCategory*)it->comps_obj;
|
||||
+ str = (COMPS_Str*)comps_doccategory_get_id(c);
|
||||
ck_assert_msg(strcmp(str->val, cats[0][x]) == 0, "%s != %s",
|
||||
str->val, cats[0][x]);
|
||||
COMPS_OBJECT_DESTROY(str);
|
||||
@@ -605,8 +605,8 @@ START_TEST(test_arch)
|
||||
list = comps_doc_environments(doc2);
|
||||
ck_assert(list->len == 2);
|
||||
for (it = list->first, x=0; it != NULL; it = it->next, x++) {
|
||||
- g = (COMPS_DocEnv*)it->comps_obj;
|
||||
- str = (COMPS_Str*)comps_docenv_get_id(g);
|
||||
+ e = (COMPS_DocEnv*)it->comps_obj;
|
||||
+ str = (COMPS_Str*)comps_docenv_get_id(e);
|
||||
ck_assert_msg(strcmp(str->val, envs[0][x]) == 0, "%s != %s",
|
||||
str->val, envs[0][x]);
|
||||
COMPS_OBJECT_DESTROY(str);
|
||||
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 27 09:53:32 UTC 2025 - Ana Guerrero <ana.guerrero@suse.com>
|
||||
|
||||
- Add patch sphinx-build.patch now /usr/bin/sphinx-build uses alts.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 16 13:28:17 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Update to version 0.1.21:
|
||||
+ tests: Don't print parsing errors during tests
|
||||
+ tests: Unify formatting of current test announcements
|
||||
+ build: Restore compatiblity with libxml2-2.12.0
|
||||
+ Fix build: use correct variable for category and env
|
||||
- Drop libcomps-c99.patch: fixed upstream.
|
||||
- Add 702ec142.patch: Upstream commit, support builds with cmake
|
||||
4.x.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 10 14:05:56 UTC 2024 - Martin Jambor <mjambor@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libcomps
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2021 Neal Gompa <ngompa13@gmail.com>.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
%define major 0
|
||||
%define minor 1
|
||||
%define patch 20
|
||||
%define patch 21
|
||||
%define libname %{name}%{major}
|
||||
%define devname %{name}-devel
|
||||
|
||||
@@ -31,7 +31,8 @@ License: GPL-2.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/rpm-software-management/libcomps
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: libcomps-c99.patch
|
||||
Patch0: %{url}/commit/702ec142.patch
|
||||
Patch1: sphinx-build.patch
|
||||
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: check-devel
|
||||
|
||||
13
sphinx-build.patch
Normal file
13
sphinx-build.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
/usr/bin/sphinx-build points to alts now, it doesn't work if we call it
|
||||
from the python interpreter
|
||||
--- libcomps-0.1.21/libcomps/src/python/docs/CMakeLists.txt
|
||||
+++ libcomps-0.1.21/libcomps/src/python/docs/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@
|
||||
add_custom_command(TARGET pydocs PRE_BUILD COMMAND set -E $ENV{LD_LIBRARY_PATH} "${LIBCOMPS_OUT}:$ENV{LD_LIBRARY_PATH}")
|
||||
|
||||
add_custom_command(TARGET pydocs POST_BUILD
|
||||
- COMMAND ${PYTHON_EXECUTABLE} ${SPHINX_EXECUTABLE} -E -b html
|
||||
+ COMMAND ${SPHINX_EXECUTABLE} -E -b html
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/doc-sources/"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/html/"
|
||||
COMMENT "LDLP $ENV{LD_LIBRARY_PATH}")
|
||||
Reference in New Issue
Block a user