From patchwork Wed Jan 22 18:46:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marius Bakke X-Patchwork-Id: 19953 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9B9B017B09; Wed, 22 Jan 2020 18:47:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 5386017B03 for ; Wed, 22 Jan 2020 18:47:11 +0000 (GMT) Received: from localhost ([::1]:45738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuL1y-0007Rr-Ml for patchwork@mira.cbaines.net; Wed, 22 Jan 2020 13:47:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37507) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuL1r-0007P3-9r for guix-patches@gnu.org; Wed, 22 Jan 2020 13:47:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuL1q-0003Gs-0a for guix-patches@gnu.org; Wed, 22 Jan 2020 13:47:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45345) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuL1p-0003GX-Nv for guix-patches@gnu.org; Wed, 22 Jan 2020 13:47:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iuL1p-00043s-Lz for guix-patches@gnu.org; Wed, 22 Jan 2020 13:47:01 -0500 Subject: bug#39197: [PATCH core-updates 2/4] gnu: cmake-minimal: Build with a minimal variant of cURL. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 22 Jan 2020 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 39197 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= , 39197-done@debbugs.gnu.org Mail-Followup-To: 39197@debbugs.gnu.org, mbakke@fastmail.com, mbakke@fastmail.com Received: via spool by 39197-done@debbugs.gnu.org id=D39197.157971877413621 (code D ref 39197); Wed, 22 Jan 2020 18:47:01 +0000 Received: (at 39197-done) by debbugs.gnu.org; 22 Jan 2020 18:46:14 +0000 Received: from localhost ([127.0.0.1]:51316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuL13-0003XB-K5 for submit@debbugs.gnu.org; Wed, 22 Jan 2020 13:46:14 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:41307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuL10-0003QD-Q3 for 39197-done@debbugs.gnu.org; Wed, 22 Jan 2020 13:46:12 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id A9DFB3A4; Wed, 22 Jan 2020 13:46:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 22 Jan 2020 13:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=qaYs3tcsEoYq+Pq3NtQmrNt/MD /QfUmSghY+5VKcQXQ=; b=aZYE5n+XCO93/alroW+6DfVcSAAbWd1xfR/y2+KzRd BzPwb7xAIfKxvBxxCVqmTv23Fegqc1SEgoOunmwtyzHc/B8gDclwJByJpZunzOe4 8HuhU//Nt0eNJIs1WZ+26NfQ1PjK3NmQZ3vso9J5IPdw0y0EfsBG9XIzZBnZkezX b13xWa0ZSGkJhRhfF+jE9OFy2zz2HK3p5FChnb9O1Ke+R2SFvaTLr3E6CZYBHjG8 TthwoBsZCjwN+oy9Pu7Gnb+NzGbhOu+HSgHf/nB0bQ8moG1gPmVC3d9wQu5up43O X8opMhTn7ywsfEHMfTPT5zHx34dTdzTaiqTP6INYxPzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=qaYs3t csEoYq+Pq3NtQmrNt/MD/QfUmSghY+5VKcQXQ=; b=d2DTz80Bj5qFKMh2klRDD4 SNuqH0eTP9FzSFe7ZHEXpdJxwH5xj5+P/Xty0Urj3ehdaNzl/31wWer1rI1c9RQx WUkDseiXL1eq3w4v7p7Los9P5qcEk0E6XrHTSnq5XgxLC/p48kPrJC3qeAG0GCCs P7FvpQwhWCuS+ESZsrsTEtb2ycEzU9jnwCjxpTT0vtCcjb904QS/+WECSsYB//P8 ihkWIEt6ubdlQTJZGzgT4T+RnpPJKvRtjLzRM6XCVrBo0x6y2NLQsA9rmybvBzB0 8SqG1t3k590wOdxH5vLxhyAh5T0uLOipTkfh+5uQChZun/cx8PujXw1oyKWgQOfw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddtgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesghdtre ertderjeenucfhrhhomhepofgrrhhiuhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghs thhmrghilhdrtghomheqnecuffhomhgrihhnpehsohhurhgtvghfohhrghgvrdhnvghtne cukfhppeekgedrvddtvddrieelrddvheefnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Received: from localhost (ti0006q161-3035.bb.online.no [84.202.69.253]) by mail.messagingengine.com (Postfix) with ESMTPA id A574E328005E; Wed, 22 Jan 2020 13:46:02 -0500 (EST) From: Marius Bakke In-Reply-To: <20200120140636.o6xfbmeuqhde4ua3@zdrowyportier.kadziolka.net> References: <20200120140636.o6xfbmeuqhde4ua3@zdrowyportier.kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Wed, 22 Jan 2020 19:46:00 +0100 Message-ID: <87pnfbtjmf.fsf@devup.no> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Jakub Kądziołka writes: >> This is necessary to avoid a circular dependency in the next commit. >> >> * gnu/packages/curl.scm (curl-minimal): New public variable. >> * gnu/packages/cmake.scm (cmake-minimal)[inputs]: Change from CURL to >> CURL-MINIMAL. >> (cmake)[inputs]: Do the opposite. > > Is there a reason this curl-minimal couldn't also be used for > git-minimal? This would keep the updater working for rhash. Good catch. I did this initially, but found it simpler to not use git-fetch for RHash. I don't like inserting these 'magic' packages around the graph. It also means we need two graft two cURLs instead of one. But I don't feel strongly about it, and keeping the updater working is a good argument. So I was about to revert back, but then found out RHash is available on sourceforge too: https://sourceforge.net/projects/rhash/ Much better! Since you made me reconsider, I also found a better solution for 2/4: we can lose CMakes runtime dependency on 'curl-minimal' as well by using it only once, to build libjpeg-turbo: Thanks a lot for the feedback. Will push this shortly. :-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index d053935a86..fcc6642280 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -152,7 +152,7 @@ (apply invoke "./configure" configure-flags)))))) (native-inputs `(("bzip2" ,bzip2) - ("curl" ,curl-minimal) + ("curl" ,curl) ("expat" ,expat) ("file" ,file) ("libarchive" ,libarchive) @@ -235,6 +235,18 @@ and workspaces that can be used in the compiler environment of your choice.") (search-paths (package-native-search-paths cmake-minimal)))) +;; The purpose of this package is to solve a circular dependency between +;; packages that use cmake-build-system and CMakes own dependencies. +(define-public cmake-minimal-bootstrap + (package + (inherit cmake-minimal) + (name "cmake-minimal-bootstrap") + (native-inputs + `(;; cURL depends on ghostscript (via groff and OpenLDAP), which depends on + ;; 'cmake-build-system' through libtiff and ultimately libjpeg-turbo. + ("curl" ,curl-minimal) + ,@(alist-delete "curl" (package-native-inputs cmake-minimal)))))) + (define-public emacs-cmake-mode (package (inherit cmake) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 38efe61780..1b86f700e4 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -46,6 +46,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages curl) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) @@ -1505,8 +1506,13 @@ is hereby granted.")))) (native-inputs `(("nasm" ,nasm))) (arguments - '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib" - "-DENABLE_STATIC=0"))) + `(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib" + "-DENABLE_STATIC=0") + ,@(if (%current-target-system) + '() + ;; Use a special "bootstrap" CMake for the native build to work + ;; around a circular dependency between CMake and this package. + `(#:cmake ,cmake-minimal-bootstrap)))) (home-page "https://libjpeg-turbo.org/") (synopsis "SIMD-accelerated JPEG image handling library") (description "libjpeg-turbo is a JPEG image codec that accelerates baseline