unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49943] [PATCH] gnu: Add openboard
@ 2021-08-08 14:47 Nicolas Goaziou
  2022-02-24  4:23 ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2021-08-08 14:47 UTC (permalink / raw)
  To: 49943

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

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,
-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch for openboard --]
[-- Type: text/x-diff, Size: 7365 bytes --]

From d2d2d80ccb0197eeec6a40e35e5bd05f8ce77341 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2021-08-08 14:47 [bug#49943] [PATCH] gnu: Add openboard Nicolas Goaziou
@ 2022-02-24  4:23 ` Maxim Cournoyer
  2022-02-24 21:32   ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2022-02-24  4:23 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 49943

Hi Nicolas!

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> 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.

I tried to build it, but it failed with:

--8<---------------cut here---------------start------------->8---
g++ -c -m64 -pipe -std=c++11 -fopenmp -O2 -std=gnu++1y -w -D_REENTRANT -fPIC -DNO_THIRD_PARTY_WARNINGS -DUBVERSION="\"1.6.1."\" -DUBVERSION_RC=1,6,1,240,0309 -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -Isrc -Isrc/web/browser -Isrc/qtsingleapplication/src -Isrc/pdf-merger -Iplugins/cffadaptor/src -I/gnu/store/2nsrbbnw4174rnmaw8mkdgd0939fwj1h-quazip-1.2/include/quazip5 -I/gnu/store/jf1972y4lzipm4h17spkzaclb0ifflv0-poppler-21.07.0/include/poppler -I/gnu/store/0gabd8wshbc917y3m4mcqndnnf6gv572-qtwebkit-5.212.0-alpha4/include/QtWebKitWidgets -I/gnu/store/0gabd8wshbc917y3m4mcqndnnf6gv572-qtwebkit-5.212.0-alpha4/include/QtWebKit -I/gnu/store/c7m7mihwj3sn9gbvyb2d1ma62hlifgkn-qtsvg-5.15.2/include/qt5 -I/gnu/store/c7m7mihwj3sn9gbvyb2d1ma62hlifgkn-qtsvg-5.15.2/include/qt5/QtSvg -I/gnu/store/3cpa4lv4gx2nkiyvg4xkcalvvjv6y1vq-qttools-5.15.2/include/qt5 -I/gnu/store/3cpa4lv4gx2nkiyvg4xkcalvvjv6y1vq-qttools-5.15.2/include/qt5/QtUiTools -I/gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/include/qt5 -I/gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/include/qt5/QtMultimediaWidgets -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5 -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtPrintSupport -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtWidgets -I/gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/include/qt5/QtMultimedia -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtGui -I/gnu/store/f96i1vssl11vk483570ki90g56mhpiz1-qtxmlpatterns-5.15.2/include/qt5 -I/gnu/store/f96i1vssl11vk483570ki90g56mhpiz1-qtxmlpatterns-5.15.2/include/qt5/QtXmlPatterns -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtNetwork -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtXml -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtCore -Ibuild/linux/release/moc -I/gnu/store/ikghb2zrjjl5944gxqkls89rrbd1qn24-libdrm-2.4.107/include/libdrm -Ibuild/linux/release/ui -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/qt5/mkspecs/linux-g++-64 -o build/linux/release/objects/UBDrawingController.o src/board/UBDrawingController.cpp
In file included from src/adaptors/UBExportDocumentSetAdaptor.cpp:28:
src/adaptors/UBExportDocumentSetAdaptor.h:36:10: fatal error: quazip.h: No such file or directory
   36 | #include "quazip.h"
      |          ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Release:3415: build/linux/release/objects/UBExportDocumentSetAdaptor.o] Error 1
make[1]: *** Waiting for unfinished jobs....
src/adaptors/UBImportDocumentSetAdaptor.cpp:44:10: fatal error: quazip.h: No such file or directory
   44 | #include "quazip.h"
      |          ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Release:3436: build/linux/release/objects/UBImportDocumentSetAdaptor.o] Error 1
src/adaptors/UBImportDocument.cpp:46:14: fatal error: quazip.h: No such file or directory
   46 |     #include "quazip.h"
      |              ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Release:3274: build/linux/release/objects/UBImportDocument.o] Error 1
src/adaptors/UBImportCFF.cpp:52:14: fatal error: quazip.h: No such file or directory
   52 |     #include "quazip.h"
      |              ^~~~~~~~~~
compilation terminated.
src/adaptors/UBExportWeb.cpp:42:10: fatal error: quazip.h: No such file or directory
   42 | #include "quazip.h"
      |          ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Release:3491: build/linux/release/objects/UBImportCFF.o] Error 1
make[1]: *** [Makefile.Release:3384: build/linux/release/objects/UBExportWeb.o] Error 1
src/adaptors/UBExportDocument.cpp:46:14: fatal error: quazip.h: No such file or directory
   46 |     #include "quazip.h"
      |              ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Release:3149: build/linux/release/objects/UBExportDocument.o] Error 1
make[1]: Leaving directory '/tmp/guix-build-openboard-1.6.1.drv-0/source'
make: *** [Makefile:42: release] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "24") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `build' failed after 6.6 seconds
--8<---------------cut here---------------end--------------->8---

Perhaps something changed since with our quazip package?

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2022-02-24  4:23 ` Maxim Cournoyer
@ 2022-02-24 21:32   ` Nicolas Goaziou
  2022-02-27  5:20     ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2022-02-24 21:32 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 49943

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> I tried to build it, but it failed with:

Thank you for the feedback!

> --8<---------------cut here---------------start------------->8---
> g++ -c -m64 -pipe -std=c++11 -fopenmp -O2 -std=gnu++1y -w -D_REENTRANT -fPIC -DNO_THIRD_PARTY_WARNINGS -DUBVERSION="\"1.6.1."\" -DUBVERSION_RC=1,6,1,240,0309 -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -Isrc -Isrc/web/browser -Isrc/qtsingleapplication/src -Isrc/pdf-merger -Iplugins/cffadaptor/src -I/gnu/store/2nsrbbnw4174rnmaw8mkdgd0939fwj1h-quazip-1.2/include/quazip5 -I/gnu/store/jf1972y4lzipm4h17spkzaclb0ifflv0-poppler-21.07.0/include/poppler -I/gnu/store/0gabd8wshbc917y3m4mcqndnnf6gv572-qtwebkit-5.212.0-alpha4/include/QtWebKitWidgets -I/gnu/store/0gabd8wshbc917y3m4mcqndnnf6gv572-qtwebkit-5.212.0-alpha4/include/QtWebKit -I/gnu/store/c7m7mihwj3sn9gbvyb2d1ma62hlifgkn-qtsvg-5.15.2/include/qt5 -I/gnu/store/c7m7mihwj3sn9gbvyb2d1ma62hlifgkn-qtsvg-5.15.2/include/qt5/QtSvg -I/gnu/store/3cpa4lv4gx2nkiyvg4xkcalvvjv6y1vq-qttools-5.15.2/include/qt5 -I/gnu/store/3cpa4lv4gx2nkiyvg4xkcalvvjv6y1vq-qttools-5.15.2/include/qt5/QtUiTools -I/gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/include/qt5 -I/gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/include/qt5/QtMultimediaWidgets -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5 -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtPrintSupport -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtWidgets -I/gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/include/qt5/QtMultimedia -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtGui -I/gnu/store/f96i1vssl11vk483570ki90g56mhpiz1-qtxmlpatterns-5.15.2/include/qt5 -I/gnu/store/f96i1vssl11vk483570ki90g56mhpiz1-qtxmlpatterns-5.15.2/include/qt5/QtXmlPatterns -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtNetwork -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtXml -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/include/qt5/QtCore -Ibuild/linux/release/moc -I/gnu/store/ikghb2zrjjl5944gxqkls89rrbd1qn24-libdrm-2.4.107/include/libdrm -Ibuild/linux/release/ui -I/gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/qt5/mkspecs/linux-g++-64 -o build/linux/release/objects/UBDrawingController.o src/board/UBDrawingController.cpp
> In file included from src/adaptors/UBExportDocumentSetAdaptor.cpp:28:
> src/adaptors/UBExportDocumentSetAdaptor.h:36:10: fatal error: quazip.h: No such file or directory
>    36 | #include "quazip.h"
>       |          ^~~~~~~~~~
> compilation terminated.
> make[1]: *** [Makefile.Release:3415: build/linux/release/objects/UBExportDocumentSetAdaptor.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> src/adaptors/UBImportDocumentSetAdaptor.cpp:44:10: fatal error: quazip.h: No such file or directory
>    44 | #include "quazip.h"
>       |          ^~~~~~~~~~
> compilation terminated.
> make[1]: *** [Makefile.Release:3436: build/linux/release/objects/UBImportDocumentSetAdaptor.o] Error 1
> src/adaptors/UBImportDocument.cpp:46:14: fatal error: quazip.h: No such file or directory
>    46 |     #include "quazip.h"
>       |              ^~~~~~~~~~
> compilation terminated.
> make[1]: *** [Makefile.Release:3274: build/linux/release/objects/UBImportDocument.o] Error 1
> src/adaptors/UBImportCFF.cpp:52:14: fatal error: quazip.h: No such file or directory
>    52 |     #include "quazip.h"
>       |              ^~~~~~~~~~
> compilation terminated.
> src/adaptors/UBExportWeb.cpp:42:10: fatal error: quazip.h: No such file or directory
>    42 | #include "quazip.h"
>       |          ^~~~~~~~~~
> compilation terminated.
> make[1]: *** [Makefile.Release:3491: build/linux/release/objects/UBImportCFF.o] Error 1
> make[1]: *** [Makefile.Release:3384: build/linux/release/objects/UBExportWeb.o] Error 1
> src/adaptors/UBExportDocument.cpp:46:14: fatal error: quazip.h: No such file or directory
>    46 |     #include "quazip.h"
>       |              ^~~~~~~~~~
> compilation terminated.
> make[1]: *** [Makefile.Release:3149: build/linux/release/objects/UBExportDocument.o] Error 1
> make[1]: Leaving directory '/tmp/guix-build-openboard-1.6.1.drv-0/source'
> make: *** [Makefile:42: release] Error 2
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-j" "24") exit-status: 2 term-signal: #f stop-signal: #f> 
> phase `build' failed after 6.6 seconds
> --8<---------------cut here---------------end--------------->8---
>
> Perhaps something changed since with our quazip package?

I can build it with the following new-style package definition (although
it is still a bit crashy):

--8<---------------cut here---------------start------------->8---
(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-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/quazip")
                (search-input-directory inputs "/include/quazip5"))
               (("/usr/include/poppler")
                (search-input-directory inputs "/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
     (list qttools))
    (inputs
     (list alsa-lib
           ffmpeg
           freetype
           lame
           libass
           libfdk
           libressl
           libtheora
           libva
           libvorbis
           libvpx
           libx264
           opus
           poppler
           qtbase-5
           qtmultimedia
           qtsvg
           qtwebkit
           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)))
--8<---------------cut here---------------end--------------->8---

Let me know if you'd rather have a patch.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2022-02-24 21:32   ` Nicolas Goaziou
@ 2022-02-27  5:20     ` Maxim Cournoyer
  2022-02-28 20:56       ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2022-02-27  5:20 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 49943

Hi Nicolas,

Thanks, the latest version you posted worked fine; it seems there's a
problem with qtwebkit segaulting when attempting to use webviews as you
noted. Here's a backtrace:

--8<---------------cut here---------------start------------->8---
Thread 1 "OpenBoard" received signal SIGSEGV, Segmentation fault.
0x00007ffff07df656 in ?? () from /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6
(gdb) bt
#0  0x00007ffff07df656 in ?? () from /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6
#1  0x00007ffff59e9e2c in ?? () from /gnu/store/40b5dgbclcs2cb8yplha6rq6d6kqk07i-libressl-3.3.3/lib/libcrypto.so.46
#2  0x00007ffff59ea030 in lh_insert () from /gnu/store/40b5dgbclcs2cb8yplha6rq6d6kqk07i-libressl-3.3.3/lib/libcrypto.so.46
#3  0x00007ffff59ef405 in OBJ_NAME_add () from /gnu/store/40b5dgbclcs2cb8yplha6rq6d6kqk07i-libressl-3.3.3/lib/libcrypto.so.46
#4  0x00007fffed5befcb in ?? () from /gnu/store/akr853qqys7vzwjkvlsb5qfrl3ds5q1w-openssl-1.1.1m/lib/libssl.so.1.1
#5  0x00007ffff0bf23bf in ?? () from /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0
#6  0x00007fffed492c99 in CRYPTO_THREAD_run_once () from /gnu/store/akr853qqys7vzwjkvlsb5qfrl3ds5q1w-openssl-1.1.1m/lib/libcrypto.so.1.1
#7  0x00007fffed5bf1b3 in OPENSSL_init_ssl () from /gnu/store/akr853qqys7vzwjkvlsb5qfrl3ds5q1w-openssl-1.1.1m/lib/libssl.so.1.1
#8  0x00007ffff1376551 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Network.so.5
#9  0x00007ffff1377e3d in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Network.so.5
#10 0x00007ffff3ec6dfa in WebCore::ResourceRequest::alpnIsSupported() () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#11 0x00007ffff3ec77e9 in WebCore::ResourceRequest::toNetworkRequest(WebCore::NetworkingContext*) const () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#12 0x00007ffff2ce2790 in WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, std::function<void (WebCore::PolicyAction)>) () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#13 0x00007ffff3c7572b in WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, std::function<void (WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool)>) () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#14 0x00007ffff3c5ae7f in WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>, WebCore::AllowNavigationToInvalidURL) ()
   from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#15 0x00007ffff3c5e15f in WebCore::FrameLoader::load(WebCore::DocumentLoader*) () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#16 0x00007ffff3c5ea4d in WebCore::FrameLoader::load(WebCore::FrameLoadRequest const&) () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#17 0x00007ffff2cf7c04 in QWebFrameAdapter::load(QNetworkRequest const&, QNetworkAccessManager::Operation, QByteArray const&) ()
   from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKit.so.5
#18 0x00007ffff53f4106 in QWebFrame::load(QUrl const&) () from /gnu/store/hmnivfz89qidhbw8mi07ghm5xkdb8w7k-qtwebkit-5.212.0-alpha4/lib/libQt5WebKitWidgets.so.5
#19 0x0000000000690d52 in WBTabWidget::loadUrlInCurrentTab(QUrl const&) ()
#20 0x0000000000671246 in UBWebController::webBrowserInstance() ()
#21 0x000000000056b530 in UBApplicationController::showInternet() ()
#22 0x00000000006714e2 in UBWebController::loadUrl(QUrl const&) ()
#23 0x0000000000671590 in UBWebController::onOpenTutorial() ()
#24 0x00007ffff0f56378 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#25 0x00007ffff2111a72 in QAction::triggered(bool) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#26 0x00007ffff2114448 in QAction::activate(QAction::ActionEvent) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#27 0x00007ffff228a392 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#28 0x00007ffff2291ac1 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#29 0x00007ffff21565ce in QWidget::event(QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#30 0x00007ffff2117a8f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#31 0x00007ffff211ea09 in QApplication::notify(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#32 0x00007ffff0f219ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#33 0x00007ffff211daf0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
   from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#34 0x00007ffff216fa33 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#35 0x00007ffff2171f75 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#36 0x00007ffff2117a8f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#37 0x00007ffff0f219ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#38 0x00007ffff190a378 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Gui.so.5
#39 0x00007ffff18e17bc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Gui.so.5
#40 0x00007fffea9c2e4a in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5XcbQpa.so.5
#41 0x00007fffef3764cb in g_main_context_dispatch () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#42 0x00007fffef376748 in g_main_context_iterate.constprop () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#43 0x00007fffef3767ef in g_main_context_iteration () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#44 0x00007ffff0f75eb0 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#45 0x00007ffff0f2059b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#46 0x00007ffff228f6c4 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#47 0x00007ffff22ee9db in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#48 0x00007ffff0f56378 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#49 0x00007ffff220451d in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#50 0x00007ffff2204dd6 in QAbstractButton::mousePressEvent(QMouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#51 0x00007ffff22ef652 in QToolButton::mousePressEvent(QMouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#52 0x00007ffff21565ce in QWidget::event(QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
--Type <RET> for more, q to quit, c to continue without paging--c
#53 0x00007ffff2117a8f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#54 0x00007ffff211ea09 in QApplication::notify(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#55 0x00007ffff0f219ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#56 0x00007ffff211daf0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#57 0x00007ffff216ef58 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#58 0x00007ffff2171f75 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#59 0x00007ffff2117a8f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#60 0x00007ffff0f219ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#61 0x00007ffff190a378 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Gui.so.5
#62 0x00007ffff18e17bc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Gui.so.5
#63 0x00007fffea9c2e4a in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5XcbQpa.so.5
#64 0x00007fffef3764cb in g_main_context_dispatch () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#65 0x00007fffef376748 in g_main_context_iterate.constprop () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#66 0x00007fffef3767ef in g_main_context_iteration () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#67 0x00007ffff0f75eb0 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#68 0x00007ffff0f2059b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#69 0x00007ffff2309952 in QDialog::exec() () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#70 0x000000000066f42f in UBDesktopAnnotationController::customCapture() ()
#71 0x00007ffff0f56378 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#72 0x00007ffff0f56378 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#73 0x00007ffff2111a72 in QAction::triggered(bool) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#74 0x00007ffff2114448 in QAction::activate(QAction::ActionEvent) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#75 0x00007ffff22061ea in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#76 0x00007ffff2206331 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#77 0x00007ffff22ef7fa in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#78 0x00007ffff21565ce in QWidget::event(QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#79 0x00007ffff2117a8f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#80 0x00007ffff211ea09 in QApplication::notify(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#81 0x00007ffff0f219ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#82 0x00007ffff211daf0 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#83 0x00007ffff216ef58 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#84 0x00007ffff2171f75 in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#85 0x00007ffff2117a8f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Widgets.so.5
#86 0x00007ffff0f219ea in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#87 0x00007ffff190a378 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Gui.so.5
#88 0x00007ffff18e17bc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Gui.so.5
#89 0x00007fffea9c2e4a in ?? () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5XcbQpa.so.5
#90 0x00007fffef3764cb in g_main_context_dispatch () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#91 0x00007fffef376748 in g_main_context_iterate.constprop () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#92 0x00007fffef3767ef in g_main_context_iteration () from /gnu/store/a1vnwxgl18qn30yfl20lm0hrx1n78jvy-glib-2.70.2/lib/libglib-2.0.so.0
#93 0x00007ffff0f75eb0 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#94 0x00007ffff0f2059b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#95 0x00007ffff0f2818c in QCoreApplication::exec() () from /gnu/store/l47pc2mgb5frq7327akz9y34pbssyhpz-qtbase-5.15.2/lib/libQt5Core.so.5
#96 0x0000000000537cc4 in UBApplication::exec(QString const&) ()
#97 0x00000000004b63e1 in main ()
--8<---------------cut here---------------end--------------->8---

Also, note that qtwebkit doesn't seem to have a future, and is scheduled
for removal in Guix, per #49943.  That's too bad!  I hope they can
tackle https://github.com/OpenBoard-org/OpenBoard/issues/193 soon.

I guess given the sad state of qtwebkit, and its planned removal from
Guix, we may have to drop this submission and revisit it at a later
time.

Thank you for the efforts in packaging it!

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2022-02-27  5:20     ` Maxim Cournoyer
@ 2022-02-28 20:56       ` Maxim Cournoyer
  2022-03-05 23:16         ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2022-02-28 20:56 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 49943

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

[...]

> Also, note that qtwebkit doesn't seem to have a future, and is scheduled
> for removal in Guix, per #49943.  That's too bad!  I hope they can
> tackle https://github.com/OpenBoard-org/OpenBoard/issues/193 soon.

I've asked, and apparently they're working on it already [0]!

[0]  https://github.com/OpenBoard-org/OpenBoard/issues/193#issuecomment-1054642139

> I guess given the sad state of qtwebkit, and its planned removal from
> Guix, we may have to drop this submission and revisit it at a later
> time.

So a better suggestion with the above in mind would be to package it
using the non-released 1.7-dev development branch which relies already
on qtwebengine instead of qtwebkit.

Would you like to give it a spin?

Thanks!

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2022-02-28 20:56       ` Maxim Cournoyer
@ 2022-03-05 23:16         ` Nicolas Goaziou
  2022-03-06  9:03           ` Maxime Devos
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2022-03-05 23:16 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 49943

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> So a better suggestion with the above in mind would be to package it
> using the non-released 1.7-dev development branch which relies already
> on qtwebengine instead of qtwebkit.
>
> Would you like to give it a spin?

I have put this together. It doesn't crash anymore and relies on
qtwebengine, but some parts of it (e.g., interactive activities) are not
working properly. Not sure if that's related, but I see messages like

  QIODevice::read
  (QFile,"/gnu/store/…-openboard-1.7.0-a0255/share/openboard/library/interactivities/Dice.wgt"):device
  not open

on stderr.

Anyway, I attach the new package definition.

Regards,
-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add openboard (v2) --]
[-- Type: text/x-diff, Size: 6518 bytes --]

From 862ed34a048362c2682d82c32ea8c0ec4b2d6399 Mon Sep 17 00:00:00 2001
Message-Id: <862ed34a048362c2682d82c32ea8c0ec4b2d6399.1646522108.git.mail@nicolasgoaziou.fr>
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Sun, 6 Mar 2022 00:14:25 +0100
Subject: [PATCH v2] gnu: Add openboard.

* gnu/packages/education.scm (openboard): New variable.
---
 gnu/packages/education.scm | 126 +++++++++++++++++++++++++++++++++++++
 1 file changed, 126 insertions(+)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index 6fe79b99ca..891ffaf28b 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -543,6 +543,132 @@ (define-public childsplay
     (home-page "http://www.schoolsplay.org")
     (license license:gpl3+)))
 
+(define-public openboard
+  (let ((commit "3bd40ebe67c665950fffa4a7cee4943919f04add"))
+    (package
+      (name "openboard")
+      (version "1.7.0-a0255")
+      (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 "0kh2i02qgankda9ygq01bkm58fd2p6mcaddvw0ny901dg7a0qkbr"))))
+      (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/quazip")
+                   (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))
+      (inputs
+       (list alsa-lib
+             ffmpeg
+             freetype
+             lame
+             libass
+             libfdk
+             libressl
+             libtheora
+             libva
+             libvorbis
+             libvpx
+             libx264
+             opus
+             poppler
+             qtbase-5
+             qtdeclarative
+             qtmultimedia
+             qtsvg
+             qtwebchannel
+             qtwebengine
+             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))))
+
 (define-public omnitux
   (package
     (name "omnitux")
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2022-03-05 23:16         ` Nicolas Goaziou
@ 2022-03-06  9:03           ` Maxime Devos
  2022-03-08  4:53             ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Devos @ 2022-03-06  9:03 UTC (permalink / raw)
  To: Nicolas Goaziou, Maxim Cournoyer; +Cc: 49943

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

Nicolas Goaziou schreef op zo 06-03-2022 om 00:16 [+0100]:
> +            (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")))))

You have to add 'coreutils-minimal' (or 'coreutils') to 'inputs',
otherwise 'search-input-file' will fail when cross-compiling because
'bin/env' (from 'coreutils') is not among the inputs, whereas it is in
the (implicit) native-inputs when compiling natively and native-inputs
are merged into inputs when compiling natively.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#49943] [PATCH] gnu: Add openboard
  2022-03-06  9:03           ` Maxime Devos
@ 2022-03-08  4:53             ` Maxim Cournoyer
  2022-03-22 20:16               ` bug#49943: " Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2022-03-08  4:53 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 49943, Nicolas Goaziou

Hi Nicolas and Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

> Nicolas Goaziou schreef op zo 06-03-2022 om 00:16 [+0100]:
>> +            (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")))))
>
> You have to add 'coreutils-minimal' (or 'coreutils') to 'inputs',
> otherwise 'search-input-file' will fail when cross-compiling because
> 'bin/env' (from 'coreutils') is not among the inputs, whereas it is in
> the (implicit) native-inputs when compiling natively and native-inputs
> are merged into inputs when compiling natively.

I've tested it, and it was for the most part functional (only the
"games" add-on that I could integrate to the main screen didn't render
fully, perhaps because my WebGL support was marked as blacklisted (I use
the nouveau driver)).

LGTM, with the above comment from Maxime addressed!

Thank you!

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49943: [PATCH] gnu: Add openboard
  2022-03-08  4:53             ` Maxim Cournoyer
@ 2022-03-22 20:16               ` Maxim Cournoyer
  0 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2022-03-22 20:16 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Nicolas Goaziou, 49943-done

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hi Nicolas and Maxime,
>
> Maxime Devos <maximedevos@telenet.be> writes:
>
>> Nicolas Goaziou schreef op zo 06-03-2022 om 00:16 [+0100]:
>>> +            (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")))))
>>
>> You have to add 'coreutils-minimal' (or 'coreutils') to 'inputs',
>> otherwise 'search-input-file' will fail when cross-compiling because
>> 'bin/env' (from 'coreutils') is not among the inputs, whereas it is in
>> the (implicit) native-inputs when compiling natively and native-inputs
>> are merged into inputs when compiling natively.
>
> I've tested it, and it was for the most part functional (only the
> "games" add-on that I could integrate to the main screen didn't render
> fully, perhaps because my WebGL support was marked as blacklisted (I use
> the nouveau driver)).
>
> LGTM, with the above comment from Maxime addressed!

I went ahead and adjusted the version string to be monotonic, added
coreutils-minimal as an input, and pushed as 96b2da8cde.

Thanks,

Closing.

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-22 20:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 14:47 [bug#49943] [PATCH] gnu: Add openboard Nicolas Goaziou
2022-02-24  4:23 ` Maxim Cournoyer
2022-02-24 21:32   ` Nicolas Goaziou
2022-02-27  5:20     ` Maxim Cournoyer
2022-02-28 20:56       ` Maxim Cournoyer
2022-03-05 23:16         ` Nicolas Goaziou
2022-03-06  9:03           ` Maxime Devos
2022-03-08  4:53             ` Maxim Cournoyer
2022-03-22 20:16               ` bug#49943: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).