t4kcommon: fix build with cmake4 (#455425)

This commit is contained in:
dish
2025-10-27 14:06:27 +00:00
committed by GitHub
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,17 @@
--- a/src/linebreak/CMakeLists.txt
+++ b/src/linebreak/CMakeLists.txt
@@ -72,12 +72,12 @@
${LINEBREAK_BINARY_DIR}
${LINEBREAK_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR})
-
+add_library(linebreak STATIC ${LINEBREAK_SOURCES} ${LINEBREAK_HEADERS})
if (ICONV_FOUND)
include_directories(${ICONV_INCLUDE_DIR})
target_link_libraries(linebreak ${ICONV_LIBRARY})
endif (ICONV_FOUND)
-add_library(linebreak STATIC ${LINEBREAK_SOURCES} ${LINEBREAK_HEADERS})
+
#project_source_group("${GROUP_CODE}" LINEBREAK_SOURCES LINEBREAK_HEADERS)
+7
View File
@@ -32,6 +32,8 @@ stdenv.mkDerivation rec {
url = "https://salsa.debian.org/tux4kids-pkg-team/t4kcommon/raw/f7073fa384f5a725139f54844e59b57338b69dc7/debian/patches/libpng16.patch";
hash = "sha256-auQ8VvOyvLE1PD2dfeHZJV+MzIt1OtUa7OcOqsXTAYI=";
})
# Fix "Cannot specify link libraries for target "linebreak" which is not built by this project."
./linebreak-fix.patch
];
# Workaround build failure on -fno-common toolchains like upstream
@@ -55,6 +57,11 @@ stdenv.mkDerivation rec {
libxml2
];
postPatch = ''
substituteInPlace {src/,./}CMakeLists.txt \
--replace-fail "cmake_minimum_required(VERSION 2.6)" "cmake_minimum_required(VERSION 3.10)"
'';
meta = with lib; {
description = "Library of code shared between tuxmath and tuxtype";
homepage = "https://github.com/tux4kids/t4kcommon";