GNU bug report logs - #46717
[PATCH 0/2] r-haven: Unvendor readstat

Previous Next

Package: guix-patches;

Reported by: Lars-Dominik Braun <lars <at> 6xq.net>

Date: Tue, 23 Feb 2021 13:06:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46717 in the body.
You can then email your comments to 46717 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46717; Package guix-patches. (Tue, 23 Feb 2021 13:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars-Dominik Braun <lars <at> 6xq.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 23 Feb 2021 13:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/2] r-haven: Unvendor readstat
Date: Tue, 23 Feb 2021 14:04:46 +0100
I rebuilt all packages depending on r-haven and tried loading example
files using r-haven’s read_* functions. There are no apparent
modifications to the vendored source, based on a look at
https://github.com/tidyverse/haven/commits/v2.3.1/src/readstat
but it’s not quite clear which version they are using. Probably a git
snapshot.

Lars-Dominik Braun (2):
  gnu: Add readstat.
  gnu: r-haven: Unvendor readstat.

 gnu/packages/cran.scm       | 19 +++++++++++++++++--
 gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)

-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#46717; Package guix-patches. (Tue, 23 Feb 2021 13:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 46717 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: 46717 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add readstat.
Date: Tue, 23 Feb 2021 14:06:51 +0100
* gnu/packages/statistics.scm (readstat): New variable.
---
 gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 3821c86da9..be30fa712c 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -5904,3 +5904,31 @@ Java package that provides routines for various statistical distributions.")
 is designed to support editing of scripts and interaction with various
 statistical analysis programs such as R, Julia, and JAGS.")
       (license license:gpl3+))))
+
+(define-public readstat
+  (package
+    (name "readstat")
+    (version "1.1.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/WizardMac/ReadStat.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00sdmaq0qzp6kyv53fpfi6jf3iv4pd0ap0gmw3mbfip52bbnl55w"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("gettext" ,gnu-gettext)
+       ("libtool" ,libtool)))
+    (inputs
+     `(("zlib" ,zlib)))                 ; libz
+    (synopsis "Convert SAS, Stata, and SPSS files")
+    (description "Command-line tool and C library for reading files from
+popular stats packages like SAS, Stata and SPSS.")
+    (home-page "https://github.com/WizardMac/ReadStat")
+    (license license:expat)))
+
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#46717; Package guix-patches. (Tue, 23 Feb 2021 13:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 46717 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: 46717 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: r-haven: Unvendor readstat.
Date: Tue, 23 Feb 2021 14:07:14 +0100
* gnu/packages/cran.scm (r-haven) [snippet]: Remove bundled readstat.
[arguments]: Patch Makevars to use system readstat.
[inputs]: Replace zlib with readstat.
---
 gnu/packages/cran.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 4a88cf1677..d675b7e37a 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -2309,10 +2309,25 @@ including functions for geolocation and routing.")
        (uri (cran-uri "haven" version))
        (sha256
         (base32
-         "03cypgqhdkrfbfpl1yx2wb7flczrbak1w654wkicmd5ajwr9zvkf"))))
+         "03cypgqhdkrfbfpl1yx2wb7flczrbak1w654wkicmd5ajwr9zvkf"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+            ;; unvendor readstat
+           (delete-file-recursively "src/readstat")
+           #t))))
     (build-system r-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unbundle-readstat
+           (lambda _
+             ;; Not required, since we’re not building readstat.
+             (substitute* "src/Makevars"
+               (("-lz") "-lreadstat"))
+             #t)))))
     (inputs
-     `(("zlib" ,zlib)))
+     `(("readstat" ,readstat)))
     (native-inputs
      `(("r-knitr" ,r-knitr)))
     (propagated-inputs
-- 
2.26.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 02 Mar 2021 19:33:02 GMT) Full text and rfc822 format available.

Notification sent to Lars-Dominik Braun <lars <at> 6xq.net>:
bug acknowledged by developer. (Tue, 02 Mar 2021 19:33:02 GMT) Full text and rfc822 format available.

Message #16 received at 46717-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 46717-done <at> debbugs.gnu.org
Subject: Re: bug#46717: [PATCH 0/2] r-haven: Unvendor readstat
Date: Tue, 02 Mar 2021 20:32:03 +0100
Hi,

Lars-Dominik Braun <lars <at> 6xq.net> skribis:

> I rebuilt all packages depending on r-haven and tried loading example
> files using r-haven’s read_* functions. There are no apparent
> modifications to the vendored source, based on a look at
> https://github.com/tidyverse/haven/commits/v2.3.1/src/readstat
> but it’s not quite clear which version they are using. Probably a git
> snapshot.
>
> Lars-Dominik Braun (2):
>   gnu: Add readstat.
>   gnu: r-haven: Unvendor readstat.

Applied both, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#46717; Package guix-patches. (Fri, 05 Mar 2021 11:58:01 GMT) Full text and rfc822 format available.

Message #19 received at 46717-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 46717-done <at> debbugs.gnu.org
Subject: Re: bug#46717: [PATCH 0/2] r-haven: Unvendor readstat
Date: Fri, 05 Mar 2021 12:57:11 +0100
Hi,

Lars-Dominik Braun <lars <at> 6xq.net> skribis:

> I rebuilt all packages depending on r-haven and tried loading example
> files using r-haven’s read_* functions. There are no apparent
> modifications to the vendored source, based on a look at
> https://github.com/tidyverse/haven/commits/v2.3.1/src/readstat
> but it’s not quite clear which version they are using. Probably a git
> snapshot.
>
> Lars-Dominik Braun (2):
>   gnu: Add readstat.
>   gnu: r-haven: Unvendor readstat.

LGTM!  Pushed a couple of days ago as
2075b83b2dbd9896e2e69070e3363f3d43fbe133.

Ludo’.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 03 Apr 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.