unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45653] [PATCH 0/2] Update guile-curl
@ 2021-01-04 15:11 Leo Prikler
  2021-01-04 15:13 ` [bug#45653] [PATCH 1/2] gnu: guile-curl: Update to 0.7 Leo Prikler
  2021-01-06  9:32 ` [bug#45653] [PATCH 0/2] Update guile-curl Mathieu Othacehe
  0 siblings, 2 replies; 5+ messages in thread
From: Leo Prikler @ 2021-01-04 15:11 UTC (permalink / raw)
  To: 45653

Hello Guix,

As has been announced by spk121 in #guile earlier today, guile-curl has
a new major version, that comes with Guile 3 support.  The update is
sadly not trivial, though, so I'll let y'all verify it ahead of time.

Regards,
Leo





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#45653] [PATCH 1/2] gnu: guile-curl: Update to 0.7.
  2021-01-04 15:11 [bug#45653] [PATCH 0/2] Update guile-curl Leo Prikler
@ 2021-01-04 15:13 ` Leo Prikler
  2021-01-04 15:13   ` [bug#45653] [PATCH 2/2] gnu: Add guile2.2-curl Leo Prikler
  2021-01-06  9:32 ` [bug#45653] [PATCH 0/2] Update guile-curl Mathieu Othacehe
  1 sibling, 1 reply; 5+ messages in thread
From: Leo Prikler @ 2021-01-04 15:13 UTC (permalink / raw)
  To: 45653

* gnu/packages/curl.scm (guile-curl): Update to 0.7.
[#:modules, #:imported-modules]: Load guile-build-system for
target-guile-effective-version.
[#:configure-flags]: Use target-guile-effective-version.
[#:phases]: Add 'patch-undefined-references.
Use target-guile-effective-version.
[inputs]: Use guile-3.0.
---
 gnu/packages/curl.scm | 59 ++++++++++++++++++++++++++++++-------------
 1 file changed, 42 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 33a2188d70..451c517ee1 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -243,43 +243,68 @@ not offer a replacement for libcurl.")
 (define-public guile-curl
   (package
    (name "guile-curl")
-   (version "0.6")
+   (version "0.7")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://www.lonelycactus.com/tarball/"
                                 "guile_curl-" version ".tar.gz"))
             (sha256
              (base32
-              "1pxdhnk288ky6gkpad8i60m0p6404rdvls43lr1b5d3csrklyc70"))))
+              "1zk0ijx6bj212k0j0ma84cpvpvn0x6raaxnby3wdx3w4wnhnscn7"))))
    (build-system gnu-build-system)
    (arguments
-    `(#:configure-flags (list (string-append
+    `(#:modules (((guix build guile-build-system)
+                  #:select (target-guile-effective-version))
+                 ,@%gnu-build-system-modules)
+      #:imported-modules ((guix build guile-build-system)
+                          ,@%gnu-build-system-modules)
+      #:configure-flags (list (string-append
                                "--with-guilesitedir="
                                (assoc-ref %outputs "out")
-                               "/share/guile/site/2.2")
+                               "/share/guile/site/"
+                               (target-guile-effective-version
+                                (assoc-ref %build-inputs "guile")))
                               (string-append
                                "-with-guileextensiondir="
                                (assoc-ref %outputs "out")
-                               "/lib/guile/2.2/extensions"))
+                               "/lib/guile/"
+                               (target-guile-effective-version
+                                (assoc-ref %build-inputs "guile"))
+                               "/extensions"))
       #:phases
       (modify-phases %standard-phases
+        (add-after 'unpack 'patch-undefined-references
+          (lambda* _
+            (substitute* "src/curl.scm"
+              ;; The following #defines are missing from our curl package
+              ;; and therefore result in the evaluation of undefined symbols.
+              ((",CURLOPT_HAPROXYPROTOCOL") "#f")
+              ((",CURLOPT_DISALLOW_USERNAME_IN_URL") "#f")
+              ((",CURLOPT_TIMEVALUE_LARGE") "#f")
+              ((",CURLOPT_DNS_SHUFFLE_ADDRESSES") "#f")
+              ((",CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS") "#f"))))
         (add-after 'install 'patch-extension-path
           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out      (assoc-ref outputs "out"))
-                    (curl.scm (string-append
-                               out "/share/guile/site/2.2/curl.scm"))
-                    (curl.go  (string-append
-                               out "/lib/guile/2.2/site-ccache/curl.go"))
-                    (ext      (string-append out "/lib/guile/2.2/"
-                                             "extensions/libguile-curl")))
-               (substitute* curl.scm (("libguile-curl") ext))
-               ;; The build system does not actually compile the Scheme module.
-               ;; So we can compile it and put it in the right place in one go.
-               (invoke "guild" "compile" curl.scm "-o" curl.go)))))))
+            (let* ((out      (assoc-ref outputs "out"))
+                   (curl.scm (string-append
+                              out "/share/guile/site/"
+                              (target-guile-effective-version)
+                              "/curl.scm"))
+                   (curl.go  (string-append
+                              out "/lib/guile/"
+                              (target-guile-effective-version)
+                              "/site-ccache/curl.go"))
+                   (ext      (string-append out "/lib/guile/"
+                                            (target-guile-effective-version)
+                                            "/extensions/libguile-curl")))
+              (substitute* curl.scm (("libguile-curl") ext))
+              ;; The build system does not actually compile the Scheme module.
+              ;; So we can compile it and put it in the right place in one go.
+              (invoke "guild" "compile" curl.scm "-o" curl.go)))))))
    (native-inputs `(("pkg-config" ,pkg-config)))
    (inputs
     `(("curl" ,curl)
-      ("guile" ,guile-2.2)))
+      ("guile" ,guile-3.0)))
    (home-page "http://www.lonelycactus.com/guile-curl.html")
    (synopsis "Curl bindings for Guile")
    (description "@code{guile-curl} is a project that has procedures that allow
-- 
2.30.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#45653] [PATCH 2/2] gnu: Add guile2.2-curl.
  2021-01-04 15:13 ` [bug#45653] [PATCH 1/2] gnu: guile-curl: Update to 0.7 Leo Prikler
@ 2021-01-04 15:13   ` Leo Prikler
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Prikler @ 2021-01-04 15:13 UTC (permalink / raw)
  To: 45653

* gnu/packages/curl.scm (guile2.2-curl): New variable.
---
 gnu/packages/curl.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 451c517ee1..5bc96ef7cc 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -312,6 +312,14 @@ Guile to do client-side URL transfers, like requesting documents from HTTP or
 FTP servers.  It is based on the curl library.")
    (license license:gpl3+)))
 
+(define-public guile2.2-curl
+  (package
+    (inherit guile-curl)
+    (name "guile2.2-curl")
+    (inputs
+     `(("curl" ,curl)
+       ("guile" ,guile-2.2)))))
+
 (define-public curlpp
   (package
     (name "curlpp")
-- 
2.30.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#45653] [PATCH 0/2] Update guile-curl
  2021-01-04 15:11 [bug#45653] [PATCH 0/2] Update guile-curl Leo Prikler
  2021-01-04 15:13 ` [bug#45653] [PATCH 1/2] gnu: guile-curl: Update to 0.7 Leo Prikler
@ 2021-01-06  9:32 ` Mathieu Othacehe
  2021-01-06 21:32   ` bug#45653: " Leo Prikler
  1 sibling, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2021-01-06  9:32 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 45653


Hello Leo,

> As has been announced by spk121 in #guile earlier today, guile-curl has
> a new major version, that comes with Guile 3 support.  The update is
> sadly not trivial, though, so I'll let y'all verify it ahead of time.

This patchset seems fine to me.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#45653: [PATCH 0/2] Update guile-curl
  2021-01-06  9:32 ` [bug#45653] [PATCH 0/2] Update guile-curl Mathieu Othacehe
@ 2021-01-06 21:32   ` Leo Prikler
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Prikler @ 2021-01-06 21:32 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 45653-done

Hi Mathieu,
Am Mittwoch, den 06.01.2021, 10:32 +0100 schrieb Mathieu Othacehe:
> Hello Leo,
> 
> > As has been announced by spk121 in #guile earlier today, guile-curl 
> > has
> > a new major version, that comes with Guile 3 support.  The update
> > is
> > sadly not trivial, though, so I'll let y'all verify it ahead of
> > time.
> 
> This patchset seems fine to me.
> 
> Thanks,
> 
> Mathieu
Thanks for the review, I've pushed it now.

Regards,
Leo





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-06 21:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 15:11 [bug#45653] [PATCH 0/2] Update guile-curl Leo Prikler
2021-01-04 15:13 ` [bug#45653] [PATCH 1/2] gnu: guile-curl: Update to 0.7 Leo Prikler
2021-01-04 15:13   ` [bug#45653] [PATCH 2/2] gnu: Add guile2.2-curl Leo Prikler
2021-01-06  9:32 ` [bug#45653] [PATCH 0/2] Update guile-curl Mathieu Othacehe
2021-01-06 21:32   ` bug#45653: " Leo Prikler

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).