From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59814) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5VHT-0008B1-SJ for guix-patches@gnu.org; Wed, 04 Sep 2019 09:25:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5VHS-0007XM-DJ for guix-patches@gnu.org; Wed, 04 Sep 2019 09:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5VHS-0007XH-9T for guix-patches@gnu.org; Wed, 04 Sep 2019 09:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i5VHS-0008Di-1g for guix-patches@gnu.org; Wed, 04 Sep 2019 09:25:02 -0400 Subject: [bug#36477] [PATCH v3 06/48] gnu: groff: Fix cross compilation. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190902153333.11190-1-m.othacehe@gmail.com> <20190902153333.11190-7-m.othacehe@gmail.com> Date: Wed, 04 Sep 2019 15:23:59 +0200 In-Reply-To: <20190902153333.11190-7-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Mon, 2 Sep 2019 17:32:51 +0200") Message-ID: <87o90019g0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mathieu Othacehe Cc: 36477@debbugs.gnu.org Mathieu Othacehe skribis: > * gnu/packages/groff.scm (groff)[arguments]: Replace build phase to pass > GROFF_BIN_PATH and GROFFBIN variables when cross-compiling. > > Also add native groff as a native-input when cross-compiling. Please mention changes to =E2=80=98groff-minimal=E2=80=99. [...] > + ,@(if (%current-target-system) > + '((replace 'build > + (lambda* (#:key > + make-flags parallel-build? > + native-inputs target #:allow-other-keys) > + ;; When cross-compiling, native groff is needed, see: > + ;; http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html > + (let ((parallel > + (if parallel-build? > + `("-j" ,(number->string (parallel-job-count))) > + '())) > + (flags > + (if target > + (let ((groff (or > + (assoc-ref native-inputs "groff") > + (assoc-ref native-inputs "self")))) > + (append > + make-flags > + (list > + (string-append "GROFF_BIN_PATH=3D" groff) > + (string-append "GROFFBIN=3D" groff > + "/bin/groff")))) > + make-flags))) Wouldn=E2=80=99t it be easier to have: (arguments `(,@(if (%current-target-system) `(#:make-flags (list (string-append "GROFF_BIN_PATH=3D" (assoc-ref %build-native-in= puts "self) =E2=80=A6))) '() =E2=80=A6)) ? > (native-inputs `(("bison" ,bison) > - ("perl" ,perl))) > + ("perl" ,perl) > + ("groff" ,groff))) Should probably be: ("self" ,this-package) for consistency. Thanks, Ludo=E2=80=99.