From: Marius Bakke <mbakke@fastmail.com>
To: "Jakub Kądziołka" <kuba@kadziolka.net>, 39197-done@debbugs.gnu.org
Subject: bug#39197: [PATCH core-updates 2/4] gnu: cmake-minimal: Build with a minimal variant of cURL.
Date: Wed, 22 Jan 2020 19:46:00 +0100 [thread overview]
Message-ID: <87pnfbtjmf.fsf@devup.no> (raw)
In-Reply-To: <20200120140636.o6xfbmeuqhde4ua3@zdrowyportier.kadziolka.net>
[-- Attachment #1.1: Type: text/plain, Size: 1103 bytes --]
Jakub Kądziołka <kuba@kadziolka.net> 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: Type: text/x-patch, Size: 2447 bytes --]
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
[-- Attachment #1.3: Type: text/plain, Size: 62 bytes --]
Thanks a lot for the feedback. Will push this shortly. :-)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
prev parent reply other threads:[~2020-01-22 18:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-19 23:16 [bug#39197] [PATCH core-updates 0/4] Replace libjpeg with libjpeg-turbo Marius Bakke
2020-01-19 23:20 ` [bug#39197] [PATCH core-updates 1/4] gnu: RHash: Do not use git-fetch, but provide a fallback URL Marius Bakke
2020-01-19 23:20 ` [bug#39197] [PATCH core-updates 2/4] gnu: cmake-minimal: Build with a minimal variant of cURL Marius Bakke
2020-01-19 23:20 ` [bug#39197] [PATCH core-updates 3/4] gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo' Marius Bakke
2020-01-19 23:20 ` [bug#39197] [PATCH core-updates 4/4] gnu: Deprecate the 'libjpeg' variable Marius Bakke
2020-01-20 14:06 ` [bug#39197] [PATCH core-updates 2/4] gnu: cmake-minimal: Build with a minimal variant of cURL Jakub Kądziołka
2020-01-22 18:46 ` Marius Bakke [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnfbtjmf.fsf@devup.no \
--to=mbakke@fastmail.com \
--cc=39197-done@debbugs.gnu.org \
--cc=kuba@kadziolka.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).