diff options
author | Marius Bakke <[email protected]> | 2022-07-06 22:45:54 +0200 |
---|---|---|
committer | Marius Bakke <[email protected]> | 2022-07-16 23:25:17 +0200 |
commit | 12e77c03bcc41c143157d12d75d9b8a94457019d (patch) | |
tree | 5a53b7b03e025680af6a953ff4b1c885967d0d39 /gnu/packages/patches/libpaper-free-xdg-config-home.patch | |
parent | 397147aaad2e5d357479c0ff3ac3042432e320ae (diff) |
gnu: libpaper: Update to 1.2.1.
* gnu/packages/ghostscript.scm (libpaper): Update to 1.2.1.
[source]: Switch to currently maintained fork.
[home-page]: Likewise.
[arguments]: Remove #:phases. Add "--enable-relocatable" to #:configure-flags.
[native-inputs]: Remove AUTOMAKE. Add HELP2MAN.
[outputs]: Add "debug".
* gnu/packages/tex.scm (texlive-bin)[arguments]: Add phase to patch test
expected test result with libpaper 1.2.
* gnu/packages/patches/libpaper-free-systempapername.patch,
gnu/packages/patches/libpaper-free-xdg-config-home.patch,
gnu/packages/patches/libpaper-invalid-paperspecs.patch: New files.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
Diffstat (limited to 'gnu/packages/patches/libpaper-free-xdg-config-home.patch')
-rw-r--r-- | gnu/packages/patches/libpaper-free-xdg-config-home.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/patches/libpaper-free-xdg-config-home.patch b/gnu/packages/patches/libpaper-free-xdg-config-home.patch new file mode 100644 index 0000000000..79c3d8173d --- /dev/null +++ b/gnu/packages/patches/libpaper-free-xdg-config-home.patch @@ -0,0 +1,37 @@ +Free the xdg_config_home_variable only when needed. + +Taken from upstream: + + https://github.com/rrthomas/libpaper/commit/29e3e3800cfea738f12a9760290b92d5c199092b + +diff --git a/lib/libpaper.c.in.in b/lib/libpaper.c.in.in +index f7af1d7..aa86d06 100644 +--- a/lib/libpaper.c.in.in ++++ b/lib/libpaper.c.in.in +@@ -295,7 +295,6 @@ const char *defaultpapername(void) { + + const char *paperstr = getenv("PAPERSIZE"); + if (paperstr == NULL && xdg_config_home != NULL) { +- free_xdg_config_home = true; + char *papersize = mfile_name_concat(xdg_config_home, PAPERSIZE_FILENAME, NULL); + if (papersize != NULL) { + paperstr = papernamefile(papersize); +@@ -374,6 +373,7 @@ int paperinit(void) + xdg_config_home = getenv("XDG_CONFIG_HOME"); + if (xdg_config_home == NULL) { + char *home = getenv("HOME"); ++ free_xdg_config_home = true; + xdg_config_home = mfile_name_concat(home, ".config", NULL); + if (xdg_config_home == NULL) + return PAPER_NOMEM; +@@ -409,8 +409,10 @@ int paperdone(void) + { + if (initialized) { + free(sysconfdir); ++ sysconfdir = NULL; + if (free_xdg_config_home) + free(xdg_config_home); ++ xdg_config_home = NULL; + initialized = false; + } + return PAPER_OK; |