update extra-cmake-modules
This commit is contained in:
159
gchannel/packages/extra-cmake-modules.scm
Normal file
159
gchannel/packages/extra-cmake-modules.scm
Normal file
@@ -0,0 +1,159 @@
|
||||
(define-module (gchannel packages extra-cmake-modules)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix build-system python)
|
||||
#:use-module (guix build-system qt)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages acl)
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages aidc)
|
||||
#:use-module (gnu packages aspell)
|
||||
#:use-module (gnu packages attr)
|
||||
#:use-module (gnu packages avahi)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages boost)
|
||||
#:use-module (gnu packages bison)
|
||||
#:use-module (gnu packages boost)
|
||||
#:use-module (gnu packages calendar)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages databases)
|
||||
#:use-module (gnu packages docbook)
|
||||
#:use-module (gnu packages ebook)
|
||||
#:use-module (gnu packages flex)
|
||||
#:use-module (gnu packages freedesktop)
|
||||
#:use-module (gnu packages gettext)
|
||||
#:use-module (gnu packages gl)
|
||||
#:use-module (gnu packages glib)
|
||||
#:use-module (gnu packages gnome)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages gperf)
|
||||
#:use-module (gnu packages graphics)
|
||||
#:use-module (gnu packages graphviz)
|
||||
#:use-module (gnu packages gstreamer)
|
||||
#:use-module (gnu packages gtk)
|
||||
#:use-module (gnu packages hunspell)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages iso-codes)
|
||||
#:use-module (gnu packages kerberos)
|
||||
#:use-module (gnu packages kde)
|
||||
#:use-module (gnu packages kde-plasma)
|
||||
#:use-module (gnu packages libcanberra)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages mp3)
|
||||
#:use-module (gnu packages openbox)
|
||||
#:use-module (gnu packages pdf)
|
||||
#:use-module (gnu packages pcre)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages photo)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages polkit)
|
||||
#:use-module (gnu packages pulseaudio)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages python-web)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (gnu packages textutils)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages text-editors)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (gnu packages vulkan)
|
||||
#:use-module (gnu packages web)
|
||||
#:use-module (gnu packages xml)
|
||||
#:use-module (gnu packages xdisorg)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (srfi srfi-1))
|
||||
|
||||
(define-public extra-cmake-modules
|
||||
(package
|
||||
(name "extra-cmake-modules")
|
||||
(version "6.14.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"mirror://kde/stable/frameworks/"
|
||||
(version-major+minor version) "/"
|
||||
name "-" version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"04scg1hqffys9593y5slqmq8ai4glr5z3xmbhh46hfcv4srvnb6h"))))
|
||||
(build-system cmake-build-system)
|
||||
(native-inputs
|
||||
;; Add test dependency, except on armhf where building it is too
|
||||
;; expensive.
|
||||
(if (and (not (%current-target-system))
|
||||
(string=? (%current-system) "armhf-linux"))
|
||||
'()
|
||||
(list qtbase-5))) ;for tests (needs qmake)
|
||||
(arguments
|
||||
(list
|
||||
#:tests? (and (not (%current-target-system))
|
||||
(not (null? (package-native-inputs this-package))))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-lib-and-libexec-path
|
||||
(lambda _
|
||||
(substitute* "kde-modules/KDEInstallDirsCommon.cmake"
|
||||
;; Always install into /lib and not into /lib64.
|
||||
(("\"lib64\"") "\"lib\"")
|
||||
;; Install into /libexec and not into /lib/libexec.
|
||||
(("LIBDIR \"libexec\"") "EXECROOTDIR \"libexec\""))
|
||||
|
||||
;; Determine the install path by the major version of Qt.
|
||||
;; TODO: Base the following on values taken from Qt
|
||||
;; Install plugins into lib/qt5/plugins
|
||||
;; TODO: Check if this is okay for Android, too
|
||||
;; (see comment in KDEInstallDirs.cmake)
|
||||
(substitute* '("kde-modules/KDEInstallDirs5.cmake"
|
||||
"kde-modules/KDEInstallDirs6.cmake")
|
||||
;; Fix the installation path of Qt plugins.
|
||||
(("_define_relative\\(QTPLUGINDIR \"\\$\\{_pluginsDirParent}\" \"plugins\"")
|
||||
"_define_relative(QTPLUGINDIR \"${_pluginsDirParent}\" \"qt${QT_MAJOR_VERSION}/plugins\"")
|
||||
;; Fix the installation path of QML files.
|
||||
(("_define_relative\\(QMLDIR LIBDIR \"qml\"")
|
||||
"_define_relative(QMLDIR LIBDIR \"qt${QT_MAJOR_VERSION}/qml\""))
|
||||
|
||||
;; Qt Quick Control 1 is no longer available in Qt 6.
|
||||
(substitute* '("kde-modules/KDEInstallDirs5.cmake")
|
||||
(("_define_relative\\(QTQUICKIMPORTSDIR QTPLUGINDIR \"imports\"")
|
||||
"_define_relative(QTQUICKIMPORTSDIR LIBDIR \"qt5/imports\""))
|
||||
|
||||
(substitute* "modules/ECMGeneratePriFile.cmake"
|
||||
;; Install pri-files into lib/qt${QT_MAJOR_VERSION}/mkspecs
|
||||
(("set\\(ECM_MKSPECS_INSTALL_DIR mkspecs/modules")
|
||||
"set(ECM_MKSPECS_INSTALL_DIR lib/qt${QT_MAJOR_VERSION}/mkspecs/modules"))))
|
||||
;; Work around for the failed test KDEFetchTranslations.
|
||||
;; It complains that the cmake project name is not
|
||||
;; ".*/extra-cmake-modules".
|
||||
;; TODO: Fix it upstream.
|
||||
(add-after 'unpack 'fix-test
|
||||
(lambda _
|
||||
(substitute* "tests/KDEFetchTranslations/CMakeLists.txt"
|
||||
(("\\.\\*/extra-cmake-modules") "extra-cmake-modules"))))
|
||||
;; install and check phase are swapped to prevent install from failing
|
||||
;; after testsuire has run
|
||||
(add-after 'install 'check-post-install
|
||||
(assoc-ref %standard-phases 'check))
|
||||
(delete 'check))))
|
||||
;; optional dependencies - to save space, we do not add these inputs.
|
||||
;; Sphinx > 1.2:
|
||||
;; Required to build Extra CMake Modules documentation in Qt Help format.
|
||||
;; Qt5LinguistTools , Qt5 linguist tools. , <http://www.qt.io/>
|
||||
;; Required to run tests for the ECMPoQmTools module.
|
||||
;; Qt5Core
|
||||
;; Required to run tests for the ECMQtDeclareLoggingCategory module,
|
||||
;; and for some tests of the KDEInstallDirs module.
|
||||
(home-page "https://community.kde.org/Frameworks")
|
||||
(synopsis "CMake module files for common software used by KDE")
|
||||
(description "The Extra CMake Modules package, or ECM, adds to the
|
||||
modules provided by CMake to find common software. In addition, it provides
|
||||
common build settings used in software produced by the KDE community.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
extra-cmake-modules
|
||||
Reference in New Issue
Block a user