gnu: rottlog: Fix aarch64 cross-compilation.

* gnu/packages/admin.scm (rottlog)[arguments]: Add a 'fix-configure phase to
replace outdated config.sub and config.guess, without aarch64 support,
[native-inputs]: add "automake".
This commit is contained in:
Mathieu Othacehe 2020-05-15 13:36:45 +02:00 committed by Tobias Geerinckx-Rice
parent d66c44dd4f
commit 7ed113e1a5
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -1229,7 +1229,7 @@ (define-public rottlog
#t)))) #t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location `(#:configure-flags (list "ROTT_ETCDIR=/etc/rottlog" ;rc file location
"--localstatedir=/var") "--localstatedir=/var")
;; Install example config files in OUT/etc. ;; Install example config files in OUT/etc.
@ -1243,6 +1243,20 @@ (define-public rottlog
(substitute* "rc/rc" (substitute* "rc/rc"
(("/usr/sbin/sendmail") "sendmail")) (("/usr/sbin/sendmail") "sendmail"))
#t)) #t))
(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))
(add-after 'build 'set-packdir (add-after 'build 'set-packdir
(lambda _ (lambda _
;; Set a default location for archived logs. ;; Set a default location for archived logs.
@ -1263,6 +1277,7 @@ (define-public rottlog
(lambda _ (lambda _
(invoke "make" "install-info")))))) (invoke "make" "install-info"))))))
(native-inputs `(("texinfo" ,texinfo) (native-inputs `(("texinfo" ,texinfo)
("automake" ,automake)
("util-linux" ,util-linux))) ; for 'cal' ("util-linux" ,util-linux))) ; for 'cal'
(home-page "https://www.gnu.org/software/rottlog/") (home-page "https://www.gnu.org/software/rottlog/")
(synopsis "Log rotation and management") (synopsis "Log rotation and management")