guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: x265: Fix building on armhf-linux and aarch64-linux.


From: Efraim Flashner
Subject: 01/01: gnu: x265: Fix building on armhf-linux and aarch64-linux.
Date: Tue, 19 Jun 2018 14:49:43 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 2b94c14c9e7bbd2f582e6b5df89424dd089fc78f
Author: Efraim Flashner <address@hidden>
Date:   Tue Jun 19 21:37:41 2018 +0300

    gnu: x265: Fix building on armhf-linux and aarch64-linux.
    
    * gnu/packages/video.scm (x265)[source]: Add patch.
    [arguments]: Enable PIC on armhf-linux.
    * gnu/packages/patches/x265-fix-ppc64le-build.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                      |  1 +
 gnu/packages/patches/x265-fix-ppc64le-build.patch | 25 +++++++++++++++++++++++
 gnu/packages/video.scm                            |  6 +++++-
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index bf79b8f..6560944 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1194,6 +1194,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/wpa-supplicant-fix-nonce-reuse.patch    \
   %D%/packages/patches/wpa-supplicant-krack-followups.patch    \
   %D%/packages/patches/wxmaxima-do-not-use-old-gnuplot-parameters.patch        
\
+  %D%/packages/patches/x265-fix-ppc64le-build.patch            \
   %D%/packages/patches/xboing-CVE-2004-0149.patch              \
   %D%/packages/patches/xdotool-fix-makefile.patch               \
   %D%/packages/patches/xf86-video-ark-remove-mibstore.patch    \
diff --git a/gnu/packages/patches/x265-fix-ppc64le-build.patch 
b/gnu/packages/patches/x265-fix-ppc64le-build.patch
new file mode 100644
index 0000000..f71d243
--- /dev/null
+++ b/gnu/packages/patches/x265-fix-ppc64le-build.patch
@@ -0,0 +1,25 @@
+https://sources.debian.org/data/main/x/x265/2.8-3/debian/patches/0003-Fix-build-error-on-on-ppc64le.patch
+
+This patch also fixes building on armhf-linux and aarch64-linux
+
+From: Jayashree <address@hidden>
+Date: Fri, 25 May 2018 10:26:05 +0530
+Subject: Fix build error on on ppc64le
+
+---
+ source/common/param.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/common/param.cpp b/source/common/param.cpp
+index 31bcbc7..4a6d0c8 100644
+--- a/source/common/param.cpp
++++ b/source/common/param.cpp
+@@ -633,7 +633,7 @@ int x265_param_parse(x265_param* p, const char* name, 
const char* value)
+         if (bValueWasNull)
+             p->cpuid = atobool(value);
+         else
+-            p->cpuid = parseCpuName(value, bError);
++            p->cpuid = parseCpuName(value, bError, false);
+ #endif
+     }
+     OPT("fps")
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index e312382..ff05557 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -44,6 +44,7 @@
 (define-module (gnu packages video)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -393,6 +394,7 @@ and creating Matroska files from other media files 
(@code{mkvmerge}).")
         (sha256
          (base32
           "0qx8mavwdzdpkkby7n29i9av7zsnklavacwfz537mf62q2pzjnbf"))
+        (patches (search-patches "x265-fix-ppc64le-build.patch"))
         (modules '((guix build utils)))
         (snippet '(begin
                     (delete-file-recursively "source/compat/getopt")
@@ -401,7 +403,9 @@ and creating Matroska files from other media files 
(@code{mkvmerge}).")
     (arguments
      `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
        ;; Currently the source code doesn't check for aarch64.
-       ,@(if (string-prefix? "aarch64" (or (%current-target-system) 
(%current-system)))
+       ,@(if (any (cute string-prefix? <> (or (%current-system)
+                                              (%current-target-system)))
+                  '("armhf" "aarch64"))
            '(#:configure-flags '("-DENABLE_PIC=TRUE"))
            '())
        #:phases



reply via email to

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