From aa88a9919918242c750fc6856bac10bf86d54bd1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 19 Jun 2024 21:48:54 +0200 Subject: gnu: openboard: Update to 1.7.1. * gnu/packages/education.scm (openboard): Update to 1.7.1. [arguments]<#:phases>: Remove unnecessary fix. Change-Id: I15be965a15baa6458217e6e5c88a457b8c65e810 --- gnu/packages/education.scm | 236 +++++++++++++++++++++------------------------ 1 file changed, 110 insertions(+), 126 deletions(-) diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index a636db5e22..4e809f1098 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -500,135 +500,119 @@ specialized device.") (license license:gpl3))) (define-public openboard - ;; The last release builds from qtwebkit, which has been removed from - ;; Guix, so use the latest commit of the 1.7-dev branch, which builds with - ;; qtwebengine-5. - (let ((commit "47a96e1d6bbdc0250977d22f1b79f11fcc1cbeee") - (revision "0")) - (package - (name "openboard") - (version (git-version "1.7-dev" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/OpenBoard-org/OpenBoard") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "04pwmg41vlkwigym3zzkid6srh6f05b44g4mbihd6mhj6vsagx1f")))) - (build-system qt-build-system) - (arguments - (list - #:tests? #f ;no tests - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'set-initial-values - ;; Remove useless "Check for updates" action from menu. - ;; Also prevent pop-up window about importing Open Sankore - ;; documents since we don't package OpenBoard-Importer. - (lambda _ - (substitute* "src/core/UBSettings.cpp" - (("(appHideCheckForSoftwareUpdate = .*?)false(\\);)" _ beg end) - (string-append beg "true" end)) - (("(appLookForOpenSankoreInstall = .*?)true(\\);)" _ beg end) - (string-append beg "false" end))))) - (add-after 'unpack 'fix-build-error - ;; XXX: `errorOpeningVirtualKeyboard' variable is only - ;; defined when building for OSX. Yet, - ;; "UBBoardController.cpp" relies on it unconditionally, - ;; resulting in a build failure. Here, we get rid of - ;; that variable, assuming it is always false (its - ;; default value when building for OSX). - (lambda _ - (substitute* "src/board/UBBoardController.cpp" - (("if \\(!UBPlatformUtils::errorOpeningVirtualKeyboard\\)") - "")))) - (add-after 'unpack 'fix-hard-coded-env - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/frameworks/UBPlatformUtils_linux.cpp" - (("/usr/bin/env") (search-input-file inputs "/bin/env"))))) - (add-after 'unpack 'fix-library-path - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "OpenBoard.pro" - (("/usr/include/quazip5") - (search-input-directory inputs "/include/quazip5")) - (("/usr/include/poppler") - (search-input-directory inputs "/include/poppler"))))) - (replace 'configure - (lambda _ - (invoke "qmake" "OpenBoard.pro"))) - (replace 'install - (lambda* (#:key inputs #:allow-other-keys) - (let* ((share (string-append #$output "/share")) - (openboard (string-append share "/openboard")) - (i18n (string-append openboard "/i18n"))) - ;; Install data. - (with-directory-excursion "resources" - (for-each (lambda (directory) - (let ((target - (string-append openboard "/" directory))) - (mkdir-p target) - (copy-recursively directory target))) - '("customizations" "etc" "library")) - (mkdir-p i18n) - (for-each (lambda (f) - (install-file f i18n)) - (find-files "i18n" "\\.qm$"))) - ;; Install desktop file an icon. - (install-file "resources/images/OpenBoard.png" - (string-append share - "/icons/hicolor/64x64/apps/")) - (make-desktop-entry-file - (string-append share "/applications/" #$name ".desktop") - #:name "OpenBoard" - #:comment "Interactive whiteboard application" - #:exec "openboard %f" - #:icon "OpenBoard" - #:mime-type "application/ubz" - #:categories '("Education")) - ;; Install executable. - (install-file "build/linux/release/product/OpenBoard" openboard) - (let ((bin (string-append #$output "/bin"))) - (mkdir-p bin) - (symlink (string-append openboard "/OpenBoard") - (string-append bin "/openboard"))))))))) - (native-inputs - (list qttools-5)) - (inputs - (list alsa-lib - coreutils-minimal ;for patched 'env' shebang - ffmpeg-4 - freetype - lame - libass - libfdk - libressl - libtheora - libva - libvorbis - libvpx - libx264 - opus - poppler - qtbase-5 - qtdeclarative-5 - qtmultimedia-5 - qtsvg-5 - qtwebchannel-5 - qtwebengine-5 - qtxmlpatterns - quazip-0 - sdl - zlib)) - (home-page "https://openboard.ch/") - (synopsis "Interactive whiteboard for schools and universities") - (description - "OpenBoard is a teaching software for interactive whiteboard + (package + (name "openboard") + (version "1.7.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenBoard-org/OpenBoard") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lxwf50n0bfjjnpq5z82f3apsv9mn834js7f2spw1k1f06a72z41")))) + (build-system qt-build-system) + (arguments + (list + #:tests? #f ;no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-initial-values + ;; Remove useless "Check for updates" action from menu. Also + ;; prevent pop-up window about importing Open Sankore documents + ;; since we don't package OpenBoard-Importer. + (lambda _ + (substitute* "src/core/UBSettings.cpp" + (("(appHideCheckForSoftwareUpdate = .*?)false(\\);)" _ beg end) + (string-append beg "true" end)) + (("(appLookForOpenSankoreInstall = .*?)true(\\);)" _ beg end) + (string-append beg "false" end))))) + (add-after 'unpack 'fix-hard-coded-env + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/frameworks/UBPlatformUtils_linux.cpp" + (("/usr/bin/env") (search-input-file inputs "/bin/env"))))) + (add-after 'unpack 'fix-library-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "OpenBoard.pro" + (("/usr/include/quazip5") + (search-input-directory inputs "/include/quazip5")) + (("/usr/include/poppler") + (search-input-directory inputs "/include/poppler"))))) + (replace 'configure + (lambda _ + (invoke "qmake" "OpenBoard.pro"))) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (let* ((share (string-append #$output "/share")) + (openboard (string-append share "/openboard")) + (i18n (string-append openboard "/i18n"))) + ;; Install data. + (with-directory-excursion "resources" + (for-each (lambda (directory) + (let ((target + (string-append openboard "/" directory))) + (mkdir-p target) + (copy-recursively directory target))) + '("customizations" "etc" "library")) + (mkdir-p i18n) + (for-each (lambda (f) + (install-file f i18n)) + (find-files "i18n" "\\.qm$"))) + ;; Install desktop file an icon. + (install-file "resources/images/OpenBoard.png" + (string-append share + "/icons/hicolor/64x64/apps/")) + (make-desktop-entry-file + (string-append share "/applications/" #$name ".desktop") + #:name "OpenBoard" + #:comment "Interactive whiteboard application" + #:exec "openboard %f" + #:icon "OpenBoard" + #:mime-type "application/ubz" + #:categories '("Education")) + ;; Install executable. + (install-file "build/linux/release/product/OpenBoard" openboard) + (let ((bin (string-append #$output "/bin"))) + (mkdir-p bin) + (symlink (string-append openboard "/OpenBoard") + (string-append bin "/openboard"))))))))) + (native-inputs + (list qttools-5)) + (inputs + (list alsa-lib + coreutils-minimal ;for patched 'env' shebang + ffmpeg-4 + freetype + lame + libass + libfdk + libressl + libtheora + libva + libvorbis + libvpx + libx264 + opus + poppler + qtbase-5 + qtdeclarative-5 + qtmultimedia-5 + qtsvg-5 + qtwebchannel-5 + qtwebengine-5 + qtxmlpatterns + quazip-0 + sdl + zlib)) + (home-page "https://openboard.ch/") + (synopsis "Interactive whiteboard for schools and universities") + (description + "OpenBoard is a teaching software for interactive whiteboard designed primarily for use in schools and universities. It can be used both with interactive whiteboards or in a dual-screen setup with a pen-tablet display and a beamer.") - (license license:gpl3)))) + (license license:gpl3))) (define-public fet (package -- cgit v1.2.3