From 0d4587d65fe1ad0d9357a6d9f776bc7d17391b8e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 16 Dec 2022 13:39:48 -0500 Subject: gnu: Add u-boot-documentation. * gnu/packages/patches/u-boot-infodocs-target.patch: New patch. * gnu/local.mk: (dist_patch_DATA): Register it. * gnu/packages/bootloaders.scm (u-boot): Apply it. (u-boot-documentation): New variable. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0d4028a161..71b8ba506b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1916,6 +1916,7 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ + %D%/packages/patches/u-boot-infodocs-target.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ -- cgit v1.2.3 From bcd131dafbaf61ae823c0a3ba1b886f5b0c15ea9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 16 Dec 2022 15:29:27 -0500 Subject: gnu: Add patman. * gnu/packages/bootloaders.scm (patman): New variable. * gnu/packages/patches/u-boot-patman-fix-help.patch: New patch. * gnu/packages/patches/u-boot-patman-get-maintainer.patch: Likewise. * gnu/packages/patches/u-boot-patman-local-conf.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 3 + gnu/packages/bootloaders.scm | 36 ++++- gnu/packages/patches/u-boot-patman-fix-help.patch | 40 +++++ .../patches/u-boot-patman-get-maintainer.patch | 104 ++++++++++++ .../patches/u-boot-patman-local-conf.patch | 176 +++++++++++++++++++++ 5 files changed, 358 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-patman-fix-help.patch create mode 100644 gnu/packages/patches/u-boot-patman-get-maintainer.patch create mode 100644 gnu/packages/patches/u-boot-patman-local-conf.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 71b8ba506b..7c7b5c12bd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1917,6 +1917,9 @@ dist_patch_DATA = \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-infodocs-target.patch \ + %D%/packages/patches/u-boot-patman-fix-help.patch \ + %D%/packages/patches/u-boot-patman-get-maintainer.patch \ + %D%/packages/patches/u-boot-patman-local-conf.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index a0d1bb279e..406f885253 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -69,7 +69,10 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages valgrind) #:use-module (gnu packages virtualization) #:use-module (gnu packages xorg) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) #:use-module (guix build-system gnu) + #:use-module (guix build-system pyproject) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix gexp) @@ -641,7 +644,10 @@ (define u-boot %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt %u-boot-rk3399-enable-emmc-phy-patch - (search-patch "u-boot-infodocs-target.patch"))) + (search-patch "u-boot-infodocs-target.patch") + (search-patch "u-boot-patman-fix-help.patch") + (search-patch "u-boot-patman-local-conf.patch") + (search-patch "u-boot-patman-get-maintainer.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" @@ -816,6 +822,34 @@ (define-public u-boot-tools " This package provides board-independent tools " "of U-Boot.")))) +;;; This is packaged separately, as it can be used in other contexts than for +;;; U-Boot development. +(define-public patman + (package + (inherit u-boot) + (name "patman") + (build-system pyproject-build-system) + (arguments + ;; The test suite strongly relies on the git metadata being available (23 + ;; failed, 14 passed). + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "tools/patman")))))) + (inputs (list python-pygit2 python-requests)) + (synopsis "Patch automation tool") + (description "Patman is a patch automation script which: +@itemize +@item Creates patches directly from your branch +@item Cleans them up by removing unwanted tags +@item Inserts a cover letter with change lists +@item Runs the patches through automated checks +@item Optionally emails them out to selected people. +@end itemize"))) + (define*-public (make-u-boot-package board triplet #:key defconfig diff --git a/gnu/packages/patches/u-boot-patman-fix-help.patch b/gnu/packages/patches/u-boot-patman-fix-help.patch new file mode 100644 index 0000000000..89bac06c2f --- /dev/null +++ b/gnu/packages/patches/u-boot-patman-fix-help.patch @@ -0,0 +1,40 @@ +Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333156 + +diff --git a/tools/patman/main.py b/tools/patman/main.py +index 5a7756a221..bf300c6e64 100755 +--- a/tools/patman/main.py ++++ b/tools/patman/main.py +@@ -7,6 +7,7 @@ + """See README for more information""" + + from argparse import ArgumentParser ++import importlib.resources + import os + import re + import shutil +@@ -163,11 +164,8 @@ elif args.cmd == 'send': + fd.close() + + elif args.full_help: +- tools.print_full_help( +- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), +- 'README.rst') +- ) +- ++ with importlib.resources.path('patman', 'README.rst') as readme: ++ tools.print_full_help(str(readme)) + else: + # If we are not processing tags, no need to warning about bad ones + if not args.process_tags: +diff --git a/tools/patman/setup.py b/tools/patman/setup.py +index 43fdc00ce6..ce9bb4aa63 100644 +--- a/tools/patman/setup.py ++++ b/tools/patman/setup.py +@@ -7,6 +7,6 @@ setup(name='patman', + scripts=['patman'], + packages=['patman'], + package_dir={'patman': ''}, +- package_data={'patman': ['README']}, ++ package_data={'patman': ['README.rst']}, + classifiers=['Environment :: Console', + 'Topic :: Software Development']) diff --git a/gnu/packages/patches/u-boot-patman-get-maintainer.patch b/gnu/packages/patches/u-boot-patman-get-maintainer.patch new file mode 100644 index 0000000000..4377f8394e --- /dev/null +++ b/gnu/packages/patches/u-boot-patman-get-maintainer.patch @@ -0,0 +1,104 @@ +Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333427 + +diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst +index 7828899879..95b6c9c3f0 100644 +--- a/tools/patman/patman.rst ++++ b/tools/patman/patman.rst +@@ -88,7 +88,7 @@ To add your own, create a file `~/.patman` like this:: + Patman will also look for a `.patman` configuration file at the root + of the current project git repository, which makes it possible to + override the `project` settings variable or anything else in a +-project-specific way. The values of this "local" configuration file ++project-specific way. The values of this "local" configuration file + take precedence over those of the "global" one. + + Aliases are recursive. +diff --git a/tools/patman/test_settings.py b/tools/patman/test_settings.py +index 9c14b4aaa3..c768a2fc64 100644 +--- a/tools/patman/test_settings.py ++++ b/tools/patman/test_settings.py +@@ -6,38 +6,62 @@ + import argparse + import contextlib + import os +-import subprocess ++import sys + import tempfile + + from patman import settings ++from patman import tools + + + @contextlib.contextmanager + def empty_git_repository(): + with tempfile.TemporaryDirectory() as tmpdir: + os.chdir(tmpdir) +- subprocess.check_call(['git', 'init']) ++ tools.run('git', 'init', raise_on_error=True) + yield tmpdir + + ++@contextlib.contextmanager ++def cleared_command_line_args(): ++ old_value = sys.argv[:] ++ sys.argv = [sys.argv[0]] ++ try: ++ yield ++ finally: ++ sys.argv = old_value ++ ++ + def test_git_local_config(): +- with empty_git_repository(): +- with tempfile.NamedTemporaryFile() as global_config: +- global_config.write(b'[settings]\n' +- b'project=u-boot\n') +- global_config.flush() +- parser = argparse.ArgumentParser() +- parser.add_argument('-p', '--project', default='unknown') +- +- # Test "global" config is used. +- settings.Setup(parser, 'unknown', global_config.name) +- args, _ = parser.parse_known_args() +- assert args.project == 'u-boot' +- +- # Test local config can shadow it. +- with open('.patman', 'w', buffering=1) as f: +- f.write('[settings]\n' +- 'project=guix-patches\n') +- settings.Setup(parser, 'unknown', global_config.name) +- args, _ = parser.parse_known_args([]) +- assert args.project == 'guix-patches' ++ # Clearing the command line arguments is required, otherwise ++ # arguments passed to the test running such as in 'pytest -k ++ # filter' would be processed by _UpdateDefaults and fail. ++ with cleared_command_line_args(): ++ with empty_git_repository(): ++ with tempfile.NamedTemporaryFile() as global_config: ++ global_config.write(b'[settings]\n' ++ b'project=u-boot\n') ++ global_config.flush() ++ parser = argparse.ArgumentParser() ++ parser.add_argument('-p', '--project', default='unknown') ++ subparsers = parser.add_subparsers(dest='cmd') ++ send = subparsers.add_parser('send') ++ send.add_argument('--no-check', action='store_false', ++ dest='check_patch', default=True) ++ ++ # Test "global" config is used. ++ settings.Setup(parser, 'unknown', global_config.name) ++ args, _ = parser.parse_known_args([]) ++ assert args.project == 'u-boot' ++ send_args, _ = send.parse_known_args([]) ++ assert send_args.check_patch ++ ++ # Test local config can shadow it. ++ with open('.patman', 'w', buffering=1) as f: ++ f.write('[settings]\n' ++ 'project: guix-patches\n' ++ 'check_patch: False\n') ++ settings.Setup(parser, 'unknown', global_config.name) ++ args, _ = parser.parse_known_args([]) ++ assert args.project == 'guix-patches' ++ send_args, _ = send.parse_known_args([]) ++ assert not send_args.check_patch diff --git a/gnu/packages/patches/u-boot-patman-local-conf.patch b/gnu/packages/patches/u-boot-patman-local-conf.patch new file mode 100644 index 0000000000..3400982356 --- /dev/null +++ b/gnu/packages/patches/u-boot-patman-local-conf.patch @@ -0,0 +1,176 @@ +Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333354 + +diff --git a/tools/patman/main.py b/tools/patman/main.py +index bf300c6e64..3616b28f27 100755 +--- a/tools/patman/main.py ++++ b/tools/patman/main.py +@@ -116,7 +116,7 @@ status.add_argument('-f', '--force', action='store_true', + argv = sys.argv[1:] + args, rest = parser.parse_known_args(argv) + if hasattr(args, 'project'): +- settings.Setup(gitutil, parser, args.project, '') ++ settings.Setup(parser, args.project) + args, rest = parser.parse_known_args(argv) + + # If we have a command, it is safe to parse all arguments +diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst +index 8c5c9cc2cc..7828899879 100644 +--- a/tools/patman/patman.rst ++++ b/tools/patman/patman.rst +@@ -74,7 +74,7 @@ out where to send patches pretty well. + During the first run patman creates a config file for you by taking the default + user name and email address from the global .gitconfig file. + +-To add your own, create a file ~/.patman like this:: ++To add your own, create a file `~/.patman` like this:: + + # patman alias file + +@@ -85,6 +85,12 @@ To add your own, create a file ~/.patman like this:: + wolfgang: Wolfgang Denk + others: Mike Frysinger , Fred Bloggs + ++Patman will also look for a `.patman` configuration file at the root ++of the current project git repository, which makes it possible to ++override the `project` settings variable or anything else in a ++project-specific way. The values of this "local" configuration file ++take precedence over those of the "global" one. ++ + Aliases are recursive. + + The checkpatch.pl in the U-Boot tools/ subdirectory will be located and +diff --git a/tools/patman/settings.py b/tools/patman/settings.py +index 903d6fcb0b..e8e2908f1f 100644 +--- a/tools/patman/settings.py ++++ b/tools/patman/settings.py +@@ -1,5 +1,6 @@ + # SPDX-License-Identifier: GPL-2.0+ + # Copyright (c) 2011 The Chromium OS Authors. ++# Copyright (c) 2022 Maxim Cournoyer + # + + try: +@@ -11,8 +12,7 @@ import argparse + import os + import re + +-from patman import command +-from patman import tools ++from patman import gitutil + + """Default settings per-project. + +@@ -190,7 +190,8 @@ def ReadGitAliases(fname): + + fd.close() + +-def CreatePatmanConfigFile(gitutil, config_fname): ++ ++def CreatePatmanConfigFile(config_fname): + """Creates a config file under $(HOME)/.patman if it can't find one. + + Args: +@@ -328,26 +329,46 @@ def GetItems(config, section): + except: + raise + +-def Setup(gitutil, parser, project_name, config_fname=''): ++def Setup(parser, project_name, config_fname=None): + """Set up the settings module by reading config files. + ++ Unless `config_fname` is specified, a `.patman` config file local ++ to the git repository is consulted, followed by the global ++ `$HOME/.patman`. If none exists, the later is created. Values ++ defined in the local config file take precedence over those ++ defined in the global one. ++ + Args: +- parser: The parser to update ++ parser: The parser to update. + project_name: Name of project that we're working on; we'll look + for sections named "project_section" as well. +- config_fname: Config filename to read ('' for default) ++ config_fname: Config filename to read. An error is raised if it ++ does not exist. + """ + # First read the git alias file if available + _ReadAliasFile('doc/git-mailrc') + config = _ProjectConfigParser(project_name) +- if config_fname == '': ++ ++ if config_fname and not os.path.exists(config_fname): ++ raise Exception(f'provided {config_fname} does not exist') ++ ++ if not config_fname: + config_fname = '%s/.patman' % os.getenv('HOME') ++ has_config = os.path.exists(config_fname) ++ ++ git_local_config_fname = os.path.join(gitutil.get_top_level(), '.patman') ++ has_git_local_config = os.path.exists(git_local_config_fname) + +- if not os.path.exists(config_fname): +- print("No config file found ~/.patman\nCreating one...\n") +- CreatePatmanConfigFile(gitutil, config_fname) ++ # Read the git local config last, so that its values override ++ # those of the global config, if any. ++ if has_config: ++ config.read(config_fname) ++ if has_git_local_config: ++ config.read(git_local_config_fname) + +- config.read(config_fname) ++ if not (has_config or has_git_local_config): ++ print("No config file found.\nCreating ~/.patman...\n") ++ CreatePatmanConfigFile(config_fname) + + for name, value in GetItems(config, 'alias'): + alias[name] = value.split(',') +diff --git a/tools/patman/test_settings.py b/tools/patman/test_settings.py +new file mode 100644 +index 0000000000..9c14b4aaa3 +--- /dev/null ++++ b/tools/patman/test_settings.py +@@ -0,0 +1,43 @@ ++# SPDX-License-Identifier: GPL-2.0+ ++# ++# Copyright (c) 2022 Maxim Cournoyer ++# ++ ++import argparse ++import contextlib ++import os ++import subprocess ++import tempfile ++ ++from patman import settings ++ ++ ++@contextlib.contextmanager ++def empty_git_repository(): ++ with tempfile.TemporaryDirectory() as tmpdir: ++ os.chdir(tmpdir) ++ subprocess.check_call(['git', 'init']) ++ yield tmpdir ++ ++ ++def test_git_local_config(): ++ with empty_git_repository(): ++ with tempfile.NamedTemporaryFile() as global_config: ++ global_config.write(b'[settings]\n' ++ b'project=u-boot\n') ++ global_config.flush() ++ parser = argparse.ArgumentParser() ++ parser.add_argument('-p', '--project', default='unknown') ++ ++ # Test "global" config is used. ++ settings.Setup(parser, 'unknown', global_config.name) ++ args, _ = parser.parse_known_args() ++ assert args.project == 'u-boot' ++ ++ # Test local config can shadow it. ++ with open('.patman', 'w', buffering=1) as f: ++ f.write('[settings]\n' ++ 'project=guix-patches\n') ++ settings.Setup(parser, 'unknown', global_config.name) ++ args, _ = parser.parse_known_args([]) ++ assert args.project == 'guix-patches' -- cgit v1.2.3 From dbd9305a5682b1c5cd0b2a516b09f1f3af47209d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 31 Dec 2022 00:55:43 +0100 Subject: gnu: kodi: Update to 19.5. * gnu/packages/kodi.scm (kodi): Update to 19.5. [source]: Remove obsolete patches; delete bundled jars. [arguments]: Update configure flags; adjust build phase 'patch-stuff to use Groovy from Guix; adjust file names; remove obsolete substitutions; disable TestCPUInfo.GetCPUFrequency test; remove trailing #T from build phases. [native-inputs]: Drop input labels; add googletest, groovy, openjdk9, and java-commons-lang; remove icedtea. [inputs]: Add spdlog-for-kodi; replace fmt-7 with fmt-6 (for spdlog). (kodi/wayland)[arguments]: Adjust configure flags. [inputs]: Use modify-inputs. * gnu/local.mk (dist_patch_DATA): Remove obsolete patches. * gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch: Adjust. * gnu/packages/patches/kodi-increase-test-timeout.patch: Remove file. * gnu/packages/patches/kodi-skip-test-449.patch: Remove file. --- gnu/local.mk | 2 - gnu/packages/kodi.scm | 231 +++++++++++---------- .../patches/kodi-increase-test-timeout.patch | 18 -- .../patches/kodi-set-libcurl-ssl-parameters.patch | 13 +- gnu/packages/patches/kodi-skip-test-449.patch | 53 ----- 5 files changed, 129 insertions(+), 188 deletions(-) delete mode 100644 gnu/packages/patches/kodi-increase-test-timeout.patch delete mode 100644 gnu/packages/patches/kodi-skip-test-449.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7c7b5c12bd..f0b1b3fd15 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1398,9 +1398,7 @@ dist_patch_DATA = \ %D%/packages/patches/kobodeluxe-manpage-minus-not-hyphen.patch \ %D%/packages/patches/kobodeluxe-midicon-segmentation-fault.patch \ %D%/packages/patches/kobodeluxe-graphics-window-signed-char.patch \ - %D%/packages/patches/kodi-increase-test-timeout.patch \ %D%/packages/patches/kodi-set-libcurl-ssl-parameters.patch \ - %D%/packages/patches/kodi-skip-test-449.patch \ %D%/packages/patches/kwayland-skip-flaky-test.patch \ %D%/packages/patches/laby-make-install.patch \ %D%/packages/patches/ldns-drill-examples.patch \ diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm index 18791359f2..c43f812ece 100644 --- a/gnu/packages/kodi.scm +++ b/gnu/packages/kodi.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018, 2020 Efraim Flashner ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Greg Hogan +;;; Copyright © 2022 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ (define-module (gnu packages kodi) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages cdrom) + #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages curl) @@ -55,12 +57,14 @@ (define-module (gnu packages kodi) #:use-module (gnu packages glib) #:use-module (gnu packages gperf) #:use-module (gnu packages groff) + #:use-module (gnu packages groovy) #:use-module (gnu packages gnunet) #:use-module (gnu packages gnupg) #:use-module (gnu packages image) #:use-module (gnu packages java) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) + #:use-module (gnu packages logging) #:use-module (gnu packages mp3) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) @@ -270,43 +274,40 @@ (define-public fstrcmp (define-public kodi (package (name "kodi") - (version "18.8") + (version "19.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/xbmc/xbmc") - (commit (string-append version "-Leia")))) + (commit (string-append version "-Matrix")))) (file-name (git-file-name name version)) (sha256 (base32 - "0qpkpz43s207msvv3qkiy6vzqwcgmydxv3py7vc29mv6h30chrva")) - (patches (search-patches "kodi-skip-test-449.patch" - "kodi-increase-test-timeout.patch" - "kodi-set-libcurl-ssl-parameters.patch")) + "1pfd1ajivr865h0fkpbv778626c4czrvq8650bzqv9aqzh8f36my")) + (patches (search-patches "kodi-set-libcurl-ssl-parameters.patch")) + (modules '((guix build utils))) (snippet '(begin (use-modules (guix build utils)) (for-each delete-file-recursively '("project/BuildDependencies/" - ;; TODO: Purge these jars. - ;;"tools/codegenerator/groovy" - ;; And these sources: + "tools/codegenerator/groovy/commons-lang-2.6.jar" + "tools/codegenerator/groovy/groovy-all-2.4.4.jar" + ;; Purge these sources: ;; "tools/depend/native/JsonSchemaBuilder" ;; "tools/depend/native/TexturePacker" - ;; "lib/gtest" - ;; "lib/cpluff" ;; "lib/libUPnP" "lib/libUPnP/Neptune/ThirdParty" - "project/Win32BuildSetup/tools/7z")) - #t)) - (modules '((guix build utils))))) + "project/Win32BuildSetup/tools/7z")))))) (build-system cmake-build-system) (arguments '(#:modules ((srfi srfi-1) (guix build cmake-build-system) (guix build utils)) #:configure-flags - (list "-DENABLE_INTERNAL_FFMPEG=OFF" + (list "-DCORE_PLATFORM_NAME=x11" + "-DAPP_RENDER_SYSTEM=gl" + "-DENABLE_INTERNAL_FFMPEG=OFF" "-DENABLE_INTERNAL_CROSSGUID=OFF" (string-append "-Dlibdvdread_URL=" (assoc-ref %build-inputs "libdvdread-bootstrapped")) @@ -324,28 +325,36 @@ (define-public kodi ;; bootstrap it on our own instead. (add-after 'unpack 'bootstrap-bundled-software (lambda _ - (let ((dirs '("tools/depends/native/JsonSchemaBuilder/src" - "lib/cpluff"))) + (let ((dirs '("tools/depends/native/JsonSchemaBuilder/src"))) (every (lambda (third-party) (with-directory-excursion third-party (invoke "autoreconf" "-vif"))) dirs)))) (add-after 'bootstrap-bundled-software 'patch-stuff (lambda* (#:key inputs #:allow-other-keys) + ;; Run groovy executable directly. + (substitute* "xbmc/interfaces/swig/CMakeLists.txt" + (("COMMAND \\$\\{Java_JAVA_EXECUTABLE\\}") + "COMMAND groovy") + (("ARGS \\$\\{JAVA_OPEN_OPTS\\} -cp \"\\$\\{classpath\\}\" groovy.ui.GroovyMain") + "ARGS -cp \"${classpath}\" ") + (("classpath \\$\\{GROOVY_DIR\\}/groovy-all-\\$\\{GROOVY_VER\\}.jar") + "classpath ") + (("\\$\\{GROOVY_DIR\\}/commons-lang-\\$\\{COMMONS_VER\\}.jar") + (search-input-file inputs "/share/java/commons-lang-2.6.jar")) + (("^set\\(GROOVY_VER.*") + (string-append "set(GROOVY_VER 3.0.5)\n"))) + ;; Prevent the build scripts from calling autoreconf in the ;; build stage. Otherwise, it would undo the bootstrapping ;; and shebang patching that we worked so hard for. - (substitute* "cmake/modules/FindCpluff.cmake" - (("autoreconf -vif") "true")) - (substitute* "lib/cpluff/po/Makefile.in.in" - (("/bin/sh") (which "sh"))) (substitute* "cmake/modules/FindLibDvd.cmake" ;; The libdvd* sources that we bootstrapped separately are ;; unpacked in the build phase. This is our best opportunity ;; to make them writable before the build process starts. (("autoreconf -vif") "chmod -R u+w .")) - (substitute* "xbmc/platform/linux/LinuxTimezone.cpp" + (substitute* "xbmc/platform/posix/PosixTimezone.cpp" (("/usr/share/zoneinfo") (search-input-directory inputs "share/zoneinfo"))) @@ -357,20 +366,21 @@ (define-public kodi ;; Let's disable some tests that are known not to work here. ;; Doing this later while in the cmake "../build" directory ;; is trickier. - (substitute* '("xbmc/utils/test/TestSystemInfo.cpp") + (substitute* "xbmc/utils/test/TestSystemInfo.cpp" (("TEST_F\\(TestSystemInfo, GetOsPrettyNameWithVersion\\)") "TEST_F(TestSystemInfo, DISABLED_GetOsPrettyNameWithVersion)") (("TEST_F\\(TestSystemInfo, GetOsName\\)") "TEST_F(TestSystemInfo, DISABLED_GetOsName)") (("TEST_F\\(TestSystemInfo, GetOsVersion\\)") "TEST_F(TestSystemInfo, DISABLED_GetOsVersion)")) - #t)) + (substitute* "xbmc/utils/test/TestCPUInfo.cpp" + (("TEST_F\\(TestCPUInfo, GetCPUFrequency\\)") + "TEST_F(TestCPUInfo, DISABLED_GetCPUFrequency)")))) (add-before 'build 'set-build-environment (lambda _ ;; Some bundled build scripts fall back to /bin/sh ;; if this is not set. - (setenv "CONFIG_SHELL" (which "sh")) - #t)) + (setenv "CONFIG_SHELL" (which "sh")))) (add-before 'check 'build-kodi-test (lambda _ (invoke "make" "kodi-test")))))) @@ -379,77 +389,81 @@ (define-public kodi ;; - plist ;; - shairplay (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("gettext" ,gettext-minimal) - ("icedtea" ,icedtea) ; needed at build-time only, mandatory - ("libdvdcss-bootstrapped" ,libdvdcss/kodi) - ("libdvdnav-bootstrapped" ,libdvdnav/kodi) - ("libdvdread-bootstrapped" ,libdvdread/kodi) - ("libtool" ,libtool) - ("pkg-config" ,pkg-config) - ("swig" ,swig) - ("yasm" ,yasm))) + (list autoconf + automake + gettext-minimal + googletest + groovy + openjdk9 ;like groovy + java-commons-lang + libdvdcss/kodi + libdvdnav/kodi + libdvdread/kodi + libtool + pkg-config + swig + yasm)) (inputs - `(("alsa-lib" ,alsa-lib) - ("avahi" ,avahi) - ("bluez" ,bluez) - ("crossguid" ,crossguid) - ("curl" ,curl) - ("dcadec" ,dcadec) - ("dbus" ,dbus) - ("eudev" ,eudev) - ("ffmpeg" ,ffmpeg-4) - ("flac" ,flac) - ("flatbuffers" ,flatbuffers) - ("fmt" ,fmt-7) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("fribidi" ,fribidi) - ("fstrcmp" ,fstrcmp) - ("giflib" ,giflib) - ("glew" ,glew) - ("gnutls" ,gnutls) - ("lame" ,lame) - ("lcms" ,lcms) - ("libass" ,libass) - ("libbluray" ,libbluray) - ("libcap" ,libcap) - ("libcdio" ,libcdio) - ("libdrm" ,libdrm) - ("libgcrypt" ,libgcrypt) - ("libjpeg" ,libjpeg-turbo) - ("libltdl" ,libltdl) - ("libmad" ,libmad) - ("libmicrohttpd" ,libmicrohttpd) - ("libmpeg2" ,libmpeg2) - ("libnfs" ,libnfs) - ("libogg" ,libogg) - ("libpng" ,libpng) - ("libssh" ,libssh) - ("libtiff" ,libtiff) - ("libva" ,libva) - ("libvorbis" ,libvorbis) - ("libxml2" ,libxml2) - ("libxrandr" ,libxrandr) - ("libxrender" ,libxrender) - ("libxslt" ,libxslt) - ("lzo" ,lzo) - ("mariadb-dev" ,mariadb "lib") - ("mariadb-dev" ,mariadb "dev") - ("openssl" ,openssl) - ("pcre" ,pcre) - ("pulseaudio" ,pulseaudio) - ("python" ,python-2) - ("rapidjson" ,rapidjson) - ("samba" ,samba) - ("sqlite" ,sqlite) - ("taglib" ,taglib) - ("tinyxml" ,tinyxml) - ("tzdata" ,tzdata) - ("util-linux" ,util-linux) - ("zip" ,zip) - ("zlib" ,zlib))) + (list alsa-lib + avahi + bluez + crossguid + curl + dcadec + dbus + eudev + ffmpeg-4 + flac + flatbuffers + fmt-6 + fontconfig + freetype + fribidi + fstrcmp + giflib + glew + gnutls + lame + lcms + libass + libbluray + libcap + libcdio + libdrm + libgcrypt + libjpeg-turbo + libltdl + libmad + libmicrohttpd + libmpeg2 + libnfs + libogg + libpng + libssh + libtiff + libva + libvorbis + libxml2 + libxrandr + libxrender + libxslt + lzo + (list mariadb "lib") + (list mariadb "dev") + openssl + pcre + pulseaudio + python + rapidjson + samba + spdlog-for-kodi + sqlite + taglib + tinyxml + tzdata + util-linux + zip + zlib)) (synopsis "Media center for home theater computers") (description "Kodi is a media center application for playing videos, music, games, etc. Kodi is highly customizable and features a theme and @@ -458,11 +472,11 @@ (define-public kodi ;; XBMC is largely GPL2+, with some library components as LGPL2.1+, but ;; there are some other licenses spread throughout. (license (list license:gpl2+ license:lgpl2.1+ - license:gpl3+ ;WiiRemote client - license:expat ;cpluff, dbwrappers - license:public-domain ;cpluff/examples - license:bsd-3 ;misc, gtest - license:bsd-2)))) ;xbmc/freebsd + license:gpl3+ ;WiiRemote client + license:expat ;cpluff, dbwrappers + license:public-domain ;cpluff/examples + license:bsd-3 ;misc + license:bsd-2)))) ;xbmc/freebsd (define-public kodi/wayland (package/inherit kodi @@ -470,15 +484,14 @@ (define-public kodi/wayland (arguments (substitute-keyword-arguments (package-arguments kodi) ((#:configure-flags flags) - `(append '("-DCORE_PLATFORM_NAME=wayland" - "-DWAYLAND_RENDER_SYSTEM=gl") - ,flags)))) + `(cons "-DCORE_PLATFORM_NAME=wayland" + (delete "-DCORE_PLATFORM_NAME=x11" ,flags))))) (inputs - `(("libinput" ,libinput) - ("libxkbcommon" ,libxkbcommon) - ("waylandpp" ,waylandpp) - ("waylandp-protocols" ,wayland-protocols) - ,@(package-inputs kodi))) + (modify-inputs (package-input kodi) + (prepend (list libinput + libxkbcommon + waylandpp + wayland-protocols)))) (synopsis "Kodi with Wayland rendering backend"))) (define-public kodi-cli diff --git a/gnu/packages/patches/kodi-increase-test-timeout.patch b/gnu/packages/patches/kodi-increase-test-timeout.patch deleted file mode 100644 index 8fb149ff9d..0000000000 --- a/gnu/packages/patches/kodi-increase-test-timeout.patch +++ /dev/null @@ -1,18 +0,0 @@ -Increase thread timeout to reduce flakiness. - -Taken from upstream: -https://github.com/xbmc/xbmc/commit/574b0182d8b641fd24029f372ebdcccc897123e2 - -diff --git a/xbmc/threads/test/TestEvent.cpp b/xbmc/threads/test/TestEvent.cpp -index 42fb8c2fc609..40e644c0ed3c 100644 ---- a/xbmc/threads/test/TestEvent.cpp -+++ b/xbmc/threads/test/TestEvent.cpp -@@ -484,7 +484,7 @@ TEST(TestEvent, GroupTimedWait) - EXPECT_TRUE(w3.result == NULL); - - // this should end given the wait is for only 50 millis -- EXPECT_TRUE(waitThread3.timed_join(MILLIS(100))); -+ EXPECT_TRUE(waitThread3.timed_join(MILLIS(200))); - - EXPECT_TRUE(!w3.waiting); - EXPECT_TRUE(w3.result == NULL); diff --git a/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch b/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch index 2f60737e30..99d8a45de6 100644 --- a/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch +++ b/gnu/packages/patches/kodi-set-libcurl-ssl-parameters.patch @@ -3,15 +3,16 @@ connections work we can set them based on SSL_CERT_DIR and SSL_CERT_FILE. --- a/xbmc/filesystem/CurlFile.cpp +++ b/xbmc/filesystem/CurlFile.cpp -@@ -626,5 +626,9 @@ +@@ -626,8 +626,12 @@ if (!m_cipherlist.empty()) g_curlInterface.easy_setopt(h, CURLOPT_SSL_CIPHER_LIST, m_cipherlist.c_str()); - + + // Load certificate data from environment paths + g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_CAPATH, getenv("SSL_CERT_DIR")); + g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_CAINFO, getenv("SSL_CERT_FILE")); + - // enable HTTP2 support. default: CURL_HTTP_VERSION_1_1. Curl >= 7.62.0 defaults to CURL_HTTP_VERSION_2TLS - g_curlInterface.easy_setopt(h, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); -- - } + if (CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_curlDisableHTTP2) + g_curlInterface.easy_setopt(h, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + else + // enable HTTP2 support. default: CURL_HTTP_VERSION_1_1. Curl >= 7.62.0 defaults to CURL_HTTP_VERSION_2TLS + g_curlInterface.easy_setopt(h, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS); diff --git a/gnu/packages/patches/kodi-skip-test-449.patch b/gnu/packages/patches/kodi-skip-test-449.patch deleted file mode 100644 index a418239a7c..0000000000 --- a/gnu/packages/patches/kodi-skip-test-449.patch +++ /dev/null @@ -1,53 +0,0 @@ -This test fails regularly between 18.0rc3 and 18.0rc5.2 - -449/520 Test #449: TestWebServer.CanHeadFile................................................***Failed 0.90 sec -Note: Google Test filter = TestWebServer.CanHeadFile -[==========] Running 1 test from 1 test case. -[----------] Global test environment set-up. -[----------] 1 test from TestWebServer -[ RUN ] TestWebServer.CanHeadFile -/tmp/guix-build-kodi-18.0rc5.2.drv-0/kodi-18.0rc5.2-checkout/xbmc/network/test/TestWebServer.cpp:156: Failure - Expected: "4" -To be equal to: httpHeader.GetValue("Content-Length").c_str() - Which is: "0" -[ FAILED ] TestWebServer.CanHeadFile (6 ms) -[----------] 1 test from TestWebServer (6 ms total) - -[----------] Global test environment tear-down -[==========] 1 test from 1 test case ran. (635 ms total) -[ PASSED ] 0 tests. -[ FAILED ] 1 test, listed below: -[ FAILED ] TestWebServer.CanHeadFile - ---- - xbmc/network/test/TestWebServer.cpp | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/xbmc/network/test/TestWebServer.cpp b/xbmc/network/test/TestWebServer.cpp -index a87d9f4..b2240f4 100644 ---- a/xbmc/network/test/TestWebServer.cpp -+++ b/xbmc/network/test/TestWebServer.cpp -@@ -520,13 +520,13 @@ TEST_F(TestWebServer, CanNotHeadNonExistingFile) - ASSERT_FALSE(curl.Exists(CURL(GetUrlOfTestFile("file_does_not_exist")))); - } - --TEST_F(TestWebServer, CanHeadFile) --{ -- CCurlFile curl; -- ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML)))); -- -- CheckHtmlTestFileResponse(curl); --} -+//TEST_F(TestWebServer, CanHeadFile) -+//{ -+// CCurlFile curl; -+// ASSERT_TRUE(curl.Exists(CURL(GetUrlOfTestFile(TEST_FILES_HTML)))); -+// -+// CheckHtmlTestFileResponse(curl); -+//} - - TEST_F(TestWebServer, CanNotGetNonExistingFile) - { --- -2.20.1 - -- cgit v1.2.3