all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob f749addf44bdcf460b85c902fc5b40530b73b0df 1116 bytes (raw)
name: gnu/packages/patches/libical-respect-tzdir.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
Copied from Nix:

https://github.com/NixOS/nixpkgs/blob/0336bd874374a9e33947ace8a289e5c785e44a19/pkgs/development/libraries/libical/respect-env-tzdir.patch

This functionality will be available in libical 3.1.0, whenever that is
released:

https://github.com/libical/libical/issues/350

--- a/src/libical/icaltz-util.c
+++ b/src/libical/icaltz-util.c
@@ -94,9 +94,9 @@
 static const char *zdir = NULL;
 
 static const char *search_paths[] = {
+    "/etc/zoneinfo",
     "/usr/share/zoneinfo",
     "/usr/lib/zoneinfo",
-    "/etc/zoneinfo",
     "/usr/share/lib/zoneinfo"
 };
 
@@ -178,6 +178,15 @@
     const char *fname = ZONES_TAB_SYSTEM_FILENAME;
     size_t i, num_search_paths;
 
+   const char *env_tzdir = getenv ("TZDIR");
+   if (env_tzdir) {
+       sprintf (file_path, "%s/%s", env_tzdir, fname);
+       if (!access (file_path, F_OK|R_OK)) {
+           zdir = env_tzdir;
+           return;
+       }
+   }
+
     num_search_paths = sizeof(search_paths) / sizeof(search_paths[0]);
     for (i = 0; i < num_search_paths; i++) {
         snprintf(file_path, MAXPATHLEN, "%s/%s", search_paths[i], fname);

debug log:

solving f749addf44 ...
found f749addf44 in https://yhetil.org/guix/724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name/

applying [1/1] https://yhetil.org/guix/724078bec9b692f2d0e3fae4a03a23ef96d94ee5.1682110862.git.leo@famulari.name/
diff --git a/gnu/packages/patches/libical-respect-tzdir.patch b/gnu/packages/patches/libical-respect-tzdir.patch
new file mode 100644
index 0000000000..f749addf44

1:20: trailing whitespace.
 
1:28: trailing whitespace.
 
1:32: trailing whitespace.
 
Checking patch gnu/packages/patches/libical-respect-tzdir.patch...
Applied patch gnu/packages/patches/libical-respect-tzdir.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 f749addf44bdcf460b85c902fc5b40530b73b0df	gnu/packages/patches/libical-respect-tzdir.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.