zhcon/zhcon-0.2.6-path-define.patch

118 lines
4.7 KiB
Diff
Raw Blame History

--- zhcon-0.2.5/configure.in.path_define 2007-02-16 03:47:08.000000000 +0900
+++ zhcon-0.2.5/configure.in 2007-02-16 03:48:31.000000000 +0900
@@ -175,6 +175,16 @@
AC_CHECK_LIB(gpm,main,,usegpm="no")
dnl-----------------------------------------------------------------------
+dnl Fedora specific fix
+dnl-----------------------------------------------------------------------
+CFLAGS="$CFLAGS -DDATADIR=\\\"$datadir\\\" -DSYSCONFDIR=\\\"$sysconfdir\\\""
+CXXFLAGS="$CXXFLAGS -DDATADIR=\\\"$datadir\\\" -DSYSCONFDIR=\\\"$sysconfdir\\\""
+
+eval DATADIR=${datadir}
+eval DATADIR=$DATADIR
+AC_SUBST(DATADIR)
+
+dnl-----------------------------------------------------------------------
dnl Checks for libggi
dnl-----------------------------------------------------------------------
useggi="yes"
@@ -208,7 +218,7 @@
libggi support: ${useggi}
unicon support: ${useunicon}
zhcon binary dir: `eval "echo \`eval \"echo ${bindir}\"\`"`
- zhcon files dir: `eval "echo \`eval \"echo ${libdir}/${PACKAGE}\"\`"`
+ zhcon files dir: `eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
Config complete, now type make to build zhcon.
Good Luck!
--- zhcon-0.2.5/font/Makefile.am.path_define 2007-02-16 03:47:08.000000000 +0900
+++ zhcon-0.2.5/font/Makefile.am 2007-02-16 03:47:08.000000000 +0900
@@ -1,8 +1,8 @@
EXTRA_DIST = *.bpsf
install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(libdir)/zhcon/font/
- $(INSTALL_DATA) $(srcdir)/*.bpsf $(DESTDIR)$(libdir)/zhcon/font/
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/zhcon/font/
+ $(INSTALL_DATA) $(srcdir)/*.bpsf $(DESTDIR)$(datadir)/zhcon/font/
uninstall-local:
- -rm -f $(DESTDIR)$(libdir)/zhcon/font/*.bpsf
+ -rm -f $(DESTDIR)$(datadir)/zhcon/font/*.bpsf
--- zhcon-0.2.5/input/Makefile.am.path_define 2007-02-16 03:47:08.000000000 +0900
+++ zhcon-0.2.5/input/Makefile.am 2007-02-16 03:47:08.000000000 +0900
@@ -1,8 +1,8 @@
EXTRA_DIST = *.mb
install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(libdir)/zhcon/input/
- $(INSTALL_DATA) $(srcdir)/*.mb $(DESTDIR)$(libdir)/zhcon/input/
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/zhcon/input/
+ $(INSTALL_DATA) $(srcdir)/*.mb $(DESTDIR)$(datadir)/zhcon/input/
uninstall-local:
- -rm -f $(DESTDIR)$(libdir)/zhcon/input/*.mb
+ -rm -f $(DESTDIR)$(datadir)/zhcon/input/*.mb
--- zhcon-0.2.5/src/Makefile.am.path_define 2007-02-16 03:47:08.000000000 +0900
+++ zhcon-0.2.5/src/Makefile.am 2007-02-16 03:47:08.000000000 +0900
@@ -11,11 +11,11 @@
chmod 4755 $(DESTDIR)$(bindir)/zhcon
install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(prefix)/etc
- $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)$(prefix)/etc/zhcon.conf
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)$(sysconfdir)/zhcon.conf
uninstall-local:
- -rm -f $(DESTDIR)$(prefix)/etc/zhcon.conf
+ -rm -f $(DESTDIR)$(sysconfdir)/zhcon.conf
# set the include path found by configure
INCLUDES= $(all_includes)
--- zhcon-0.2.5/src/nativeinputserver.cpp.path_define 2006-04-25 01:38:27.000000000 +0900
+++ zhcon-0.2.5/src/nativeinputserver.cpp 2007-02-16 03:47:08.000000000 +0900
@@ -30,7 +30,7 @@
#include "nativeinputserver.h"
#include "keymap.h"
-string NativeInputServer::mDataPath = PREFIX"/lib/zhcon/";
+string NativeInputServer::mDataPath = DATADIR"/zhcon/";
NativeInputServer::Symbol NativeInputServer::mFullSymbolTable[] = {
{'.', "<22><>"}
--- zhcon-0.2.5/src/zhcon.cpp.path_define 2007-02-16 03:47:08.000000000 +0900
+++ zhcon-0.2.5/src/zhcon.cpp 2007-02-16 03:47:08.000000000 +0900
@@ -123,7 +123,7 @@
string cfgfile = getenv("HOME");
cfgfile += "/.zhconrc";
if (access(cfgfile.c_str(), R_OK) != 0)
- cfgfile = PREFIX "/etc/zhcon.conf";
+ cfgfile = SYSCONFDIR "/zhcon.conf";
//for debug,a pause enable us to attach zhcon's pid in gdb
//char c;cin>>c;
@@ -621,7 +621,7 @@
if (getenv("LC_ALL"))
mOldLocale = getenv("LC_ALL");
- string prefix = PREFIX"/lib/zhcon/";
+ string prefix = DATADIR "/zhcon/";
mASCIIFont = prefix + f.GetOption(string("ascfont"), string(ASCIIFONT));
mGB2312Font = prefix + f.GetOption(string("gbfont"), string(GB2312FONT));
mGBKFont = prefix + f.GetOption(string("gbkfont"), string(GBKFONT));
@@ -752,10 +752,10 @@
InputManager::SetTty(mConFd, ttyno, mTtyFd);
string s;
- s = f.GetOption(string("zhconpath"), string(PREFIX"/lib/zhcon/"));
+ s = f.GetOption(string("zhconpath"), string(DATADIR "/zhcon/"));
NativeInputServer::SetDataPath(s);
#ifdef HAVE_UNICON_LIB
- s = f.GetOption(string("uniconpath"), string("/usr/lib/unicon/"));
+ s = f.GetOption(string("uniconpath"), string(DATADIR "/unicon/"));
UniconInputServer::SetDataPath(s);
#endif
string sOverSpot, sNativeBar;