From: witekfl Date: Sat, 15 Nov 2003 06:39:16 +0000 (+0000) Subject: - support for HOME_ETC X-Git-Tag: deadbranch-1.1.2~2 X-Git-Url: https://git.pld-linux.org/?p=packages%2Fabiword.git;a=commitdiff_plain;h=19b595dfaee88ccd19b15a271731f444ee60bc8c - support for HOME_ETC Changed files: abiword-home_etc.patch -> 1.1 --- diff --git a/abiword-home_etc.patch b/abiword-home_etc.patch new file mode 100644 index 0000000..ccaaf91 --- /dev/null +++ b/abiword-home_etc.patch @@ -0,0 +1,68 @@ +diff -Nru abiword-2.0.1.orig/abi/src/af/xap/unix/xap_UnixApp.cpp abiword-2.0.1/abi/src/af/xap/unix/xap_UnixApp.cpp +--- abiword-2.0.1.orig/abi/src/af/xap/unix/xap_UnixApp.cpp 2003-06-07 18:28:14.000000000 +0200 ++++ abiword-2.0.1/abi/src/af/xap/unix/xap_UnixApp.cpp 2003-11-14 09:12:37.000000000 +0100 +@@ -176,7 +176,7 @@ + static char buf[PATH_MAX]; + memset(buf,0,sizeof(buf)); + +- char * szHome = getenv("HOME"); ++ char * szHome = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME"); + if (!szHome || !*szHome) + szHome = "./"; + +diff -Nru abiword-2.0.1.orig/abi/src/wp/ap/unix/ap_UnixApp.cpp abiword-2.0.1/abi/src/wp/ap/unix/ap_UnixApp.cpp +--- abiword-2.0.1.orig/abi/src/wp/ap/unix/ap_UnixApp.cpp 2003-10-10 15:35:35.000000000 +0200 ++++ abiword-2.0.1/abi/src/wp/ap/unix/ap_UnixApp.cpp 2003-11-14 09:14:05.000000000 +0100 +@@ -1099,7 +1099,7 @@ + static char buf[PATH_MAX]; + memset(buf,0,sizeof(buf)); + +- char * szHome = getenv("HOME"); ++ char * szHome = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv("HOME"); + if (!szHome || !*szHome) + szHome = "./"; + +--- abiword-2.0.1.orig/abi/src/other/pango/pango/mini-xft/minixftcfg.c 2002-05-12 21:12:49.000000000 +0200 ++++ abiword-2.0.1/abi/src/other/pango/pango/mini-xft/minixftcfg.c 2003-11-14 09:50:19.000000000 +0100 +@@ -50,7 +50,7 @@ + + if (*d == '~') + { +- h = getenv ("HOME"); ++ h = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv ("HOME"); + if (!h) + return False; + dir = (char *) malloc (strlen (h) + strlen (d)); +@@ -93,7 +93,7 @@ + + if (*c == '~') + { +- h = getenv ("HOME"); ++ h = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv ("HOME"); + if (!h) + return False; + new = (char *) malloc (strlen (h) + strlen (c)); +--- abiword-2.0.1.orig/abi/src/other/pango/pango/mini-xft/minixftlex.l 2002-05-12 21:12:55.000000000 +0200 ++++ abiword-2.0.1/abi/src/other/pango/pango/mini-xft/minixftlex.l 2003-11-14 09:51:17.000000000 +0100 +@@ -212,7 +212,7 @@ + t = s; + if (*s == '~') + { +- h = getenv ("HOME"); ++ h = getenv("HOME_ETC") ? getenv("HOME_ETC") : getenv ("HOME"); + if (h) + { + t = (char *) malloc (strlen (h) + strlen (s)); +--- abiword-2.0.1.orig/popt/poptconfig.c 2002-11-11 03:00:51.000000000 +0100 ++++ abiword-2.0.1/popt/poptconfig.c 2003-11-14 09:55:31.000000000 +0100 +@@ -144,7 +144,9 @@ + } + #endif + +- if ((home = getenv("HOME"))) { ++ home = getenv("HOME_ETC"); ++ if (!home) home = getenv("HOME"); ++ if (home) { + fn = alloca(strlen(home) + 20); + strcpy(fn, home); + strcat(fn, "/.popt");