From 6748c2d28b108ee4ecff6ece89e0448608c45e7b Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 29 Jan 2012 23:28:55 +0200 Subject: [PATCH 3/6] add SYSSHARE to remove hardcoded /usr/local from font path --- Makefile | 2 +- files.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 97b6396..1bf09a4 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ userinstall: SDL_CFLAGS=`sdl-config --cflags` SDL_LIB=`sdl-config --libs` -CCFLAGS=-Wall -ansi -Wextra -pedantic -O3 +CCFLAGS=-Wall -ansi -Wextra -pedantic -O3 -DSYSSHARE=\"$(SYSPREFIX)/share\" multitalk: multitalk.o datatype.o sdltools.o parse.o graph.o style.o \ files.o render.o latex.o web.o config.o multitalk.h diff --git a/files.cpp b/files.cpp index 0286df6..993c25d 100644 --- a/files.cpp +++ b/files.cpp @@ -260,14 +260,14 @@ int absolute_path(char *s) Config *init_paths(const char *talk_ref) { Config *config = new Config(); - const char *sys_prefix = "/usr/local/share"; + const char *sys_share = SYSSHARE; config->talk_path = replace_extension(talk_ref, "talk"); config->graph_path = replace_extension(talk_ref, "graph"); config->project_dir = get_path(talk_ref); config->latex_dir = replace_extension(talk_ref, "latex"); config->html_dir = replace_extension(talk_ref, "html"); - config->sys_dir = combine_path(sys_prefix, "multitalk"); + config->sys_dir = combine_path(sys_share, "multitalk"); config->sys_image_dir = combine_path(config->sys_dir, "gfx"); config->sys_style_dir = combine_path(config->sys_dir, "styles"); config->sys_font_dir = combine_path(config->sys_dir, "fonts"); -- 1.7.9.1