[PATCH 0/6] Add Clementine music player.

  • Done
  • quality assurance status badge
Details
5 participants
  • Ludovic Courtès
  • Marius Bakke
  • Pierre Langlois
  • Thomas Danckaert
  • Ricardo Wurmus
Owner
Somebody
Submitted by
Pierre Langlois
Severity
normal
P
P
Pierre Langlois wrote on 18 Feb 2017 14:38
(address . guix-patches@gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218133830.24091-1-pierre.langlois@gmx.com
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


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
P
P
Pierre Langlois wrote on 18 Feb 2017 19:00
[PATCH 1/6] gnu: Add qjson.
(address . 25787@debbugs.gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218180016.1050-1-pierre.langlois@gmx.com
* gnu/packages/qt.scm (qjson): New variable.
---
gnu/packages/qt.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (48 lines)
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@flashner.co.il>
;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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
P
P
Pierre Langlois wrote on 18 Feb 2017 19:00
[PATCH 2/6] gnu: Add libechonest.
(address . 25787@debbugs.gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218180052.1267-1-pierre.langlois@gmx.com
* gnu/packages/music.scm (libechonest): New variable.
---
gnu/packages/music.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (47 lines)
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@earthlink.net>
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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
P
P
Pierre Langlois wrote on 18 Feb 2017 19:01
[PATCH 3/6] gnu: Add cryptopp.
(address . 25787@debbugs.gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218180113.1331-1-pierre.langlois@gmx.com
* gnu/packages/crypto.scm (cryptopp): New variable.
---
gnu/packages/crypto.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (61 lines)
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@tobias.gr>
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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
P
P
Pierre Langlois wrote on 18 Feb 2017 19:01
[PATCH 4/6] gnu: nss: Update to 3.28.1.
(address . 25787@debbugs.gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218180155.1395-1-pierre.langlois@gmx.com
* 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(-)

Toggle diff (44 lines)
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@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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
P
P
Pierre Langlois wrote on 18 Feb 2017 19:02
[PATCH 5/6] gnu: sqlite: Enable FTS3.
(address . 25787@debbugs.gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218180233.1470-1-pierre.langlois@gmx.com
* 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(-)

Toggle diff (29 lines)
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@uwaterloo.ca>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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
P
P
Pierre Langlois wrote on 18 Feb 2017 19:02
[PATCH 6/6] gnu: Add Clementine.
(address . 25787@debbugs.gnu.org)(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
20170218180249.1522-1-pierre.langlois@gmx.com
* gnu/packages/music.scm (clementine): New variable.
---
gnu/packages/music.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (97 lines)
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
T
T
Thomas Danckaert wrote on 20 Feb 2017 15:22
Re: bug#25787: [PATCH 6/6]
20170220.152244.881122869261660698.post@thomasdanckaert.be
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?

Toggle quote (8 lines)
> 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
M
M
Marius Bakke wrote on 22 Feb 2017 16:28
Re: bug#25787: [PATCH 0/6] Add Clementine music player.
87tw7mfdns.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (6 lines)
> 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!

Toggle quote (20 lines)
> 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.

Toggle quote (7 lines)
> * 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.

Toggle quote (4 lines)
> 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.


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.


Toggle quote (3 lines)
> 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!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlitrhcACgkQoqBt8qM6
VPpB5wgAg3jgW8p1k3BTEk2F6QAr0S+3oggEEWScMmQFlloG14vFwX5Sk/y5MTws
v+NVuMHZa80npb6VRj1U1XGN862eWGs0BoxFfr6ox70fssUXyWDIbmCsVwyJooYb
7tfWEUUQu2IOxUHjmXSPeqQueoTO3ExNzsfalfsb0MPPOTuXZbSZAmw2E3QtkNCs
Ii+sDBuzHXBKOGvGBSCv2Al2Us6Yn6jngeYoNLhC1BZlgs2YzJHCAypRk9jNVqxX
3RFsVp1PZfDX5R/tXfgVNHWR/aKTJdcfGsaBIQXhxHLe9M6JsDk9DECy7PHrwm1p
lYDpXtHkcCFOXuKGo6MitXSR/Mnw+Q==
=7ql+
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 22 Feb 2017 16:53
Re: bug#25787: [PATCH 3/6] gnu: Add cryptopp.
87poiafci8.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (2 lines)
> * 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:


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

Toggle quote (20 lines)
> 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@tobias.gr>
> ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
> ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
> +;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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.

Toggle quote (3 lines)
> + (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]


Toggle quote (7 lines)
> + (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:


Toggle quote (10 lines)
> + (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!

Toggle quote (19 lines)
> + (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).

Toggle quote (6 lines)
> + (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? :)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlits/AACgkQoqBt8qM6
VPo9Xgf/Vn4CCtP74OjtSaqLk8d70wPzcVMZrbXII/t0TFiiS21yAXf9TBzHtrej
WIn9mQRipEa3OE6OoXK0Bi1HrGP39UnnU2OzsUfo85P/UQ+MmQE9vNfF74u/8lHb
76+p3HRnVQQMXlGxDNgovW3Zwd7OOrnlW6R4i8ihXMu3AXwqkDNhom9XwKc/oaGC
Npw/vD8M7jvohMPARVLJCK6VOuuEWPq51B+MQO882BP4NPNNeGxDqyQRxLU6FI6Y
74Q84sTBxMSoJSo6/Tru1fAXj98DR/50bXPlSFxNtCL9yfuIl8cCZrGgEZlTAddQ
HugxC7JciPEIBVcK2W6sgv9zRWj4iw==
=mZRU
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 22 Feb 2017 16:59
Re: bug#25787: [PATCH 1/6] gnu: Add qjson.
87mvdefc8c.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (39 lines)
> * 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@flashner.co.il>
> ;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
> ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
> +;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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.

Toggle quote (4 lines)
> + `(#: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!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlittVQACgkQoqBt8qM6
VPqxrQf/ZHb/XF6fTKxYENlQHU/sNMxkaGWLRnJZnqF3FWjaVIBFUktJsTpXKFcC
KBYHb6XQgV9g5IiPyLLw7U9C4se8riqjEIkeD4rK/WySO4KmNFZU2FXKsyDiyDq8
7XPhTYJSqKun8rBkAL7tftoKxKQf5ELRo+OQggF6alVB9GbhRYp+B/V+8zqqE///
eWYIstm9NBUInnTYv79qut7x/qDa9bzI3IstwDwgIvCkJyUcyaKup92agXx23hUX
waUvtiWzRwM8BunxTDYoCcqYvA+1n2x9z909OvKUgkEwTFYRpaji4qPS5VZWQNQ0
li5qeyH4f+oX3OZQ9HSHaK3zXkuRHw==
=xYjE
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 22 Feb 2017 17:03
Re: bug#25787: [PATCH 2/6] gnu: Add libechonest.
87k28ifc0i.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (32 lines)
> * 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@earthlink.net>
> ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
> ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
> +;;; Copyright © 2017 Pierre Langlois <pierre.langlois@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?

Toggle quote (10 lines)
> + (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.

Toggle quote (4 lines)
> + (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} ...

Toggle quote (3 lines)
> + 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?

Toggle quote (2 lines)
> + (license license:gpl2)))

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

Toggle quote (6 lines)
> +
> (define-public python-pylast
> (package
> (name "python-pylast")
> --
> 2.11.1
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlittm0ACgkQoqBt8qM6
VPpsWgf/Zl9v4dK/arN41Kmaz1AyIzX9Km7P9Za6L1Sg4qzoJ936sNaNiSHG77G2
/A/VFUtEyp/e6jtAWlYgEC2aelEDiJ1178mHVta+CIHlC0khSiErbY4WoMoWrfEI
GKoytvUpsWf4wRrOpf3XFQseQS7qlgxo0Qr99NvMed3mlQXWUibXmMybSgcP0Ynj
exbgZBsuKOXBevB95OI4r9R9y71sXN9phjBJ2BfPLOaVmQUBZZO9GO1NmKFgFcfM
cS8xR25geddaxU4QzGE0JX042ywGhBQY7WFvrkviSAWZdCjBzwaeefXBg1ym0Jec
TgWXzcG8j9tWBstNSQF2VQeLR1VmRA==
=t9TR
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 22 Feb 2017 17:13
Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
87h93mfbkm.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (59 lines)
> * 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:


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.

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

Please add a comment mentioning why tests are disabled.

Toggle quote (33 lines)
> + ;; 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.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlituKkACgkQoqBt8qM6
VPqXwwf+PP/4x5ncsgyHZtbJq3+iFDoGgJzxj7IUr4gPTNXMuPNcA0ryDO/tIgCH
G2JziM4eTKHgxBjo1afHLTwc/KgiwEX2kcUgindiOPWbZ1WwU5Uw1ekrKtr2Fj1R
quN0psqnY+E3HOqSH8DcimKEIM2TStTBO35ENLVYfF1iDvbib2Al+vNiJpiCAGHm
KFq1Vd4flrxmIyKV0/Ea2fsRTDTcoP5iRZjHr5spUbE+Qtkn2huv5fBRp9tQ3Jfl
7YRX/+5Lp9ZGuw5FLNyM7ynlqEPMS4UI2UBUIfBUNOzTHi/vdPpPaXWOjXNKRzWb
vRofmZ+O8Z8QYIuxEt9AAmd/g+saJA==
=yyog
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 22 Feb 2017 17:28
Re: bug#25787: [PATCH 3/6] gnu: Add cryptopp.
87efyqfaw8.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (24 lines)
>> + (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:

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlitvBcACgkQoqBt8qM6
VPopDAf+JwHEiCNcnL0wuA51AcTQLGMWTh9J44n9eFrXQz7byQBeCEO3YtTgpgKw
ICQ98TMwheTzR2bfBh9/LuFsFaYhXb/OtlOwEsnMnjy6NBnaFh4Zma6yJyDUw3tq
fkG/Ipr2hRZ+3SqxTzPJlLLBp+usQNMJmtgGpirqGKSUAmxNueOX5BWJmx89GzcB
nKbFzMi8lIhZaKTofjbNACejzKVqK+V0y3L1tMnKWARhtvZTxXpmYyRvWL9/hZS1
nXK7jUfhlptljcF96QTEVr/V0oOGo7QPsZkmhzqTYS+SAcx+wVScBle6ZnL0nrWj
fOO8J7cefvLBcZZDNYdx1pklnnO4WQ==
=1OoM
-----END PGP SIGNATURE-----

P
P
Pierre Langlois wrote on 22 Feb 2017 23:23
Re: bug#25787: [PATCH 6/6]
(name . Thomas Danckaert)(address . post@thomasdanckaert.be)
cub1suprhjb.fsf@gmx.com
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:

Toggle quote (11 lines)
> 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?

Toggle quote (8 lines)
>
> - 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.

Toggle quote (18 lines)
>
> 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
T
T
Thomas Danckaert wrote on 23 Feb 2017 18:07
(address . pierre.langlois@gmx.com)(address . 25787@debbugs.gnu.org)
20170223.180740.2161811808479916248.post@thomasdanckaert.be
From: Pierre Langlois <pierre.langlois@gmx.com>
Subject: Re: bug#25787: [PATCH 6/6]
Date: Wed, 22 Feb 2017 22:23:52 +0000
Toggle quote (9 lines)
> 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.
Toggle quote (3 lines)
> 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.
Toggle quote (2 lines)
> 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
L
L
Ludovic Courtès wrote on 10 Mar 2017 08:58
Re: bug#25787: [PATCH 5/6] gnu: sqlite: Enable FTS3.
(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
8760jhd0m9.fsf@gnu.org
Hello Pierre,

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

Toggle quote (4 lines)
> * 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@3.14”), this should go to the ‘core-updates’ branch¹.

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

Thanks!

Ludo’.

L
L
Ludovic Courtès wrote on 10 Mar 2017 09:00
Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
(name . Marius Bakke)(address . mbakke@fastmail.com)
871su5d0is.fsf@gnu.org
Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (4 lines)
> 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’.
L
L
Ludovic Courtès wrote on 10 Mar 2017 09:30
control message for bug #25787
(address . control@debbugs.gnu.org)
87pohpbkk0.fsf@gnu.org
tags 25787 moreinfo
L
L
Ludovic Courtès wrote on 3 May 2017 23:57
Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
(name . Pierre Langlois)(address . pierre.langlois@gmx.com)
87vaphppr7.fsf@gnu.org
Pierre, did you have any chance to look at this?


TIA!

Ludo’.

ludo@gnu.org (Ludovic Courtès) skribis:

Toggle quote (14 lines)
> Marius Bakke <mbakke@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’.
R
R
Ricardo Wurmus wrote on 11 Oct 2017 00:10
control message for bug #25787
(address . control@debbugs.gnu.org)
E1e22jz-0001px-My@debbugs.gnu.org
owner 25787 !
R
R
Ricardo Wurmus wrote on 25 Oct 2017 16:09
Re: bug#25787: [PATCH 6/6] gnu: Add Clementine.
(name . Ludovic Courtès)(address . ludo@gnu.org)
8760b3coak.fsf@elephly.net
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


commit b8b691c88bd80aef6674ff97d1d924aa37193042 (clementine)
Author: Pierre Langlois <pierre.langlois@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@elephly.net>

Toggle diff (117 lines)
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")
P
P
Pierre Langlois wrote on 29 Oct 2017 21:11
(name . Ricardo Wurmus)(address . rekado@elephly.net)
cubvaixr9ww.fsf@gmx.com
Hi Ricardo

Ricardo Wurmus writes:

Toggle quote (10 lines)
> 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).

Toggle quote (5 lines)
>
> 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!

Toggle quote (3 lines)
>
> 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
P
P
Pierre Langlois wrote on 29 Oct 2017 21:12
[PATCH 01/26] gnu: Add libmygpo-qt.
(name . Ricardo Wurmus)(address . rekado@elephly.net)
cubtvyhr9v8.fsf@gmx.com
* 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

Toggle diff (122 lines)
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@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
P
P
Pierre Langlois wrote on 29 Oct 2017 21:13
[PATCH 02/02] gnu: Add clementine.
(name . Ricardo Wurmus)(address . rekado@elephly.net)
cubshe1r9ts.fsf@gmx.com
* 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@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

Toggle diff (269 lines)
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
P
P
Pierre Langlois wrote on 29 Oct 2017 21:20
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 25787@debbugs.gnu.org)
cubr2tlr9ip.fsf@gmx.com
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.
R
R
Ricardo Wurmus wrote on 5 Dec 2017 08:07
(name . Pierre Langlois)(address . pierre.langlois@gmx.com)(address . 25787-done@debbugs.gnu.org)
87k1y13b5x.fsf@elephly.net
Pierre Langlois <pierre.langlois@gmx.com> writes:

Toggle quote (7 lines)
> 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
Closed
?