aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/aspell-default-dict-dir.patch
blob: 5f759a66d9725fa9f175ca1fd7a83eec6ffb5edb (about) (plain)
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
39
40
41
42
This patch changes the default value of 'dict-dir' to correspond
to ~/.guix-profile/lib/aspell rather than $prefix/lib/aspell-X.Y.

This is not strictly necessary for the 'aspell' program itself since
one can simply set "ASPELL_CONF=dict-dir $HOME/.guix-profile/lib/aspell".
However it is necessary for applications that use libaspell since
'ASPELL_CONF' is not honored in this case.  See <https://bugs.gnu.org/25836>.

--- a/common/config.cpp
+++ b/common/config.cpp
@@ -651,7 +651,20 @@ namespace acommon {
 	  } else { // sep == '|'
 	    assert(replace[0] == '$');
 	    const char * env = getenv(replace.c_str()+1);
-	    final_str += env ? env : second;
+	    if (env) {
+	      final_str += env;
+	    } else if (second[0] == '$') {
+	      // Expand the right-hand side of '|', which starts with a
+	      // reference to an environment variable.
+	      auto slash = second.find('/');
+	      String variable = second.substr(1, slash - 1);
+	      const char * env = getenv(variable.c_str());
+	      String value = env ? String(env) : "";
+	      value += second.substr(slash, second.size() - slash);
+	      final_str += value;
+	    } else {
+	      final_str += second;
+	    }
 	  }
 	  replace = "";
 	  in_replace = false;
@@ -1349,6 +1349,9 @@ namespace acommon {
 #  define REPL     ".aspell.<lang>.prepl"
 #endif
 
+#undef DICT_DIR
+#define DICT_DIR "<$ASPELL_DICT_DIR|$HOME/.guix-profile/lib/aspell>"
+
   static const KeyInfo config_keys[] = {
     // the description should be under 50 chars
     {"actual-dict-dir", KeyInfoString, "<dict-dir^master>", 0}
Remove. * guix/build-system/dub.scm (dub-build): Likewise. * guix/build-system/emacs.scm (emacs-build): Likewise. * guix/build-system/go.scm (go-build): Likewise. * guix/build-system/haskell.scm (haskell-build): Likewise. * guix/build-system/julia.scm (julia-build): Likewise. * guix/build-system/linux-module.scm (linux-module-build) (linux-module-build-cross): Likewise. * guix/build-system/maven.scm (maven-build): Likewise. * guix/build-system/minify.scm (minify-build): Likewise. * guix/build-system/node.scm (node-build): Likewise. * guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise. * guix/build-system/r.scm (r-build): Likewise. * guix/build-system/rakudo.scm (rakudo-build): Likewise. * guix/build-system/renpy.scm (renpy-build): Likewise. * tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'. Pass #:source parameter. * tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of a normal return from the 'build' method. ("package->bag, sensitivity to %current-target-system"): Change 'build' to match the new build system signature. squash! build-system: Rewrite using gexps. squash! build-system: Rewrite using gexps. Ludovic Courtès 2021-03-24Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner 2021-03-23gnu: bootstrap: Add support for powerpc64le-linux....The bootstrap tarballs used by these bootstrap packages were created via the following steps: - Create a new x86_64 VM using QEMU. - Use https://ftp.gnu.org/gnu/guix/guix-system-install-1.2.0.x86_64-linux.iso.xz to install Guix System 1.2.0 in the VM. - Run: guix pull --no-substitutes --commit=662e7e28d576ada91fc9dec7d27c100666114f03 - Run: guix build --no-substitutes --target=powerpc64le-linux-gnu bootstrap-tarballs With the exception of gcc-static, all bootstrap binaries contained in these tarballs can be built reproducibly. Unfortunately, gcc-static is not always reproducible when everything is built from source on separate machines. Despite investigation efforts, the cause remains unclear, so we have decided to move forward with these binaries to unblock further bootstrapping work. For details, see <https://bugs.gnu.org/41669>. * gnu/packages/bootstrap.scm (%bootstrap-executables) (bootstrap-executable-file-name, bootstrap-guile-url-path) (bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils) (%bootstrap-glibc, %bootstrap-gcc): Add entries for powerpc64le-linux. (%bootstrap-executable-base-urls): Add an entry for alpha.gnu.org. Chris Marusich