diff mbox series

[bug#39197,core-updates,2/4] gnu: cmake-minimal: Build with a minimal variant of cURL.

Message ID 20200119232006.12303-2-mbakke@fastmail.com
State Accepted
Headers show
Series Replace libjpeg with libjpeg-turbo | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Marius Bakke Jan. 19, 2020, 11:20 p.m. UTC
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.
---
 gnu/packages/cmake.scm |  5 ++++-
 gnu/packages/curl.scm  | 16 ++++++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index e24b6dea7d..d053935a86 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)
+       ("curl" ,curl-minimal)
        ("expat" ,expat)
        ("file" ,file)
        ("libarchive" ,libarchive)
@@ -221,6 +221,9 @@  and workspaces that can be used in the compiler environment of your choice.")
      `(,@(package-native-inputs cmake-minimal)
        ("python-sphinx" ,python-sphinx)
        ("texinfo" ,texinfo)))
+    (inputs
+     `(("curl" ,curl)
+       ,@(alist-delete "curl" (package-inputs cmake-minimal))))
     (outputs '("out" "doc"))
     (properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
 
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 3d230dc1f0..4a73b1f34c 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -4,7 +4,7 @@ 
 ;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
@@ -46,7 +46,8 @@ 
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages web))
+  #:use-module (gnu packages web)
+  #:use-module (srfi srfi-1))
 
 (define-public curl
   (package
@@ -154,6 +155,17 @@  tunneling, and so on.")
                                   "See COPYING in the distribution."))
    (home-page "https://curl.haxx.se/")))
 
+;; This package is used to solve a cyclic dependency between 'cmake-minimal' and
+;; packages that use cmake-build-system such as 'libjpeg-turbo' (via ghostscript).
+;; It must not depend on anything that uses cmake-build-system.
+(define-public curl-minimal
+  (hidden-package
+   (package/inherit
+    curl
+    (name "curl-minimal")
+    (native-inputs (alist-delete "groff" (package-native-inputs curl)))
+    (inputs (alist-delete "openldap" (package-inputs curl))))))
+
 (define-public kurly
   (package
     (name "kurly")