GNU bug report logs - #25787
[PATCH 0/6] Add Clementine music player.

Previous Next

Package: guix-patches;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Sat, 18 Feb 2017 17:54:02 UTC

Owned by: Ricardo Wurmus <rekado <at> elephly.net>

Severity: normal

Tags: moreinfo, patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25787 in the body.
You can then email your comments to 25787 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 17:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 18 Feb 2017 17:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: guix-patches <at> gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 0/6] Add Clementine music player.
Date: Sat, 18 Feb 2017 13:38:30 +0000
Hello guix!

Here are patches to add the Clementine music player [1] and its dependencies.
First of all, thanks all of you for Guix{,SD}!  It's a lot of fun to play
with.

I have a couple of questions about this series:

* cryptopp

I believe this *should* be an optional dependency but I wasn't able to disable
it.  It seems to be used for spotify support:

~~~(CMakeLists.txt)
if(NOT HAVE_SPOTIFY_BLOB AND NOT CRYPTOPP_FOUND)
  message(FATAL_ERROR "Either crypto++ must be available or the non-GPL Spotify "
          "code must be compiled in")
elseif(CRYPTOPP_FOUND)
  set(HAVE_CRYPTOPP ON)
  set(HAVE_SPOTIFY_DOWNLOADER ON)
endif()
~~~

What do you think?  Should we patch the above file to disable spotify support
or should we package cryptopp?  I've done the latter in this series.

* sqlite/nss

I ran into complications with this package when I realized Clementine needed
the FTS3 extension enabled in sqlite [2].  I've been able to test this but it
took an entire day to rebuild all packages depending on sqlite in my profile
:-P.  By the way, the fact I can do this is great!

As a result, the nss package was rebuilt and I consistently got 6 failures,
all due to a PayPal certificate.  I had no idea how to fix this so I updated
the nss package to the latest release and the tests passed.

So I suppose this series should probably go in a branch as it will require a
lot of rebuilding.

Thanks!
Pierre

1: http://clementine-player.org
2: https://sqlite.org/fts3.html

Pierre Langlois (6):
  gnu: Add qjson.
  gnu: Add libechonest.
  gnu: Add cryptopp.
  gnu: nss: Update to 3.28.1.
  gnu: sqlite: Enable FTS3.
  gnu: Add Clementine.

 gnu/packages/crypto.scm                  | 44 +++++++++++++++++
 gnu/packages/databases.scm               |  7 ++-
 gnu/packages/gnuzilla.scm                |  5 +-
 gnu/packages/music.scm                   | 82 ++++++++++++++++++++++++++++++++
 gnu/packages/patches/nss-pkgconfig.patch |  4 +-
 gnu/packages/qt.scm                      | 28 +++++++++++
 6 files changed, 165 insertions(+), 5 deletions(-)

-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 18:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 25787 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 1/6] gnu: Add qjson.
Date: Sat, 18 Feb 2017 18:00:16 +0000
* gnu/packages/qt.scm (qjson): New variable.
---
 gnu/packages/qt.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 47a7caae4..0895e034c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016, 2017 ng0 <ng0 <at> libertad.pw>
 ;;; Copyright © 2016 Thomas Danckaert <post <at> thomasdanckaert.be>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1135,6 +1136,33 @@ developers using C++ or QML, a CSS & JavaScript like language.")
      `(("qtbase" ,qtbase)
        ("qtdeclarative" ,qtdeclarative)))))
 
+(define-public qjson
+  (package
+    (name "qjson")
+    (version "0.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                     "https://github.com/flavio/qjson/archive/"
+                     version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                 "1m0h4rajj99hv9w4i381a8x81lxiv167lxk10ncvphpkfxs624p8"))))
+    (build-system cmake-build-system)
+    (arguments
+      ;; The tests require a X server
+      ;; #:configure-flags '("-DQJSON_BUILD_TESTS=ON")
+      `(#:tests? #f))
+    (inputs
+      `(("qt" ,qt-4)))
+    (home-page "http://qjson.sourceforge.net")
+    (synopsis "Library that maps JSON data to QVariant objects")
+    (description "QJson is a qt-based library that maps JSON data to QVariant
+objects.  JSON arrays will be mapped to QVariantList instances, while JSON's
+objects will be mapped to QVariantMap.")
+    (license license:lgpl2.1)))
+
 (define-public python-sip
   (package
     (name "python-sip")
-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 18:02:02 GMT) Full text and rfc822 format available.

Message #11 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 25787 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 2/6] gnu: Add libechonest.
Date: Sat, 18 Feb 2017 18:00:52 +0000
* gnu/packages/music.scm (libechonest): New variable.
---
 gnu/packages/music.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index ce874ac43..84c537d86 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2016 John J. Foerch <jjfoerch <at> earthlink.net>
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2017 ng0 <contact.ng0 <at> cryptolab.net>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2050,6 +2051,32 @@ detailed track info including timbre, pitch, rhythm and loudness information.
 @end enumerate\n")
     (license license:bsd-3)))
 
+(define-public libechonest
+  (package
+    (name "libechonest")
+    (version "2.3.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "git://anongit.kde.org/libechonest.git")
+                     (commit "6895a77a46c9bd4e009ae08515bd91dc3cfbf548")))
+              (file-name (string-append name "-" version "-checkout"))
+              (sha256
+               (base32
+                 "0xbavf9f355dl1d3qv59x4ryypqrdanh9xdvw2d0q66l008crdkq"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #f)) ; Tests require Internet access
+    (inputs
+      `(("qt" ,qt-4)
+        ("qjson" ,qjson)))
+    (home-page "https://projects.kde.org/projects/playground/libs/libechonest")
+    (synopsis "C++/Qt classes to interface with The Echo Nest API")
+    (description "libechonest is a collection of C++/Qt classes designed to make
+ a developer's life easy when trying to use the APIs provided by The Echo
+Nest.")
+    (license license:gpl2)))
+
 (define-public python-pylast
   (package
     (name "python-pylast")
-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 18:02:02 GMT) Full text and rfc822 format available.

Message #14 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 25787 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 3/6] gnu: Add cryptopp.
Date: Sat, 18 Feb 2017 18:01:13 +0000
* gnu/packages/crypto.scm (cryptopp): New variable.
---
 gnu/packages/crypto.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index fd2b5a36b..a8756e2ab 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2016 ng0 <ng0 <at> we.make.ritual.n0.is>
 ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -414,3 +415,46 @@ utility as a demonstration of the @code{scrypt} key derivation function.
 @code{Scrypt} is designed to be far more resistant against hardware brute-force
 attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.")
     (license license:bsd-2)))
+
+(define-public cryptopp
+  (let ((version "5.6.5"))
+    (package
+      (name "cryptopp")
+      (version version)
+      (source (origin
+                (method url-fetch)
+                (uri (string-append
+                       "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_"
+                       (string-join (string-split version #\.) "_") ".tar.gz"))
+                (file-name (string-append name "-" version ".tar.gz"))
+                (sha256
+                 (base32
+                   "11p6mak784mx8hjasg9alwk4g3q5bsfrik9lv73a34dinca5bzbr"))))
+      (build-system cmake-build-system)
+      (arguments
+        '(#:phases
+           (modify-phases %standard-phases
+             ;; A libcrypto++.pc file is not included, create it.
+             (add-after 'install 'install-pkg-config
+               (lambda* (#:key outputs #:allow-other-keys)
+                 (let* ((out (assoc-ref outputs "out"))
+                        (pkgconfig-path (string-append out "/lib/pkgconfig")))
+                   (mkdir-p pkgconfig-path)
+                   (with-output-to-file
+                     (string-append pkgconfig-path "/libcrypto++.pc")
+                     (lambda _
+                       (format #t
+                         "prefix=~@*~a~@
+                          libdir=${prefix}/lib~@
+                          includedir=${prefix}/include~@
+                          Name: libcrypto++-~1@*~a~@
+                          Description: Class library of cryptographic schemes~@
+                          Version: ~1@*~a~@
+                          Libs: -L${libdir} -lcryptopp~@
+                          Cflags: -I${includedir}~%"
+                         out version)))))))))
+      (home-page "https://cryptopp.com/")
+      (synopsis "C++ class library of cryptographic schemes")
+      (description "Crypto++ is a free C++ class library of cryptographic
+schemes.")
+      (license (list license:boost1.0 license:public-domain)))))
-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 18:03:01 GMT) Full text and rfc822 format available.

Message #17 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 25787 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 4/6] gnu: nss: Update to 3.28.1.
Date: Sat, 18 Feb 2017 18:01:55 +0000
* gnu/packages/gnuzilla.scm (nss): Update to 3.28.1.
* gnu/packages/patches/nss-pkgconfig.patch: Adjust DIRS.
---
 gnu/packages/gnuzilla.scm                | 5 +++--
 gnu/packages/patches/nss-pkgconfig.patch | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 9279c46b5..c6c5ff28a 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong <at> gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -186,7 +187,7 @@ in the Mozilla clients.")
 (define-public nss
   (package
     (name "nss")
-    (version "3.27.1")
+    (version "3.28.1")
     (source (origin
               (method url-fetch)
               (uri (let ((version-with-underscores
@@ -197,7 +198,7 @@ in the Mozilla clients.")
                       "nss-" version ".tar.gz")))
               (sha256
                (base32
-                "0sraxk26swlgl7rl742rkfp5k251v5z3lqw9k8ikin0cjfhkfdpx"))
+                "1bc23bg7adrxds3k3jdahy6g8f1ma57sggi0v3k275gdq02hrk2q"))
               ;; Create nss.pc and nss-config.
               (patches (search-patches "nss-pkgconfig.patch"))))
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/nss-pkgconfig.patch b/gnu/packages/patches/nss-pkgconfig.patch
index e611f69be..a33e05fcf 100644
--- a/gnu/packages/patches/nss-pkgconfig.patch
+++ b/gnu/packages/patches/nss-pkgconfig.patch
@@ -221,5 +221,5 @@ Later adapted to apply cleanly to nss-3.21.
  
  RELEASE = nss
  
--DIRS = coreconf lib cmd external_tests
-+DIRS = coreconf lib cmd external_tests config
+-DIRS = coreconf lib cmd gtests
++DIRS = coreconf lib cmd gtests config
-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 18:03:02 GMT) Full text and rfc822 format available.

Message #20 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 25787 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 5/6] gnu: sqlite: Enable FTS3.
Date: Sat, 18 Feb 2017 18:02:33 +0000
* gnu/packages/databases.scm (sqlite)[arguments]: Enable configure-flags
  -DSQLITE_ENABLE_FST3 -DSQLITE_ENABLE_FTS2_PARENTHESIS
  -DSQLITE_ENABLE_FTS3_TOKENIZER
---
 gnu/packages/databases.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index fd8baa153..171c85eef 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Andy Patterson <ajpatter <at> uwaterloo.ca>
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -704,9 +705,13 @@ for example from a shell script.")
       ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and
       ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS.  GNU Icecat will refuse
       ;; to use the system SQLite unless these options are enabled.
+      ;; Additionaly, Clementine needs support for the FTS3 extension.
       (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
                            "-DSQLITE_ENABLE_UNLOCK_NOTIFY "
-                           "-DSQLITE_ENABLE_DBSTAT_VTAB"))))
+                           "-DSQLITE_ENABLE_DBSTAT_VTAB "
+                           "-DSQLITE_ENABLE_FTS3 "
+                           "-DSQLITE_ENABLE_FTS3_PARENTHESIS "
+                           "-DSQLITE_ENABLE_FTS3_TOKENIZER"))))
    (home-page "http://www.sqlite.org/")
    (synopsis "The SQLite database management system")
    (description
-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Sat, 18 Feb 2017 18:03:02 GMT) Full text and rfc822 format available.

Message #23 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 25787 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 6/6] gnu: Add Clementine.
Date: Sat, 18 Feb 2017 18:02:49 +0000
* gnu/packages/music.scm (clementine): New variable.
---
 gnu/packages/music.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 84c537d86..fe8cad325 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -51,7 +51,10 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages datastructures)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
@@ -69,6 +72,7 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
@@ -76,6 +80,7 @@
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux) ; for alsa-utils
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages man)
   #:use-module (gnu packages mp3)
@@ -87,6 +92,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio) ;libsndfile
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages rdf)
@@ -172,6 +178,55 @@ and play MIDI files with a few clicks in a user-friendly interface offering
 score, keyboard, guitar, drum and controller views.")
     (license license:gpl3+)))
 
+(define-public clementine
+  (package
+    (name "clementine")
+    (version "1.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                     "https://github.com/clementine-player/Clementine/archive/"
+                     version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+                (base32
+                  "0z7k73wyz54c3020lb6x2dgw0vz4ri7wcl3vs03qdj5pk8d971gq"))))
+    (build-system cmake-build-system)
+    (arguments
+      '(#:tests? #f
+        ;; TODO: Package projectm to enable visualisations.
+        #:configure-flags '("-DENABLE_VISUALISATIONS=OFF")))
+    (native-inputs
+      `(("gettext" ,gettext-minimal)
+        ("pkg-config" ,pkg-config)))
+    (inputs
+      `(("boost" ,boost)
+        ("chromaprint" ,chromaprint)
+        ("cryptopp" ,cryptopp)
+        ("fftw" ,fftw)
+        ("glib" ,glib)
+        ("glu" ,glu)
+        ("gstreamer" ,gstreamer)
+        ("gst-plugins-base" ,gst-plugins-base)
+        ("libcdio" ,libcdio)
+        ("libechonest" ,libechonest)
+        ;; TODO: Package libgpod.
+        ("libmtp" ,libmtp)
+        ("libxml2" ,libxml2)
+        ("protobuf" ,protobuf)
+        ("pulseaudio" ,pulseaudio)
+        ("qjson" ,qjson)
+        ("qt" ,qt-4)
+        ("sqlite" ,sqlite)
+        ("sparsehash" ,sparsehash)
+        ("taglib" ,taglib)))
+    (home-page "http://clementine-player.org")
+    (synopsis "Music player and library organizer")
+    (description "Clementine is a multiplatform music player.  It is inspired
+by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and
+playing your music.")
+    (license license:gpl3)))
+
 (define-public cmus
   (package
     (name "cmus")
-- 
2.11.1





Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Mon, 20 Feb 2017 14:24:01 GMT) Full text and rfc822 format available.

Message #26 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Danckaert <post <at> thomasdanckaert.be>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6] 
Date: Mon, 20 Feb 2017 15:22:44 +0100 (CET)
Hi,

thanks for the patch, I'd like to use clementine on Guix!

I managed to build and run the program, but experienced some 
stability issues.  Importing music into the library seemed to work 
fine, but I couldn't really play back files:

 - The first few times, the program segfaulted when I tried to play 
files (I tried mp3 and ogg).

 - Then I ran it in the debugger and it didn't segfault anymore.

 - Then I tried it again without the debugger, and it didn't 
segfault,
   but now my desktop (Gnome on GuixSD) froze (while the music kept
   playing). I had switch to a tty and restart xorg-server.

Are you not experiencing stability issues?

> gnu: Add qjson.
>
> * gnu/packages/qt.scm (qjson): New variable.
> [...]
> +      ;; The tests require a X server
> +      ;; #:configure-flags '("-DQJSON_BUILD_TESTS=ON")
> +      `(#:tests? #f))

Have you tried  (setenv "QT_QPA_PLATFORM" "offscreen") to try running 
the tests anyway?  Another approach that is sometimes used is 
starting an X server with

(system (format #f "~a/bin/Xvfb :1 &" xorg-server))
(setenv "DISPLAY" ":1")

The rest of the patches look good to me. Hopefully someone else can 
comment on the cryptopp issue (I don't necessarily see why it is 
necessary to exclude it).

cheers,

Thomas




Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 15:29:01 GMT) Full text and rfc822 format available.

Message #29 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 0/6] Add Clementine music player.
Date: Wed, 22 Feb 2017 16:28:23 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> Hello guix!
>
> Here are patches to add the Clementine music player [1] and its dependencies.
> First of all, thanks all of you for Guix{,SD}!  It's a lot of fun to play
> with.

Hi Pierre!

Thanks a lot for packaging this!

> I have a couple of questions about this series:
>
> * cryptopp
>
> I believe this *should* be an optional dependency but I wasn't able to disable
> it.  It seems to be used for spotify support:
>
> ~~~(CMakeLists.txt)
> if(NOT HAVE_SPOTIFY_BLOB AND NOT CRYPTOPP_FOUND)
>   message(FATAL_ERROR "Either crypto++ must be available or the non-GPL Spotify "
>           "code must be compiled in")
> elseif(CRYPTOPP_FOUND)
>   set(HAVE_CRYPTOPP ON)
>   set(HAVE_SPOTIFY_DOWNLOADER ON)
> endif()
> ~~~
>
> What do you think?  Should we patch the above file to disable spotify support
> or should we package cryptopp?  I've done the latter in this series.

I don't see any reason not to use crypto++ here.

> * sqlite/nss
>
> I ran into complications with this package when I realized Clementine needed
> the FTS3 extension enabled in sqlite [2].  I've been able to test this but it
> took an entire day to rebuild all packages depending on sqlite in my profile
> :-P.  By the way, the fact I can do this is great!

I wonder why FTS3 is not enabled by default in sqlite, as it seems
useful. Any idea? If there are performance or compatibility problems, we
could probably ship it as a separate package.

> As a result, the nss package was rebuilt and I consistently got 6 failures,
> all due to a PayPal certificate.  I had no idea how to fix this so I updated
> the nss package to the latest release and the tests passed.

Yes, this is a known problem.

https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00828.html

We also tried updating to 3.28 recently, but it also fails to build on
ARM platforms, so we're currently "stuck" on 3.27.1.

https://lists.gnu.org/archive/html/guix-devel/2017-01/msg01982.html

> So I suppose this series should probably go in a branch as it will require a
> lot of rebuilding.

For now, you can define a separate sqlite package with FTS enabled. See
e.g. "gd-for-php" in php.scm for an example of inheriting a package, and
grep around for 'substitute-keyword-arguments' to see how to override
inherited configure flags.

I will comment on the other patches individually. Thank you!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 15:54:01 GMT) Full text and rfc822 format available.

Message #32 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 3/6] gnu: Add cryptopp.
Date: Wed, 22 Feb 2017 16:53:19 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> * gnu/packages/crypto.scm (cryptopp): New variable.

I've actually been sitting on this package for a while, hoping they
would release a version with this fix:

https://github.com/weidai11/cryptopp/pull/347

Can you try to extract out the commit and add it as a patch?

> diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
> index fd2b5a36b..a8756e2ab 100644
> --- a/gnu/packages/crypto.scm
> +++ b/gnu/packages/crypto.scm
> @@ -6,6 +6,7 @@
>  ;;; Copyright © 2016 Tobias Geerinckx-Rice <me <at> tobias.gr>
>  ;;; Copyright © 2016 ng0 <ng0 <at> we.make.ritual.n0.is>
>  ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
> +;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -414,3 +415,46 @@ utility as a demonstration of the @code{scrypt} key derivation function.
>  @code{Scrypt} is designed to be far more resistant against hardware brute-force
>  attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.")
>      (license license:bsd-2)))
> +
> +(define-public cryptopp
> +  (let ((version "5.6.5"))

I don't think it's necessary to bind the "version" variable outside the
package scope.

> +    (package
> +      (name "cryptopp")

I would call this "crypto++" both here and in the variable name. It
matches the upstream project name more closely, and is also how it is
known in the Common Platform Enumerations (CPE) database.[0]

https://lists.gnu.org/archive/html/guix-devel/2017-02/msg00587.html

> +      (version version)
> +      (source (origin
> +                (method url-fetch)
> +                (uri (string-append
> +                       "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_"
> +                       (string-join (string-split version #\.) "_") ".tar.gz"))

Please download from the home page when possible:

https://cryptopp.com/cryptopp565.zip

> +                (file-name (string-append name "-" version ".tar.gz"))
> +                (sha256
> +                 (base32
> +                   "11p6mak784mx8hjasg9alwk4g3q5bsfrik9lv73a34dinca5bzbr"))))
> +      (build-system cmake-build-system)
> +      (arguments
> +        '(#:phases
> +           (modify-phases %standard-phases
> +             ;; A libcrypto++.pc file is not included, create it.

Nice!

> +             (add-after 'install 'install-pkg-config
> +               (lambda* (#:key outputs #:allow-other-keys)
> +                 (let* ((out (assoc-ref outputs "out"))
> +                        (pkgconfig-path (string-append out "/lib/pkgconfig")))
> +                   (mkdir-p pkgconfig-path)
> +                   (with-output-to-file
> +                     (string-append pkgconfig-path "/libcrypto++.pc")
> +                     (lambda _
> +                       (format #t
> +                         "prefix=~@*~a~@
> +                          libdir=${prefix}/lib~@
> +                          includedir=${prefix}/include~@
> +                          Name: libcrypto++-~1@*~a~@
> +                          Description: Class library of cryptographic schemes~@
> +                          Version: ~1@*~a~@
> +                          Libs: -L${libdir} -lcryptopp~@
> +                          Cflags: -I${includedir}~%"
> +                         out version)))))))))

Ahh.. This is why it was let-bound. You can "unquote" version here to
make it be evaluated without binding it at the top level. Note: You
probably also have to "quasiquote" the arguments with ` instead of ' (on
the line that contains #:phases).

> +      (home-page "https://cryptopp.com/")
> +      (synopsis "C++ class library of cryptographic schemes")
> +      (description "Crypto++ is a free C++ class library of cryptographic
> +schemes.")
> +      (license (list license:boost1.0 license:public-domain)))))

This needs a comment explaining what is covered by which license.

Can you send an updated patch? :)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 16:00:02 GMT) Full text and rfc822 format available.

Message #35 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 1/6] gnu: Add qjson.
Date: Wed, 22 Feb 2017 16:59:15 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> * gnu/packages/qt.scm (qjson): New variable.
> ---
>  gnu/packages/qt.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index 47a7caae4..0895e034c 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -5,6 +5,7 @@
>  ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim <at> flashner.co.il>
>  ;;; Copyright © 2016, 2017 ng0 <ng0 <at> libertad.pw>
>  ;;; Copyright © 2016 Thomas Danckaert <post <at> thomasdanckaert.be>
> +;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1135,6 +1136,33 @@ developers using C++ or QML, a CSS & JavaScript like language.")
>       `(("qtbase" ,qtbase)
>         ("qtdeclarative" ,qtdeclarative)))))
>  
> +(define-public qjson
> +  (package
> +    (name "qjson")
> +    (version "0.9.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                     "https://github.com/flavio/qjson/archive/"
> +                     version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                 "1m0h4rajj99hv9w4i381a8x81lxiv167lxk10ncvphpkfxs624p8"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +      ;; The tests require a X server
> +      ;; #:configure-flags '("-DQJSON_BUILD_TESTS=ON")

This line is not necessary.

> +      `(#:tests? #f))
> +    (inputs
> +      `(("qt" ,qt-4)))

Will this work with qt5 as well? If so, please build against "qtbase"
here. Then you can add a qt4 variant by adding something like this at
the end:

(define-public qjson-qt4
  (package (inherit qjson)
           (name "qjson-qt4")
           (inputs
            `(("qt" ,qt-4)))))

Otherwise LGTM!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 16:04:02 GMT) Full text and rfc822 format available.

Message #38 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 2/6] gnu: Add libechonest.
Date: Wed, 22 Feb 2017 17:03:57 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> * gnu/packages/music.scm (libechonest): New variable.
> ---
>  gnu/packages/music.scm | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index ce874ac43..84c537d86 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -9,6 +9,7 @@
>  ;;; Copyright © 2016 John J. Foerch <jjfoerch <at> earthlink.net>
>  ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
>  ;;; Copyright © 2017 ng0 <contact.ng0 <at> cryptolab.net>
> +;;; Copyright © 2017 Pierre Langlois <pierre.langlois <at> gmx.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -2050,6 +2051,32 @@ detailed track info including timbre, pitch, rhythm and loudness information.
>  @end enumerate\n")
>      (license license:bsd-3)))
>  
> +(define-public libechonest
> +  (package
> +    (name "libechonest")
> +    (version "2.3.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                     (url "git://anongit.kde.org/libechonest.git")
> +                     (commit "6895a77a46c9bd4e009ae08515bd91dc3cfbf548")))
> +              (file-name (string-append name "-" version "-checkout"))

Could you add a comment explaining why we can't use a normal release
tarball here?

> +              (sha256
> +               (base32
> +                 "0xbavf9f355dl1d3qv59x4ryypqrdanh9xdvw2d0q66l008crdkq"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     '(#:tests? #f)) ; Tests require Internet access
> +    (inputs
> +      `(("qt" ,qt-4)
> +        ("qjson" ,qjson)))

Same comment here about using Qt5 by default (if possible), and adding
qt4 variants where necessary.

> +    (home-page "https://projects.kde.org/projects/playground/libs/libechonest")
> +    (synopsis "C++/Qt classes to interface with The Echo Nest API")
> +    (description "libechonest is a collection of C++/Qt classes designed to make

@code{libechonest} ...

> + a developer's life easy when trying to use the APIs provided by The Echo
> +Nest.")

Could you explain briefly what "The Echo Nest" is here?

> +    (license license:gpl2)))

Do the sources explicitly specify "version 2 only"? Otherwise it should
probably be gpl2+. Otherwise this package LGTM.

> +
>  (define-public python-pylast
>    (package
>      (name "python-pylast")
> -- 
> 2.11.1
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 16:14:02 GMT) Full text and rfc822 format available.

Message #41 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
Date: Wed, 22 Feb 2017 17:13:29 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> * gnu/packages/music.scm (clementine): New variable.
> ---
>  gnu/packages/music.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 84c537d86..fe8cad325 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -51,7 +51,10 @@
>    #:use-module (gnu packages check)
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages curl)
> +  #:use-module (gnu packages crypto)
>    #:use-module (gnu packages cyrus-sasl)
> +  #:use-module (gnu packages databases)
> +  #:use-module (gnu packages datastructures)
>    #:use-module (gnu packages docbook)
>    #:use-module (gnu packages documentation)
>    #:use-module (gnu packages emacs)
> @@ -69,6 +72,7 @@
>    #:use-module (gnu packages glib)
>    #:use-module (gnu packages gnome)
>    #:use-module (gnu packages graphics)
> +  #:use-module (gnu packages gstreamer)
>    #:use-module (gnu packages gtk)
>    #:use-module (gnu packages guile)
>    #:use-module (gnu packages image)
> @@ -76,6 +80,7 @@
>    #:use-module (gnu packages java)
>    #:use-module (gnu packages linux) ; for alsa-utils
>    #:use-module (gnu packages libffi)
> +  #:use-module (gnu packages libusb)
>    #:use-module (gnu packages llvm)
>    #:use-module (gnu packages man)
>    #:use-module (gnu packages mp3)
> @@ -87,6 +92,7 @@
>    #:use-module (gnu packages perl)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages pulseaudio) ;libsndfile
> +  #:use-module (gnu packages protobuf)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages qt)
>    #:use-module (gnu packages rdf)
> @@ -172,6 +178,55 @@ and play MIDI files with a few clicks in a user-friendly interface offering
>  score, keyboard, guitar, drum and controller views.")
>      (license license:gpl3+)))
>  
> +(define-public clementine
> +  (package
> +    (name "clementine")
> +    (version "1.3.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                     "https://github.com/clementine-player/Clementine/archive/"
> +                     version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))

I noticed they have a qt5 branch:

https://github.com/clementine-player/Clementine/tree/qt5

Would you be willing to see if it is in a usable condition? QT4 is no
longer supported upstream, so I'm hesitant to add packages that depend
on it.

> +              (sha256
> +                (base32
> +                  "0z7k73wyz54c3020lb6x2dgw0vz4ri7wcl3vs03qdj5pk8d971gq"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +      '(#:tests? #f

Please add a comment mentioning why tests are disabled.

> +        ;; TODO: Package projectm to enable visualisations.
> +        #:configure-flags '("-DENABLE_VISUALISATIONS=OFF")))
> +    (native-inputs
> +      `(("gettext" ,gettext-minimal)
> +        ("pkg-config" ,pkg-config)))
> +    (inputs
> +      `(("boost" ,boost)
> +        ("chromaprint" ,chromaprint)
> +        ("cryptopp" ,cryptopp)
> +        ("fftw" ,fftw)
> +        ("glib" ,glib)
> +        ("glu" ,glu)
> +        ("gstreamer" ,gstreamer)
> +        ("gst-plugins-base" ,gst-plugins-base)
> +        ("libcdio" ,libcdio)
> +        ("libechonest" ,libechonest)
> +        ;; TODO: Package libgpod.
> +        ("libmtp" ,libmtp)
> +        ("libxml2" ,libxml2)
> +        ("protobuf" ,protobuf)
> +        ("pulseaudio" ,pulseaudio)
> +        ("qjson" ,qjson)
> +        ("qt" ,qt-4)
> +        ("sqlite" ,sqlite)
> +        ("sparsehash" ,sparsehash)
> +        ("taglib" ,taglib)))
> +    (home-page "http://clementine-player.org")
> +    (synopsis "Music player and library organizer")
> +    (description "Clementine is a multiplatform music player.  It is inspired
> +by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and
> +playing your music.")
> +    (license license:gpl3)))

Same comment here about the license, it's most likely gpl3+.

Otherwise LGTM, thanks a lot for packaging this!

I skipped commenting on the nss and sqlite patches. For now, I would be
happy to just use a "sqlite-for-clementine" package here, since it's the
only package that requires the FTS3 extension.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 16:29:01 GMT) Full text and rfc822 format available.

Message #44 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 3/6] gnu: Add cryptopp.
Date: Wed, 22 Feb 2017 17:28:07 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

>> +             (add-after 'install 'install-pkg-config
>> +               (lambda* (#:key outputs #:allow-other-keys)
>> +                 (let* ((out (assoc-ref outputs "out"))
>> +                        (pkgconfig-path (string-append out "/lib/pkgconfig")))
>> +                   (mkdir-p pkgconfig-path)
>> +                   (with-output-to-file
>> +                     (string-append pkgconfig-path "/libcrypto++.pc")
>> +                     (lambda _
>> +                       (format #t
>> +                         "prefix=~@*~a~@
>> +                          libdir=${prefix}/lib~@
>> +                          includedir=${prefix}/include~@
>> +                          Name: libcrypto++-~1@*~a~@
>> +                          Description: Class library of cryptographic schemes~@
>> +                          Version: ~1@*~a~@
>> +                          Libs: -L${libdir} -lcryptopp~@
>> +                          Cflags: -I${includedir}~%"
>> +                         out version)))))))))
>
> Ahh.. This is why it was let-bound. You can "unquote" version here to
> make it be evaluated without binding it at the top level. Note: You
> probably also have to "quasiquote" the arguments with ` instead of ' (on
> the line that contains #:phases).

I forgot to explain what "unquote" means. It's the ',' symbol, meaning
"insert the result of this expression". Read more about unquote and
quasiquote here:

https://www.gnu.org/software/guile/manual/guile.html#Expression-Syntax

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 22 Feb 2017 22:25:02 GMT) Full text and rfc822 format available.

Message #47 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Thomas Danckaert <post <at> thomasdanckaert.be>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6]
Date: Wed, 22 Feb 2017 22:23:52 +0000
Hi Thomas,

Thanks for taking a look and testing! I'll send a v2 of the series
addressing your comments and Marius'.

Thomas Danckaert writes:

> Hi,
>
> thanks for the patch, I'd like to use clementine on Guix!
>
> I managed to build and run the program, but experienced some 
> stability issues.  Importing music into the library seemed to work 
> fine, but I couldn't really play back files:
>
>   - The first few times, the program segfaulted when I tried to play 
> files (I tried mp3 and ogg).

Ah I see what's happening! I had gst-plugin-{good,bad,ugly} installed in
my profile, it crashes for me too if I remove them. However, we should
have gotten a pop-up complaining about missing plugins not a crash! It
turns out wrapping the clementine binary setting GST_PLUGIN_SYSTEM_PATH
fixes the issue, as done an a few other packages.

We could also add the plugins as propagated inputs, but I'd say it's
better to let people install only the plugins they need. What do you
think?

>
>   - Then I ran it in the debugger and it didn't segfault anymore.
>
>   - Then I tried it again without the debugger, and it didn't 
> segfault,
>     but now my desktop (Gnome on GuixSD) froze (while the music kept
>     playing). I had switch to a tty and restart xorg-server.

Ouch, sorry! I've just tested it in Gnome with the changes I mention
above and it seems to work.

>
> Are you not experiencing stability issues?
>
>> gnu: Add qjson.
>>
>> * gnu/packages/qt.scm (qjson): New variable.
>> [...]
>> +      ;; The tests require a X server
>> +      ;; #:configure-flags '("-DQJSON_BUILD_TESTS=ON")
>> +      `(#:tests? #f))
>
> Have you tried  (setenv "QT_QPA_PLATFORM" "offscreen") to try running 
> the tests anyway?  Another approach that is sometimes used is 
> starting an X server with
>
> (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
> (setenv "DISPLAY" ":1")

Oh nice, I didn't realize you could do this. The X server approach
works but not the QPA one. I'm guessing this is because QPA_PLATFORM is
a QT5 only feature (?). I'll follow Marius' suggestion and see if we can
have both QT5 and QT4 versions of qjson. Or maybe we can have the QT5
version of clementine, I haven't tried to build it yet.

Thanks!
Pierre




Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Thu, 23 Feb 2017 17:09:01 GMT) Full text and rfc822 format available.

Message #50 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Danckaert <post <at> thomasdanckaert.be>
To: pierre.langlois <at> gmx.com
Cc: 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6]
Date: Thu, 23 Feb 2017 18:07:40 +0100 (CET)
From: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: Re: bug#25787: [PATCH 6/6]
Date: Wed, 22 Feb 2017 22:23:52 +0000

> Ah I see what's happening! I had gst-plugin-{good,bad,ugly} 
> installed in
> my profile, it crashes for me too if I remove them. However, we 
> should
> have gotten a pop-up complaining about missing plugins not a crash! 
> It
> turns out wrapping the clementine binary setting 
> GST_PLUGIN_SYSTEM_PATH
> fixes the issue, as done an a few other packages.

Indeed, for the first test, I think I only had installed “ugly” and 
“good”, but not “base”.  I then installed “base” plugins, too, and it 
worked.  I now see that our “gst-plugins-base” package propagates the 
“gstreamer” package, which in turn sets GST_PLUGIN_SYSTEM_PATH.  And 
indeed, the rhythmbox executable is wrapped, which explains why that 
works.

I wonder if gst-plugins-good and gst-plugins-ugly should propagate 
gst-plugins-base (like gst-plugins-bad already does)? Or maybe 
gst-plugins-bad should not propagate gst-plugins-base?

Of course the fact that Clementine crashes when 
GST_PLUGIN_SYSTEM_PATH isn't set correctly is a bug, IMO.

> We could also add the plugins as propagated inputs, but I'd say it's
> better to let people install only the plugins they need. What do you
> think?

Yes, I think it's better to let users choose. Especially with the 
patent issues that may or may not affect the “ugly” plugins.

> Or maybe we can have the QT5 version of clementine, I haven't tried
> to build it yet.

That would be ideal, I had a look at the comments at their 
repository, and it seemed like the Qt5 port was still experimental, 
but I haven't actually tried it.

I'll test your next patches.

Thomas

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Fri, 10 Mar 2017 07:59:02 GMT) Full text and rfc822 format available.

Message #53 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: Marius Bakke <mbakke <at> fastmail.com>, 25787 <at> debbugs.gnu.org,
 Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#25787: [PATCH 5/6] gnu: sqlite: Enable FTS3.
Date: Fri, 10 Mar 2017 08:58:22 +0100
Hello Pierre,

Pierre Langlois <pierre.langlois <at> gmx.com> skribis:

> * gnu/packages/databases.scm (sqlite)[arguments]: Enable configure-flags
>   -DSQLITE_ENABLE_FST3 -DSQLITE_ENABLE_FTS2_PARENTHESIS
>   -DSQLITE_ENABLE_FTS3_TOKENIZER

LGTM!  Since this requires a rebuild of 2912 packages (per “guix refresh
-l sqlite <at> 3.14”), this should go to the ‘core-updates’ branch¹.

Leo, Marius: is it still time to apply there?

Thanks!

Ludo’.

¹ https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00933.html




Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Fri, 10 Mar 2017 08:01:01 GMT) Full text and rfc822 format available.

Message #56 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
Date: Fri, 10 Mar 2017 09:00:27 +0100
Marius Bakke <mbakke <at> fastmail.com> skribis:

> I skipped commenting on the nss and sqlite patches. For now, I would be
> happy to just use a "sqlite-for-clementine" package here, since it's the
> only package that requires the FTS3 extension.

Oh right, we can do that in ‘master’.

Pierre: now that you have overwhelming feedback ;-), could you send
updated patches?  Please let us know what you think.

Thanks for all the work!

Ludo’.




Added tag(s) moreinfo. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Fri, 10 Mar 2017 08:31:03 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 03 May 2017 21:59:02 GMT) Full text and rfc822 format available.

Message #61 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: Marius Bakke <mbakke <at> fastmail.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
Date: Wed, 03 May 2017 23:57:48 +0200
Pierre, did you have any chance to look at this?

  https://bugs.gnu.org/25787

TIA!

Ludo’.

ludo <at> gnu.org (Ludovic Courtès) skribis:

> Marius Bakke <mbakke <at> fastmail.com> skribis:
>
>> I skipped commenting on the nss and sqlite patches. For now, I would be
>> happy to just use a "sqlite-for-clementine" package here, since it's the
>> only package that requires the FTS3 extension.
>
> Oh right, we can do that in ‘master’.
>
> Pierre: now that you have overwhelming feedback ;-), could you send
> updated patches?  Please let us know what you think.
>
> Thanks for all the work!
>
> Ludo’.




Owner recorded as Ricardo Wurmus <rekado <at> elephly.net>. Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Tue, 10 Oct 2017 22:12:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#25787; Package guix-patches. (Wed, 25 Oct 2017 15:56:01 GMT) Full text and rfc822 format available.

Message #66 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>,
 Marius Bakke <mbakke <at> fastmail.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
Date: Wed, 25 Oct 2017 16:09:07 +0200
Hi Pierre,

I have taken your patches and implemented the suggested changes.  The
only remaining problem is that Clementine seems to bundle a lot of
libraries, which is why I’m not comfortable with pushing the updated
version as is.

QJson is not found, but it is used by a bundled library anyway, so I
think the bundling should be fixed first.

Attached is the updated version of the Clementine patch.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net


commit b8b691c88bd80aef6674ff97d1d924aa37193042 (clementine)
Author: Pierre Langlois <pierre.langlois <at> gmx.com>
Date:   Wed Oct 25 15:14:05 2017 +0200

    gnu: Add clementine.
    
    * gnu/packages/music.scm (clementine): New variable.
    
    Co-authored-by: Ricardo Wurmus <rekado <at> elephly.net>

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 2fd38362c..6f659fe83 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -54,8 +54,11 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages datastructures)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
@@ -73,12 +76,14 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages java)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux) ; for alsa-utils
   #:use-module (gnu packages lirc)
   #:use-module (gnu packages llvm)
@@ -91,6 +96,7 @@
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio) ;libsndfile
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
@@ -176,6 +182,77 @@ and play MIDI files with a few clicks in a user-friendly interface offering
 score, keyboard, guitar, drum and controller views.")
     (license license:gpl3+)))
 
+;; We don't use the latest release because it depends on Qt4.  Instead we
+;; download the sources from the tip of the "qt5" branch.
+(define-public clementine
+  (let ((commit "0a59257dc334b8df60a4d7d90b04f1766747efcf")
+        (revision "1"))
+    (package
+      (name "clementine")
+      (version (string-append "1.3.1-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/clementine-player/Clementine.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "0cdcj7di7j9jgzc1ihjna1a5df64f9hnmx7b9kh8rlg76hc0l0hi"))))
+      (build-system cmake-build-system)
+      (arguments
+       '(;#:tests? #f
+         #:configure-flags
+         (let ((crypto (assoc-ref %build-inputs "crypto++")))
+           (list "-DENABLE_VISUALISATIONS=OFF" ; requires unpackaged "projectm"
+                 "-DCRYPTOPP_FOUND=TRUE"
+                 (string-append "-DCRYPTOPP_INCLUDE_DIRS=" crypto "/include")
+                 (string-append "-DCRYPTOPP_LIBRARY_DIRS=" crypto "/lib")
+                 (string-append "-DCRYPTOPP_LIBRARIES=" crypto "/lib/libcryptopp.a")))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out             (assoc-ref outputs "out"))
+                     (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
+                     (grl-plugin-path (getenv "GRL_PLUGIN_PATH")))
+                 (wrap-program (string-append out "/bin/clementine")
+                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
+                   `("GRL_PLUGIN_PATH"        ":" prefix (,grl-plugin-path))))
+               #t)))))
+      (native-inputs
+       `(("gettext" ,gettext-minimal)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("boost" ,boost)
+         ("chromaprint" ,chromaprint)
+         ("crypto++" ,crypto++)
+         ("fftw" ,fftw)
+         ("glib" ,glib)
+         ("glu" ,glu)
+         ("gstreamer" ,gstreamer)
+         ("gst-plugins-base" ,gst-plugins-base)
+         ("libcdio" ,libcdio)
+         ("libechonest" ,libechonest)
+         ;; TODO: Package libgpod.
+         ("libmtp" ,libmtp)
+         ("libxml2" ,libxml2)
+         ("protobuf" ,protobuf)
+         ("pulseaudio" ,pulseaudio)
+         ;; TODO: this is not found!
+         ("qjson" ,qjson)
+         ("qtbase" ,qtbase)
+         ("qtx11extras" ,qtx11extras)
+         ("sqlite" ,sqlite-with-fts3)
+         ("sparsehash" ,sparsehash)
+         ("taglib" ,taglib)))
+      (home-page "http://clementine-player.org")
+      (synopsis "Music player and library organizer")
+      (description "Clementine is a multiplatform music player.  It is inspired
+by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and
+playing your music.")
+      (license license:gpl3+))))
+
 (define-public cmus
   (package
     (name "cmus")





Information forwarded to guix-patches <at> gnu.org, Ricardo Wurmus <rekado <at> elephly.net>:
bug#25787; Package guix-patches. (Sun, 29 Oct 2017 20:13:02 GMT) Full text and rfc822 format available.

Message #69 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Marius Bakke <mbakke <at> fastmail.com>,
 Ludovic Courtès <ludo <at> gnu.org>,
 Pierre Langlois <pierre.langlois <at> gmx.com>, 25787 <at> debbugs.gnu.org
Subject: Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
Date: Sun, 29 Oct 2017 20:11:59 +0000
Hi Ricardo

Ricardo Wurmus writes:

> Hi Pierre,
>
> I have taken your patches and implemented the suggested changes. 
> The
> only remaining problem is that Clementine seems to bundle a lot 
> of
> libraries, which is why I’m not comfortable with pushing the 
> updated
> version as is.

Thanks a lot for looking at this! I'm sorry I've left this 
dragging for
so long, let me get my act together and complete this :-).

About the bundling, I agree this is problematic and I'm afraid I 
haven't
been able to get rid of all of them. The remaining libs still 
bundled
are:

 - qxt: It appears to have gone unmaintained and Clementine devs 
 have
   updated it for it to work with qt5.

 - qtsingleapplication: Needs packaging. I might take a stab at 
 it but
   I'm not sure I'll have the time. But, the CMakeLists.txt file 
   says
   the bundled version is patched so I'm unsure just packaging it 
   will
   be enough.

 - gmock: We have gmock in our googletest package but the tests
   segfault with it. The bundled version might be too old.

 - qsqlite: They have bundled the QT sqlite driver:
~~~(CMakeList.txt)
# Build our copy of QSqlLiteDriver.
# We do this because we can't guarantee that the driver shipped 
 with Qt exposes the
# raw sqlite3_ functions required for FTS support. This way we 
 know that those symbols
# exist at compile-time and that our code links to the same sqlite 
 library as the
# Qt driver.
~~~
 I tried to build a version a qtbase with sqlite-with-fts3 as 
 input
 instead of sqlite, to see if that could be a replacement. But 
 the
 symbols where still not found so I'm unsure what to do here.

 Finally, I haven't had the time to look at those last two:
 - qocoa
 - qtiocompressor

I was able to unbundle "libmygpo-qt" (new package) and "sha2" 
(replaced
by openssl).

>
> QJson is not found, but it is used by a bundled library anyway, 
> so I
> think the bundling should be fixed first.

So, as it turns out only libmygpo-qt's QT4 version was depending 
on
qjson, so this is no longer necessary for clementine!

>
> Attached is the updated version of the Clementine patch.

Thanks again! I have update the patch to remove the unbundled libs 
and
enabled testing.

Pierre




Information forwarded to guix-patches <at> gnu.org, Ricardo Wurmus <rekado <at> elephly.net>:
bug#25787; Package guix-patches. (Sun, 29 Oct 2017 20:14:02 GMT) Full text and rfc822 format available.

Message #72 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Marius Bakke <mbakke <at> fastmail.com>, 25787 <at> debbugs.gnu.org
Subject: [PATCH 01/26] gnu: Add libmygpo-qt.
Date: Sun, 29 Oct 2017 20:12:59 +0000
* gnu/packages/music.scm (libmygpo-qt): New variable.
* gnu/packages/patches/libmygpo-qt-fix-jsoncreatortest.patch: New 
 file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk                                       |  1 +
gnu/packages/music.scm                             | 27 
++++++++++++++
.../patches/libmygpo-qt-fix-jsoncreatortest.patch  | 41 
++++++++++++++++++++++
3 files changed, 69 insertions(+)
create mode 100644 
gnu/packages/patches/libmygpo-qt-fix-jsoncreatortest.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 90dc7aec1..3012976a8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -801,6 +801,7 @@ dist_patch_DATA = 
\
  %D%/packages/patches/libmad-armv7-thumb-pt2.patch		\
  %D%/packages/patches/libmad-frame-length.patch		\
  %D%/packages/patches/libmad-mips-newgcc.patch 
  \
+  %D%/packages/patches/libmygpo-qt-fix-jsoncreatortest.patch	\
  %D%/packages/patches/libsndfile-armhf-type-checks.patch	\
  %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch 
  \
  %D%/packages/patches/libsndfile-CVE-2017-8362.patch		\
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index f5df44070..55ae15f1a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3367,3 +3367,30 @@ the electronic or dubstep genre.")
designed to make a developer's life easy when trying to use the 
APIs provided
by The Echo Nest.")
    (license license:gpl2+)))
+
+(define-public libmygpo-qt
+  (package
+    (name "libmygpo-qt")
+    (version "1.0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append 
"http://stefan.derkits.at/files/libmygpo-qt/libmygpo-qt."
+              version ".tar.gz"))
+       (sha256
+         (base32 
"1wsgh2vjnd52rkvpncj1ycpbp84sj9hh12ija46b42z9mmqf2jm4"))
+       (patches (search-patches 
"libmygpo-qt-fix-jsoncreatortest.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+      '(#:configure-flags '("-DBUILD_WITH_QT4=OFF")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+      `(("qt" ,qtbase)))
+    (home-page "http://wiki.gpodder.org/wiki/Libmygpo-qt")
+    (synopsis "Qt/C++ library wrapping the 
@url{https://gpodder.net}
+Webservice")
+    (description "@code{libmygpo-qt} is a Qt/C++ library wrapping 
the
+@url{https://gpodder.net} APIs.  It allows applications to 
discover, manage
+and track podcasts.")
+    (license license:lgpl2.1+)))
diff --git 
a/gnu/packages/patches/libmygpo-qt-fix-jsoncreatortest.patch 
b/gnu/packages/patches/libmygpo-qt-fix-jsoncreatortest.patch
new file mode 100644
index 000000000..c457d592c
--- /dev/null
+++ b/gnu/packages/patches/libmygpo-qt-fix-jsoncreatortest.patch
@@ -0,0 +1,41 @@
+From ebe2323727f8d646590245b0bf06dbc92b5808d6 Mon Sep 17 00:00:00 
2001
+From: Golubev Alexander <fatzer2 <at> gmail.com>
+Date: Tue, 20 Sep 2016 15:33:30 +0400
+Subject: [PATCH] JsonCreatorTest failed due to extra space
+
+JsonCreatorTest failed with next message:
+```
+********* Start testing of mygpo::JsonCreatorTest *********
+Config: Using QTest library 4.8.6, Qt 4.8.6
+PASS   : mygpo::JsonCreatorTest::initTestCase()
+PASS   : mygpo::JsonCreatorTest::testAddRemoveSubsToJSON()
+PASS   : mygpo::JsonCreatorTest::testSaveSettingsToJSON()
+FAIL!  : mygpo::JsonCreatorTest::testEpisodeActionListToJSON() 
Compared values are not the same
+   Actual (outString2): 
[{"action":"download","device":"device1","episode":"http://episode.url","podcast":"http://podcast.url","timestamp":"1998-01-01T00:01:02"},{"action":"delete","device":"device3","episode":"http://episode2.url","podcast":"http://podcast2.url","timestamp":"1920-01-01T12:01:02"},{"action":"new","device":"foodev","episode":"http://www.podtrac.com","podcast":"http://leo.am","timestamp":"1998-01-01T00:01:02"},{"action":"play","device":"foodev","episode":"http://www.podtrac.com","podcast":"http://leo.am","timestamp":"1920-01-01T12:01:02"},{"action":"play","device":"foodev","episode":"http://www.podtrac.com","podcast":"http://leo.am","position":123,"started":10,"timestamp":"1998-01-01T00:01:02","total":321},{"action":"play","device":"foodev","episode":"http://www.podtrac.com","podcast":"http://leo.am","position":10,"timestamp":"1998-01-01T00:01:02"}]
+   Expected (expected2): 
[{"action":"download","device":"device1","episode":"http://episode.url","podcast":"http:
+   Loc: 
[/var/tmp/portage/media-libs/libmygpo-qt-1.0.9-r1/work/libmygpo-qt-1.0.9/tests/JsonCreatorTest.cpp(138)]
+PASS   : mygpo::JsonCreatorTest::testRenameDeviceStringToJSON()
+PASS   : 
mygpo::JsonCreatorTest::testDeviceSynchronizationListsToJSON()
+PASS   : mygpo::JsonCreatorTest::cleanupTestCase()
+Totals: 6 passed, 1 failed, 0 skipped
+********* Finished testing of mygpo::JsonCreatorTest *********
+```
+
+This was caused by extra space in the expected string.
+---
+ tests/JsonCreatorTest.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/JsonCreatorTest.cpp 
b/tests/JsonCreatorTest.cpp
+index b15b006..feb03d5 100644
+--- a/tests/JsonCreatorTest.cpp
++++ b/tests/JsonCreatorTest.cpp
+@@ -133,7 +133,7 @@ void 
JsonCreatorTest::testEpisodeActionListToJSON()
+ 
+   output = JsonCreator::episodeActionListToJSON(episodeActions);
+   QString outString2 = QString::fromLatin1( output ).replace( 
QLatin1String(" "), QLatin1String("") );
+-  QString expected2( QLatin1String( 
"[{\"action\":\"download\",\"device\":\"device1\",\"episode\":\"http://episode.url\",\"podcast\":\"http://podcast.url\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"delete\",\"device\":\"device3\",\"episode\":\"http://episode2.url\",\"podcast\":\"http://podcast2.url\",\"timestamp\":\"1920-01-01T12:01:02\"},{\"action\":\"new\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1920-01-01T12:01:02\" 
},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":123,\"started\":10,\"timestamp\":\"1998-01-01T00:01:02\",\"total\":321},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":10,\"timestamp\":\"1998-01-01T00:01:02\"}]" 
) );
++  QString expected2( QLatin1String( 
"[{\"action\":\"download\",\"device\":\"device1\",\"episode\":\"http://episode.url\",\"podcast\":\"http://podcast.url\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"delete\",\"device\":\"device3\",\"episode\":\"http://episode2.url\",\"podcast\":\"http://podcast2.url\",\"timestamp\":\"1920-01-01T12:01:02\"},{\"action\":\"new\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1920-01-01T12:01:02\"},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":123,\"started\":10,\"timestamp\":\"1998-01-01T00:01:02\",\"total\":321},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":10,\"timestamp\":\"1998-01-01T00:01:02\"}]" 
) );
+ 
+   QCOMPARE(outString2, expected2 );
+ }
-- 
2.14.3




Information forwarded to guix-patches <at> gnu.org, Ricardo Wurmus <rekado <at> elephly.net>:
bug#25787; Package guix-patches. (Sun, 29 Oct 2017 20:15:02 GMT) Full text and rfc822 format available.

Message #75 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Marius Bakke <mbakke <at> fastmail.com>, 25787 <at> debbugs.gnu.org
Subject: [PATCH 02/02] gnu: Add clementine.
Date: Sun, 29 Oct 2017 20:13:51 +0000
* gnu/packages/music.scm (clementine): New variable.
* gnu/packages/patches/clementine-use-openssl.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Co-authored-by: Ricardo Wurmus <rekado <at> elephly.net>
---
gnu/local.mk                                      |   1 +
gnu/packages/music.scm                            | 114 
++++++++++++++++++++++
gnu/packages/patches/clementine-use-openssl.patch |  67 
+++++++++++++
3 files changed, 182 insertions(+)
create mode 100644 
gnu/packages/patches/clementine-use-openssl.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3012976a8..5530e3342 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -562,6 +562,7 @@ dist_patch_DATA = 
\
  %D%/packages/patches/chmlib-inttypes.patch			\
  %D%/packages/patches/clang-libc-search-path.patch		\
  %D%/packages/patches/clang-3.8-libc-search-path.patch 
  \
+  %D%/packages/patches/clementine-use-openssl.patch		\
  %D%/packages/patches/clisp-remove-failing-test.patch		\
  %D%/packages/patches/clucene-pkgconfig.patch			\
  %D%/packages/patches/clx-remove-demo.patch			\
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 55ae15f1a..453125a8b 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -54,8 +54,11 @@
  #:use-module (gnu packages check)
  #:use-module (gnu packages cmake)
  #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages datastructures)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages documentation)
  #:use-module (gnu packages emacs)
@@ -73,12 +76,14 @@
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages gstreamer)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages image)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages java)
  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages libusb)
  #:use-module (gnu packages linux) ; for alsa-utils
  #:use-module (gnu packages lirc)
  #:use-module (gnu packages llvm)
@@ -91,6 +96,7 @@
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages protobuf)
  #:use-module (gnu packages pulseaudio) ;libsndfile
  #:use-module (gnu packages python)
  #:use-module (gnu packages qt)
@@ -176,6 +182,114 @@ and play MIDI files with a few clicks in a 
user-friendly interface offering
score, keyboard, guitar, drum and controller views.")
    (license license:gpl3+)))

+;; We don't use the latest release because it depends on Qt4. 
Instead we
+;; download the sources from the tip of the "qt5" branch.
+(define-public clementine
+  (let ((commit "0a59257dc334b8df60a4d7d90b04f1766747efcf")
+        (revision "1"))
+    (package
+      (name "clementine")
+      (version (string-append "1.3.1-" revision "." (string-take 
commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url 
"https://github.com/clementine-player/Clementine.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version 
"-checkout"))
+                (sha256
+                 (base32
+ 
"0cdcj7di7j9jgzc1ihjna1a5df64f9hnmx7b9kh8rlg76hc0l0hi"))
+                (modules '((guix build utils)))
+                (snippet
+                  '(for-each
+                     (lambda (dir)
+                       (delete-file-recursively
+                         (string-append "3rdparty/" dir)))
+                     (list
+                       ;; TODO: The following dependencies are 
still bundled:
+                       ;; - "qxt": Appears to be unmaintained 
upstream.
+                       ;; - "qsqlite"
+                       ;; - "qtsingleapplication"
+                       ;; - "qocoa"
+                       ;; - "qtiocompressor"
+                       ;; - "gmock": The tests crash when using 
our googletest
+                       ;;   package instead of the bunbled gmock.
+                       "SPMediaKeyTap"
+                       "fancytabwidget"
+                       "google-breakpad"
+                       "libmygpo-qt"
+                       "libmygpo-qt5"
+                       "libprojectm"
+                       "qtwin"
+                       "sha2" ;; Replaced by openssl.
+                       "taglib"
+                       "tinysvcmdns")))
+                (patches (search-patches 
"clementine-use-openssl.patch"))))
+      (build-system cmake-build-system)
+      (arguments
+       '(#:test-target "clementine_test"
+         #:configure-flags
+         (let ((crypto (assoc-ref %build-inputs "crypto++")))
+           (list "-DENABLE_VISUALISATIONS=OFF" ; requires 
unpackaged "projectm"
+                 "-DCRYPTOPP_FOUND=TRUE"
+                 (string-append "-DCRYPTOPP_INCLUDE_DIRS=" crypto 
"/include")
+                 (string-append "-DCRYPTOPP_LIBRARY_DIRS=" crypto 
"/lib")
+                 (string-append "-DCRYPTOPP_LIBRARIES=" crypto 
"/lib/libcryptopp.a")
+                 "-DUSE_SYSTEM_SHA2=TRUE"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out             (assoc-ref outputs "out"))
+                     (gst-plugin-path (getenv 
"GST_PLUGIN_SYSTEM_PATH")))
+                 (wrap-program (string-append out 
"/bin/clementine")
+                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix 
(,gst-plugin-path)))
+                 #t))))))
+      (native-inputs
+       `(("gettext" ,gettext-minimal)
+         ("pkg-config" ,pkg-config)
+         ("qtlinguist" ,qttools)))
+      (inputs
+       `(("boost" ,boost)
+         ("chromaprint" ,chromaprint)
+         ("crypto++" ,crypto++)
+         ("fftw" ,fftw)
+         ("glib" ,glib)
+         ("glu" ,glu)
+         ("gstreamer" ,gstreamer)
+         ("gst-plugins-base" ,gst-plugins-base)
+         ("libcdio" ,libcdio)
+         ("libmygpo-qt" ,libmygpo-qt)
+         ("libechonest" ,libechonest)
+         ;; TODO: Package libgpod.
+         ("libmtp" ,libmtp)
+         ("libxml2" ,libxml2)
+         ("openssl" ,openssl)
+         ("protobuf" ,protobuf)
+         ("pulseaudio" ,pulseaudio)
+         ("qtbase" ,qtbase)
+         ("qtx11extras" ,qtx11extras)
+         ("qtwebkit" ,qtwebkit)
+         ("sqlite" ,sqlite-with-fts3)
+         ("sparsehash" ,sparsehash)
+         ("taglib" ,taglib)))
+      (home-page "http://clementine-player.org")
+      (synopsis "Music player and library organizer")
+      (description "Clementine is a multiplatform music player. 
It is inspired
+by Amarok 1.4, focusing on a fast and easy-to-use interface for 
searching and
+playing your music.")
+      (license (list
+                 ;; clementine and qtiocompressor are under 
GPLv3.
+                 license:gpl3+
+                 ;; gmock is under BSD-3.
+                 license:bsd-3
+                 ;; qxt is under CPL1.0.
+                 license:cpl1.0
+                 ;; qsqlite and qtsingleapplication are under 
LGPL2.1+.
+                 license:lgpl2.1+
+                 ;; qocoa is under MIT and CC by-sa for the 
icons.
+                 license:cc-by-sa3.0)))))
+
(define-public cmus
  (package
    (name "cmus")
diff --git a/gnu/packages/patches/clementine-use-openssl.patch 
b/gnu/packages/patches/clementine-use-openssl.patch
new file mode 100644
index 000000000..1fbf3d2b8
--- /dev/null
+++ b/gnu/packages/patches/clementine-use-openssl.patch
@@ -0,0 +1,67 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4022c383b..3202b8b69 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -83,6 +83,7 @@ pkg_check_modules(LIBPULSE libpulse)
+ pkg_check_modules(LIBXML libxml-2.0)
+ pkg_check_modules(SPOTIFY libspotify>=12.1.45)
+ pkg_check_modules(TAGLIB REQUIRED taglib>=1.6)
++pkg_check_modules(OPENSSL REQUIRED openssl)
+ 
+ if (WIN32)
+   find_package(ZLIB REQUIRED)
+@@ -381,20 +382,6 @@ if(GMOCK_INCLUDE_DIRS)
+   endif(GTEST_INCLUDE_DIRS)
+ endif(GMOCK_INCLUDE_DIRS)
+ 
+-# Use the system's sha2 if it's available.
+-find_path(SHA2_INCLUDE_DIRS sha2.h)
+-find_library(SHA2_LIBRARIES sha2)
+-if(SHA2_LIBRARIES AND SHA2_INCLUDE_DIRS)
+-  message(STATUS "Using system sha2 library")
+-  set(USE_SYSTEM_SHA2 ON)
+-else()
+-  message(STATUS "Using builtin sha2 library")
+-  set(USE_SYSTEM_SHA2 OFF)
+-  add_subdirectory(3rdparty/sha2)
+-  set(SHA2_INCLUDE_DIRS 
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sha2)
+-  set(SHA2_LIBRARIES sha2)
+-endif()
+-
+ # Use the system libmygpo-qt5 if a recent enough version was 
found
+ if(LIBMYGPO_QT5_FOUND)
+   set(MYGPOQT5_LIBRARIES ${LIBMYGPO_QT5_LIBRARIES})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6e24c9726..104d044d9 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -29,7 +29,6 @@ 
include_directories(${LIBPROJECTM_INCLUDE_DIRS})
+ include_directories(${QTSINGLEAPPLICATION_INCLUDE_DIRS})
+ include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS})
+ include_directories(${QXT_INCLUDE_DIRS})
+-include_directories(${SHA2_INCLUDE_DIRS})
+ include_directories(${CHROMAPRINT_INCLUDE_DIRS})
+ include_directories(${MYGPOQT5_INCLUDE_DIRS})
+ 
+@@ -1223,7 +1222,7 @@ target_link_libraries(clementine_lib
+   libclementine-common
+   libclementine-tagreader
+   libclementine-remote
+-  ${SHA2_LIBRARIES}
++  ${OPENSSL_LIBRARIES}
+   ${TAGLIB_LIBRARIES}
+   ${MYGPOQT5_LIBRARIES}
+   ${CHROMAPRINT_LIBRARIES}
+diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp
+index ce76f22da..80bf623fb 100644
+--- a/src/core/utilities.cpp
++++ b/src/core/utilities.cpp
+@@ -52,7 +52,7 @@
+ #include "config.h"
+ #include "timeconstants.h"
+ 
+-#include "sha2.h"
++#include <openssl/sha.h>
+ 
+ #if defined(Q_OS_UNIX)
+ #include <sys/statvfs.h>
-- 
2.14.3




Information forwarded to guix-patches <at> gnu.org, Ricardo Wurmus <rekado <at> elephly.net>:
bug#25787; Package guix-patches. (Sun, 29 Oct 2017 20:21:02 GMT) Full text and rfc822 format available.

Message #78 received at 25787 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 25787 <at> debbugs.gnu.org
Subject: Re: [bug#25787] [PATCH 02/02] gnu: Add clementine.
Date: Sun, 29 Oct 2017 20:20:30 +0000
[Message part 1 (text/plain, inline)]
OK, I messed those emails and the patches are completely 
mangled... oups!

Here are the patches as attachments. I would normally use git 
send-email
but it wasn't working for me today for some reason.

[0001-gnu-Add-libmygpo-qt.patch (text/x-patch, attachment)]
[0002-gnu-Add-clementine.patch (text/x-patch, attachment)]

Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Tue, 05 Dec 2017 07:09:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
bug acknowledged by developer. (Tue, 05 Dec 2017 07:09:02 GMT) Full text and rfc822 format available.

Message #83 received at 25787-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: 25787-done <at> debbugs.gnu.org
Subject: Re: [bug#25787] [PATCH 02/02] gnu: Add clementine.
Date: Tue, 05 Dec 2017 08:07:38 +0100
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> OK, I messed those emails and the patches are completely 
> mangled... oups!
>
> Here are the patches as attachments. I would normally use git 
> send-email
> but it wasn't working for me today for some reason.

Thank you.  I’ve applied them with minor stylistic changes, built
clementine to confirm that it’s working and pushed it with commit
d20b7384b to master.

We will still need to unbundle this some more, but I think that this can
be done later.  Thanks for your work and patience so far!

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Jan 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.