ctune: 1.3.4 -> 1.3.9 (#469707)

This commit is contained in:
tomberek
2025-12-31 23:41:33 -05:00
committed by GitHub
4 changed files with 39 additions and 84 deletions

View File

@@ -1,81 +0,0 @@
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
index ac0488e..a3724bc 100644
--- a/CMakeLists.txt.orig
+++ b/CMakeLists.txt
@@ -50,14 +50,6 @@ include(FetchContent)
set(CMAKE_VERBOSE_MAKEFILE ON)
-#========================================== PRE-CHECKS ============================================#
-include(FindGit)
-find_package(Git)
-
-if (NOT Git_FOUND)
- message(FATAL_ERROR "Required package 'Git' not found on system.")
-endif ()
-
#======================================== LIB IMPORTS =============================================#
# ======= #
# OpenSSL #
@@ -65,40 +57,17 @@ endif ()
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
-# ============== #
-# JSON-C library #
-# ============== #
-set(JSONC_DOWNLOAD_PATH "${TEMP_DIR_PATH}/libjsonc")
-set(JSONC_INSTALL_PATH "${CMAKE_EXTERNAL_OUTPUT_DIRECTORY}")
-
-add_custom_target(make-jsonc-install-dir ALL
- COMMAND ${CMAKE_COMMAND} -E make_directory ${JSONC_INSTALL_PATH}
-)
-
-ExternalProject_Add(libjsonc
- PREFIX "${JSONC_DOWNLOAD_PATH}"
- SOURCE_DIR "${JSONC_DOWNLOAD_PATH}/src/libjsonc-build"
- GIT_REPOSITORY "https://github.com/json-c/json-c.git"
- GIT_TAG "json-c-0.18-20240915"
- CMAKE_ARGS "-DBUILD_STATIC_LIBS=ON"
- "-DBUILD_SHARED_LIBS=OFF"
- "-DCMAKE_INSTALL_PREFIX:PATH=${JSONC_INSTALL_PATH}"
- "-DHAVE_ARC4RANDOM=OFF"
- "-DCMAKE_BUILD_TYPE=release"
- "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
-)
-
-set(JSONC_LIBRARIES
- ${CMAKE_EXTERNAL_OUTPUT_DIRECTORY}/lib/libjson-c.a
-# bsd
-)
-
# ============ #
# Curl library #
# ============ #
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIR})
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(JSONC REQUIRED json-c)
+include_directories(${JSONC_INCLUDE_DIRS})
+
+
# ================================ #
# nCurses - for the user interface #
# ================================ #
@@ -410,7 +379,7 @@ add_subdirectory(docs)
#endforeach()
add_executable(ctune ${SOURCE_FILES})
-add_dependencies(ctune ctune_logger libjsonc)
+add_dependencies(ctune ctune_logger)
include_directories(${CMAKE_EXTERNAL_OUTPUT_DIRECTORY}/include)
add_dependencies(ctune ${CTUNE_PLUGIN_LIST_AUDIO_PLAYER})
@@ -450,4 +419,4 @@ if(TARGET uninstall)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeUninstall.cmake)
-endif()
\ No newline at end of file
+endif()

View File

@@ -0,0 +1,17 @@
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
index 20ba56d..85750c8 100644
--- a/CMakeLists.txt.orig
+++ b/CMakeLists.txt
@@ -52,12 +52,7 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
#========================================== PRE-CHECKS ============================================#
find_package(PkgConfig REQUIRED)
-include(FindGit)
-find_package(Git)
-if (NOT Git_FOUND)
- message(FATAL_ERROR "Required package 'Git' not found on system.")
-endif ()
#======================================== LIB IMPORTS =============================================#
# ======= #

View File

@@ -0,0 +1,14 @@
diff --git a/docs/CMakeLists.txt.orig b/docs/CMakeLists.txt
index bb4d641..b37936e 100644
--- a/docs/CMakeLists.txt.orig
+++ b/docs/CMakeLists.txt
@@ -46,7 +46,7 @@ add_custom_command(
)
install(FILES ${MAN_OUT_DIR}/${MAN_OUT_FILENAME_GZ}
- DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1
+ DESTINATION ${MAN_INSTALL_DIR}
)
install(CODE "execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/scripts/update_mandb.sh ARGS ${CMAKE_BUILD_TYPE})")
\ No newline at end of file

View File

@@ -14,16 +14,17 @@
ncurses,
libuuid,
pandoc,
pipewire,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ctune";
version = "1.3.4";
version = "1.3.9";
src = fetchFromGitHub {
owner = "An7ar35";
repo = "ctune";
tag = "v${finalAttrs.version}";
hash = "sha256-36Y19CbUnv8NtvZjCMKod/Y/Ofjgr9BsxgMMdoMK+hU=";
hash = "sha256-HGCXtntsCQsWKoTbhRZ71NxfD4rFuYDE2IbGVh0Cj/E=";
};
nativeBuildInputs = [
@@ -42,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
json_c
ncurses
libuuid
pipewire
];
strictDeps = true;
@@ -52,7 +54,10 @@ stdenv.mkDerivation (finalAttrs: {
"-DCMAKE_INSTALL_PREFIX=''"
];
patches = [ ./cmake_disable_git_clone.patch ];
patches = [
./cmake_remove_git_check.patch
./docs_cmake_fix_man_install_dir.patch
];
meta = {
description = "Nice terminal nCurses (tui) internet radio player for Linux, browse and search from api.radio-browser.info";