guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: libtorrent-rasterbar: Update to 1.2.14.


From: guix-commits
Subject: 01/02: gnu: libtorrent-rasterbar: Update to 1.2.14.
Date: Wed, 17 Nov 2021 18:03:19 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit b432cd11899e5ff9c94c8ed6145d49f697bcb1a7
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sat Nov 13 11:34:00 2021 +0100

    gnu: libtorrent-rasterbar: Update to 1.2.14.
    
    * gnu/packages/bittorrent.scm (libtorrent-rasterbar): Update to 1.2.14.
    [source](uri): Adjust tag name.
    [build-system]: Change to CMAKE-BUILD-SYSTEM.
    [arguments]: Adjust accordingly.  Override the check phase to fake the time
    for one test, and disable another.
    [native-inputs]: Add LIBFAKETIME.
---
 gnu/packages/bittorrent.scm | 44 ++++++++++++++++++++++++++++++--------------
 1 file changed, 30 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index e17e04d..e014136 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
+;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system glib-or-gtk)
@@ -42,6 +44,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #: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)
@@ -419,30 +422,43 @@ and will take advantage of multiple processor cores where 
possible.")
 (define-public libtorrent-rasterbar
   (package
     (name "libtorrent-rasterbar")
-    (version "1.2.8")
+    (version "1.2.14")
     (source
      (origin
        (method url-fetch)
        (uri
         (string-append "https://github.com/arvidn/libtorrent/";
-                       "releases/download/libtorrent-" version "/"
+                       "releases/download/v" version "/"
                        "libtorrent-rasterbar-" version ".tar.gz"))
        (sha256
-        (base32 "1phn4klzvfzvidv5g566pnrrxj8l0givpy6s4r17d45wznqxc006"))))
-    (build-system gnu-build-system)
+        (base32 "0gwm4w7337ykh5lfnspapnnz6a35g7yay3wnj126s8s5kcsvy9wy"))))
+    (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags
-       (list (string-append "--with-boost-libdir="
-                            (assoc-ref %build-inputs "boost")
-                            "/lib")
-             "--enable-python-binding"
-             "--enable-tests")
-       #:make-flags (list
-                     (string-append "LDFLAGS=-Wl,-rpath="
-                                    (assoc-ref %outputs "out") "/lib"))))
+     `(#:cmake ,cmake                   ;3.17 or later
+       #:configure-flags '("-Dpython-bindings=ON"
+                           "-Dbuild_tests=ON")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+             (let ((disabled-tests
+                    ;; test_upnp requires a non-localhost IPv4 interface.
+                    '("test_upnp")))
+               (when tests?
+                 ;; test_ssl relies on bundled TLS certificates with a fixed
+                 ;; expiry date.  To ensure succesful builds in the future,
+                 ;; fake the time to be roughly that of the release.
+                 (setenv "FAKETIME_ONLY_CMDS" "test_ssl")
+                 (invoke "faketime" "2021-06-01"
+                         "ctest"
+                         "--exclude-regex" (string-join disabled-tests "|")
+                         "-j" (if parallel-tests?
+                                  (number->string (parallel-job-count))
+                                  "1")))))))))
     (inputs `(("boost" ,boost)
               ("openssl" ,openssl)))
-    (native-inputs `(("python" ,python-wrapper)
+    (native-inputs `(("libfaketime" ,libfaketime)
+                     ("python" ,python-wrapper)
                      ("pkg-config" ,pkg-config)))
     (home-page "https://www.libtorrent.org/";)
     (synopsis "Feature-complete BitTorrent implementation")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]