From patchwork Sun Aug 8 14:47:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Goaziou X-Patchwork-Id: 31884 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EF58327BC78; Sun, 8 Aug 2021 15:48:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3DE6D27BC6B for ; Sun, 8 Aug 2021 15:48:17 +0100 (BST) Received: from localhost ([::1]:36258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCk64-0006mn-5y for patchwork@mira.cbaines.net; Sun, 08 Aug 2021 10:48:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCk5r-0006ln-30 for guix-patches@gnu.org; Sun, 08 Aug 2021 10:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCk5q-0006DD-Kk for guix-patches@gnu.org; Sun, 08 Aug 2021 10:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCk5q-0005PY-DP for guix-patches@gnu.org; Sun, 08 Aug 2021 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49943] [PATCH] gnu: Add openboard Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Aug 2021 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49943 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49943@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162843403520741 (code B ref -1); Sun, 08 Aug 2021 14:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2021 14:47:15 +0000 Received: from localhost ([127.0.0.1]:54702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCk54-0005OS-PR for submit@debbugs.gnu.org; Sun, 08 Aug 2021 10:47:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:51568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCk52-0005OK-Oj for submit@debbugs.gnu.org; Sun, 08 Aug 2021 10:47:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCk52-0006Sc-Ei for guix-patches@gnu.org; Sun, 08 Aug 2021 10:47:12 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:38825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCk4z-0005Yl-Mn for guix-patches@gnu.org; Sun, 08 Aug 2021 10:47:12 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 1E9281C0006 for ; Sun, 8 Aug 2021 14:47:05 +0000 (UTC) From: Nicolas Goaziou Date: Sun, 08 Aug 2021 16:47:04 +0200 Message-ID: <87czqoc7tj.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.197; envelope-from=mail@nicolasgoaziou.fr; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_PDS_PRO_TLD=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, This patch provides openboard package definition. I tested it a bit, it mostly works but crashes (segmentation fault) on some functions (e.g., when pressing the "Web" button or opening the online tutorial). It is usable, tho. Feedback and improvements welcome. Regards, From d2d2d80ccb0197eeec6a40e35e5bd05f8ce77341 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 8 Aug 2021 16:20:16 +0200 Subject: gnu: Add openboard. * gnu/packages/education.scm (openboard): New variable. --- gnu/packages/education.scm | 128 +++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 2f38598cab..a80357c997 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -37,6 +37,7 @@ #:use-module (gnu packages databases) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) + #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages game-development) #:use-module (gnu packages gettext) @@ -48,8 +49,10 @@ #:use-module (gnu packages javascript) #:use-module (gnu packages kde) #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules + #:use-module (gnu packages linux) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) + #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -62,6 +65,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages video) + #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) @@ -389,6 +393,130 @@ This package provides a @command{snap} executable calling @command{xdg-open} to open the application in a web browser, for offline usage.") (license license:agpl3+))) +(define-public openboard + (package + (name "openboard") + (version "1.6.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 "1wvkd5zmv7d7ng3basm323zah9gqnj6v57kf31zjk1i0hcc9fl9s")))) + (build-system qt-build-system) + (arguments + `(#: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(\\);)" _ start end) + (string-append start "true" end)) + (("(appLookForOpenSankoreInstall = .*?)true(\\);)" _ start end) + (string-append start "false" end))))) + (add-after 'unpack 'fix-hard-coded + (lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils"))) + (substitute* "src/frameworks/UBPlatformUtils_linux.cpp" + (("/usr/bin/env") + (string-append coreutils "/bin/env")))))) + (add-after 'unpack 'fix-library-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "OpenBoard.pro" + (("/usr/include/quazip") + (string-append (assoc-ref inputs "quazip") + "/include/quazip5")) + (("/usr/include/poppler") + (string-append (assoc-ref inputs "poppler") + "/include/poppler"))))) + (replace 'configure + (lambda _ + ;; XXX: Invoking "lrelease-pro" on "OpenBoard.pro" fails + ;; with "WARNING: Could not find qmake spec 'default'" + ;; error. So, we compile translations manually. + (for-each (lambda (f) (invoke "lrelease" f)) + (find-files "resources/i18n" "\\.ts$")) + (invoke "qmake" + "-spec" + ,(if (string-prefix? "x86_64" (%current-system)) + "linux-g++-64" + "linux-g++")))) + (replace 'install + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/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 out "/bin"))) + (mkdir-p bin) + (symlink (string-append openboard "/OpenBoard") + (string-append bin "/openboard"))))))))) + (native-inputs + `(("qttools" ,qttools))) + (inputs + `(("alsa-lib" ,alsa-lib) + ("ffmpeg" ,ffmpeg) + ("freetype" ,freetype) + ("lame" ,lame) + ("libass" ,libass) + ("libfdk" ,libfdk) + ("libressl" ,libressl) + ("libtheora" ,libtheora) + ("libva" ,libva) + ("libvorbis" ,libvorbis) + ("libvpx" ,libvpx) + ("libx264" ,libx264) + ("opus" ,opus) + ("poppler" ,poppler) + ("qtbase" ,qtbase-5) + ("qtmultimedia" ,qtmultimedia) + ("qtsvg" ,qtsvg) + ("qtwebkit" ,qtwebkit) + ("qtxmlpatterns" ,qtxmlpatterns) + ("quazip" ,quazip) + ("sdl" ,sdl) + ("zlib" ,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))) + (define-public toutenclic (package (name "toutenclic") -- 2.32.0