diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/kobodeluxe/files/kobodeluxe-sysconf-support.patch | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/kobodeluxe/files/kobodeluxe-sysconf-support.patch')
-rw-r--r-- | recipes/kobodeluxe/files/kobodeluxe-sysconf-support.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/recipes/kobodeluxe/files/kobodeluxe-sysconf-support.patch b/recipes/kobodeluxe/files/kobodeluxe-sysconf-support.patch new file mode 100644 index 0000000000..1f62b31d71 --- /dev/null +++ b/recipes/kobodeluxe/files/kobodeluxe-sysconf-support.patch @@ -0,0 +1,84 @@ +Index: KoboDeluxe-0.5.1/configure.in +=================================================================== +--- KoboDeluxe-0.5.1.orig/configure.in 2008-02-10 20:51:37.000000000 +0100 ++++ KoboDeluxe-0.5.1/configure.in 2008-02-10 21:40:09.000000000 +0100 +@@ -36,6 +36,7 @@ + SCOREDIR='$(sharedstatedir)/kobo-deluxe/scores' + CONFIGDIR='HOME>>' + CONFIGFILE='.kobodlrc' ++USE_SYSCONF=1 + EXEFILE=kobodl + case "$target_os" in + linux*) +@@ -57,6 +58,7 @@ + SCOREDIR='EXE>>scores' + CONFIGDIR='EXE>>' + CONFIGFILE='kobodl.cfg' ++ USE_SYSCONF=0 + EXEFILE=kobodl.exe + MATHLIB="" + ;; +@@ -68,6 +70,7 @@ + SCOREDIR='EXE>>scores' + CONFIGDIR='EXE>>' + CONFIGFILE='kobodl.cfg' ++ USE_SYSCONF=0 + EXEFILE=kobodl.exe + MATHLIB="" + ;; +@@ -105,10 +108,12 @@ + AM_CONDITIONAL(BUILD_MACOSX_BUNDLE, test x$build_macosx_bundle = xyes) + AM_CONDITIONAL(BUILD_SIMPLE_BUNDLE, test x$build_simple_bundle = xyes) + AM_CONDITIONAL(UNIX_SCOREDIR, test x$unix_scoredir = xyes) ++AC_DEFINE_UNQUOTED([USE_SYSCONF], [$USE_SYSCONF], [Define to 1 to use Unix-style sysconf dir for default configuration.]) + AC_SUBST(DATADIR) + AC_SUBST(SCOREDIR) + AC_SUBST(CONFIGDIR) + AC_SUBST(CONFIGFILE) ++AC_SUBST(KOBO_SYSCONF) + AC_SUBST(EXEFILE) + AC_SUBST(MATHLIB) + +Index: KoboDeluxe-0.5.1/kobo.cpp +=================================================================== +--- KoboDeluxe-0.5.1.orig/kobo.cpp 2008-02-10 20:57:32.000000000 +0100 ++++ KoboDeluxe-0.5.1/kobo.cpp 2008-02-10 21:27:22.000000000 +0100 +@@ -1293,9 +1293,38 @@ + FILE *f = fmap->fopen(KOBO_CONFIG_DIR "/" KOBO_CONFIG_FILE, "r"); + if(f) + { ++ log_puts(VLOG, "Loading personal configuration from: "\ ++ KOBO_CONFIG_DIR "/" KOBO_CONFIG_FILE "\n"); + p->read(f); + fclose(f); + } ++#if USE_SYSCONF ++ /* On Unixen, where they have SYSCONF_DIR (usually /etc) try to get ++ * the default configuration from a file stored there before ++ * giving up. ++ * ++ * This gives packagers a chance to provide a proper default ++ * (playable) configuration for all those little Linux-based ++ * gadgets that are flying around. ++ */ ++ else ++ { ++ f = fmap->fopen(SYSCONF_DIR "/kobo-deluxe/default-config", "r"); ++ if(f) ++ { ++ log_puts(VLOG, "Loading configuration defaults from: "\ ++ SYSCONF_DIR "/kobo-deluxe/default-config\n"); ++ ++ p->read(f); ++ fclose(f); ++ } ++ else ++ log_puts(VLOG, "Using built-in configuration defaults.\n"); ++ ++ } ++#else ++ log_puts(VLOG, "Using built-in configuration defaults.\n"); ++#endif + } + + |