gnu: Add ispell-for-linphone.

* gnu/packages/aspell.scm (ispell-for-linphone): New variable.

Change-Id: I1d4e09c87cd7315c588b24805ca16db91f748c7a
* gnu/packages/patches/ispell-for-linphone-cmake.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: Ife043854144fbce52b9cf69631d80a885b9f7b42
This commit is contained in:
Maxim Cournoyer 2024-06-13 19:22:34 -04:00 committed by Maxim Cournoyer
parent 59593ff535
commit d3fde7c906
No known key found for this signature in database
GPG key ID: 1260E46482E63562
3 changed files with 89 additions and 1 deletions

View file

@ -1621,7 +1621,8 @@ dist_patch_DATA = \
%D%/packages/patches/insight-toolkit-fix-build.patch \ %D%/packages/patches/insight-toolkit-fix-build.patch \
%D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \
%D%/packages/patches/irrlicht-link-against-needed-libs.patch \ %D%/packages/patches/irrlicht-link-against-needed-libs.patch \
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \
%D%/packages/patches/ispell-for-linphone-cmake.patch \
%D%/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch\ %D%/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch\
%D%/packages/patches/jami-disable-webengine.patch \ %D%/packages/patches/jami-disable-webengine.patch \
%D%/packages/patches/jami-enable-testing.patch \ %D%/packages/patches/jami-enable-testing.patch \

View file

@ -15,6 +15,7 @@
;;; Copyright © 2021 Sergiu Ivanov <sivanov@colimite.fr> ;;; Copyright © 2021 Sergiu Ivanov <sivanov@colimite.fr>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream> ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -34,6 +35,9 @@
(define-module (gnu packages aspell) (define-module (gnu packages aspell)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (guix utils) #:use-module (guix utils)
@ -438,3 +442,43 @@ dictionaries, including personal ones.")
European languages.") European languages.")
(home-page "https://www.cs.hmc.edu/~geoff/ispell.html") (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
(license bsd-3))) (license bsd-3)))
;;; This is basically ispell but built with CMake, and which provides a CMake
;;; config file.
(define-public ispell-for-linphone
(let ((commit "05574fe160222c3d0b6283c1433c9b087271fad1")
(revision "0"))
(package
(inherit ispell)
(name "ispell-for-linphone")
;; The version is captured in the ISPELL_VERSION variable in the
;; CMakeLists.txt file at the root of the project.
(version (git-version "3.4.05" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.linphone.org/BC/public/external/ispell")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0shwbms6y0i18n2qnvjlbwfmzk5rydlp7wbf4dl1rn74r244p132"))
(patches (search-patches "ispell-for-linphone-cmake.patch"))))
(build-system cmake-build-system)
(arguments
(substitute-keyword-arguments (package-arguments ispell)
((#:modules _ ''())
'((guix build cmake-build-system)
(guix build utils)
(srfi srfi-26)))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
(add-before 'configure 'really-configure
(assoc-ref %standard-phases 'configure))
(add-after 'configure 'install-headers
(lambda _
(let ((include-dir (string-append #$output "/include/ISpell")))
(with-directory-excursion "../source"
(for-each (cut install-file <> include-dir)
'("config.h" "defhash.h" "ispell.h"
"libispell.h" "local.h")))))))))))))

View file

@ -0,0 +1,43 @@
Retrieved from: https://git.pld-linux.org/?p=packages/bc-ispell.git;a=blob_plain;f=ispell-cmake.patch;hb=HEAD
--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/CMakeLists.txt.orig 2023-11-07 11:53:37.000000000 +0100
+++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/CMakeLists.txt 2024-03-28 20:53:45.068632010 +0100
@@ -49,6 +49,26 @@ set(ISPELL_SOURCES
add_library(${ISPELL_TARGET_NAME} SHARED ${ISPELL_SOURCES})
+set(CMAKE_MODULES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake/${ISPELL_TARGET_NAME}")
+configure_package_config_file("${ISPELL_TARGET_NAME}Config.cmake.in" "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
+ INSTALL_DESTINATION "${CMAKE_MODULES_INSTALL_DIR}"
+ NO_SET_AND_CHECK_MACRO
+)
+write_basic_package_version_file("${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}ConfigVersion.cmake"
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+)
+install(FILES
+ "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
+ "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}ConfigVersion.cmake"
+ DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
+)
+
+install(EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
+ FILE "${ISPELL_TARGET_NAME}LibraryDepends.cmake"
+ DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
+)
+
install(TARGETS ${ISPELL_TARGET_NAME}
EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/ISpellConfig.cmake.in.orig 2023-11-07 11:53:37.000000000 +0100
+++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/ISpellConfig.cmake.in 2024-03-28 21:54:40.692161132 +0100
@@ -12,7 +12,7 @@ set(ISPELL_LIBRARIES "@ISPELL_TARGET_NAM
get_target_property(ISPELL_INCLUDE_DIRS "@ISPELL_TARGET_NAME@" INTERFACE_INCLUDE_DIRECTORIES)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18.0)
- add_library(@ISpell_TARGET_NAME@::@ISpell_TARGET_NAME@ ALIAS @ISpell_TARGET_NAME@)
+ add_library(@ISPELL_TARGET_NAME@::@ISPELL_TARGET_NAME@ ALIAS @ISPELL_TARGET_NAME@)
endif()
-check_required_components(@ISpell_TARGET_NAME@)
+check_required_components(@ISPELL_TARGET_NAME@)