From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MPc-0006gD-M6 for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0MPb-0005I1-Gy for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0MPb-0005Hr-DI for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0MPb-0006Ys-Ao for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:11 -0400 Subject: [bug#36477] [PATCH v2 13/61] gnu: libgit2: Fix cross compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Wed, 21 Aug 2019 10:54:07 +0200 Message-Id: <20190821085455.18508-13-m.othacehe@gmail.com> In-Reply-To: <20190821085455.18508-1-m.othacehe@gmail.com> References: <20190821085455.18508-1-m.othacehe@gmail.com> 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: 36477@debbugs.gnu.org Cc: Mathieu Othacehe * gnu/packages/version-control.scm (libgit2)[arguments]: Set PKG_CONFIG_EXECUTABLE variable when cross-compiling. Also do not run test suite if cross-compiling. --- gnu/packages/version-control.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index e83b1d95e3..0bc882d3d3 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -545,7 +545,14 @@ everything from small to very large projects with speed and efficiency.") (build-system cmake-build-system) (outputs '("out" "debug")) (arguments - `(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection + `(#:configure-flags + (list "-DUSE_SHA1DC=ON" ; SHA-1 collision detection + ,@(if (%current-target-system) + `((string-append + "-DPKG_CONFIG_EXECUTABLE=" + (assoc-ref %build-inputs "pkg-config") + "/bin/" ,(%current-target-system) "-pkg-config")) + '())) #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-hardcoded-paths @@ -560,9 +567,13 @@ everything from small to very large projects with speed and efficiency.") (lambda _ (for-each make-file-writable (find-files ".")) #t)) - ;; Run checks more verbosely. + ;; Run checks more verbosely, unless we are cross-compiling. (replace 'check - (lambda _ (invoke "./libgit2_clar" "-v" "-Q")))))) + (lambda* (#:key (tests? #t) #:allow-other-keys) + (if tests? + (invoke "./libgit2_clar" "-v" "-Q") + ;; Tests may be disabled if cross-compiling. + (format #t "Test suite not run.~%"))))))) (inputs `(("libssh2" ,libssh2) ("http-parser" ,http-parser))) -- 2.17.1