[vte] Vary termcap file into for gtk2/3 builds
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Vary termcap file into for gtk2/3 builds
- Date: Mon, 4 Oct 2010 22:41:18 +0000 (UTC)
commit 89cb5538c3d1a7b825faa78f23106ee957442dee
Author: Christian Persch <chpe gnome org>
Date: Tue Oct 5 00:40:52 2010 +0200
Vary termcap file into for gtk2/3 builds
src/Makefile.am | 3 ++-
src/interpret.c | 3 +--
src/vte.c | 9 +++++----
termcaps/Makefile.am | 2 +-
4 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index a377965..9ca90a2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -96,6 +96,7 @@ libvte VTE_LIBRARY_SUFFIX_U@_la_CPPFLAGS = \
-DDATADIR='"$(datadir)"' \
-DLIBEXECDIR='"$(libexecdir)"' \
-DLOCALEDIR='"$(localedir)"' \
+ -DTERMCAPDIR='"$(pkgdatadir)/termcap-$(VTE_API_VERSION)"' \
-DVTE_COMPILATION \
$(AM_CPPFLAGS)
@@ -240,7 +241,7 @@ interpret_SOURCES = \
interpret.c
interpret_CPPFLAGS = \
-DINTERPRET_MAIN \
- -DDATADIR='"$(datadir)"'
+ -DTERMCAPDIR='"$(pkgdatadir)/termcap-$(VTE_API_VERSION)"'
interpret_CFLAGS = $(GTK_CFLAGS)
interpret_LDADD = $(GTK_LIBS)
diff --git a/src/interpret.c b/src/interpret.c
index 6bf155b..782d05b 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -72,8 +72,7 @@ main(int argc, char **argv)
g_type_init();
terminal = argv[1];
- termcap = _vte_termcap_new(g_strdup_printf(DATADIR "/" PACKAGE
- "/termcap/%s", terminal));
+ termcap = _vte_termcap_new(g_build_filename(TERMCAPDIR, terminal, NULL));
if (termcap == NULL) {
termcap = _vte_termcap_new("/etc/termcap");
}
diff --git a/src/vte.c b/src/vte.c
index c099a7f..1412478 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8035,10 +8035,11 @@ vte_terminal_set_termcap(VteTerminal *terminal, const char *path,
char *wpath;
if (path == NULL) {
- wpath = g_strdup_printf(DATADIR "/" PACKAGE "/termcap/%s",
- terminal->pvt->emulation ?
- terminal->pvt->emulation :
- vte_terminal_get_default_emulation(terminal));
+ wpath = g_build_filename(TERMCAPDIR,
+ terminal->pvt->emulation ?
+ terminal->pvt->emulation :
+ vte_terminal_get_default_emulation(terminal),
+ NULL);
if (g_stat(wpath, &st) != 0) {
g_free(wpath);
wpath = g_strdup("/etc/termcap");
diff --git a/termcaps/Makefile.am b/termcaps/Makefile.am
index 9f8d27a..965071b 100644
--- a/termcaps/Makefile.am
+++ b/termcaps/Makefile.am
@@ -1,5 +1,5 @@
EXTRA_DIST = xterm xterm.baseline
-termcapdir = $(pkgdatadir)/termcap
+termcapdir = $(pkgdatadir)/termcap-$(VTE_API_VERSION)
termcap_DATA = xterm
if VTE_DEFAULT_EMULATION
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]