diff mbox series

[bug#36477,15/31] gnu: libpaper: Fix aarch64 cross-compilation.

Message ID 20190708095913.3460-16-m.othacehe@gmail.com
State Accepted
Headers show
Series Fix cross-compilation issues | expand

Commit Message

Mathieu Othacehe July 8, 2019, 9:58 a.m. UTC
The packaged config.sub and config.guess do not have aarch64 support. Replace
them by the ones from automake.

* gnu/packages/ghostscript.scm (libpaper)[arguments]: Replace outdated config.sub and
config.guess, taken from ...
[native-inputs]: ... here, by adding automake.
---
 gnu/packages/ghostscript.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Marius Bakke July 8, 2019, 5:53 p.m. UTC | #1
Mathieu Othacehe <m.othacehe@gmail.com> writes:

> The packaged config.sub and config.guess do not have aarch64 support. Replace
> them by the ones from automake.
>
> * gnu/packages/ghostscript.scm (libpaper)[arguments]: Replace outdated config.sub and
> config.guess, taken from ...
> [native-inputs]: ... here, by adding automake.

Native ghostscript is fine on AArch64, right?  I would prefer to hold
this patch for now, unless it's also needed for native builds.

(maybe libpaper gets fixed upstream meanwhile...)
Efraim Flashner July 9, 2019, 6:14 a.m. UTC | #2
On Mon, Jul 08, 2019 at 07:53:06PM +0200, Marius Bakke wrote:
> Mathieu Othacehe <m.othacehe@gmail.com> writes:
> 
> > The packaged config.sub and config.guess do not have aarch64 support. Replace
> > them by the ones from automake.
> >
> > * gnu/packages/ghostscript.scm (libpaper)[arguments]: Replace outdated config.sub and
> > config.guess, taken from ...
> > [native-inputs]: ... here, by adding automake.
> 
> Native ghostscript is fine on AArch64, right?  I would prefer to hold
> this patch for now, unless it's also needed for native builds.
> 
> (maybe libpaper gets fixed upstream meanwhile...)

My aarch64 machine is still down right now. I don't recall having any
issues with ghostscript compiled natively on aarch64 in the past.
diff mbox series

Patch

diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 53a9b60fdb..ad035170a2 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -8,6 +8,7 @@ 
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,6 +92,24 @@  Consortium standard (ICC), approved as ISO 15076-1.")
             (sha256 (base32
                      "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
    (build-system gnu-build-system)
+   (native-inputs
+    `(("automake" ,automake))) ; For up to date 'config.guess' and 'config.sub'.
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (add-after 'unpack 'fix-configure
+          (lambda* (#:key inputs native-inputs #:allow-other-keys)
+            ;; Replace outdated config.sub and config.guess:
+            (for-each (lambda (file)
+                        (install-file
+                         (string-append (assoc-ref
+                                         (or native-inputs inputs) "automake")
+                                        "/share/automake-"
+                                        ,(version-major+minor
+                                          (package-version automake))
+                                        "/" file) "."))
+                      '("config.sub" "config.guess"))
+            #t)))))
    (synopsis "Library for handling paper sizes")
    (description
     "The paper library and accompanying files are intended to provide a simple