Hi Jure,

On 29/06/2017 11:07, Jure Pečar wrote:
Hi,

I want to apply this patch to R data.table to get it to behave in civilized 
manner:

diff -ur data.table/R/fread.R data.table.fix/R/fread.R
--- data.table/R/fread.R        2017-01-31 03:10:52.000000000 +0000
+++ data.table.fix/R/fread.R    2017-06-29 08:34:42.764465000 +0000
@@ -85,8 +85,11 @@
          tt = tempfile()
          on.exit(unlink(tt), add = TRUE)
          if (.Platform$OS.type == "unix") {
-            if (file.exists('/dev/shm') && file.info('/dev/shm')$isdir) {
-                tt = tempfile(tmpdir = '/dev/shm')
+            Sys.getenv(tmp("TMPDIR"))
+            if (file.exists(tmp) && file.info(tmp)$isdir) {
+                tt = tempfile(tmpdir = tmp)
+            } else {
+                tt = tempfile(tmpdir = '/tmp')
              }
              system(paste('(', input, ') > ', tt, sep=""))
          } else {


What would be the proper syntax in R easyconfig to apply it?

In general, you would specify a list of patches to apply via the 3rd (optional) argument in ('<extension_name>', '<extension_version>', '<extension_options_dict>').

Since you also need to specify other options (source_urls, source_tmpl), you should leverage the 'ext_options' local variable for this.

Long story short, see for example https://github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/r/R/R-3.4.0-intel-2017a-X11-20170314.eb#L399:

('kohonen', '3.0.2', dict(ext_options.items() + [('patches', ['kohonen-3.0.2_icpc-wd308.patch'])])),


regards,

Kenneth

Reply via email to