Compare commits

...

7 Commits
master ... fc6

Author SHA1 Message Date
Fedora Release Engineering fb31f654ea dist-git conversion 2010-07-29 16:29:42 +00:00
Bill Nottingham 8eac10d9ac Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:08:51 +00:00
Hu Zheng 757110deff to fix cvs tag error 2007-03-29 04:06:25 +00:00
Hu Zheng a19253e443 update spec files 2007-03-29 03:43:19 +00:00
Hu Zheng 2de9368690 add 64bit fix 2007-03-28 05:53:54 +00:00
Hu Zheng 6aac5ea762 add source files 2007-03-27 07:25:36 +00:00
Jens Petersen 3068cdf1ec Initialize branch FC-6 for zhcon 2007-03-26 07:27:16 +00:00
9 changed files with 342 additions and 21 deletions

View File

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
zhcon-0.2.5.tar.gz
zhcon-0.2.5-to-0.2.6.diff.gz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: zhcon
# $Id$
NAME := zhcon
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,2 @@
79e1c68aab8341e32129f61c1670baeb zhcon-0.2.5.tar.gz
971f68507f9c48a6b5cbee4ba0c1e2a6 zhcon-0.2.5-to-0.2.6.diff.gz

View File

@ -0,0 +1,51 @@
diff -r -u zhcon-0.2.5.orig/src/winime.cpp zhcon-0.2.5.new/src/winime.cpp
--- zhcon-0.2.5.orig/src/winime.cpp 2007-03-28 13:33:26.000000000 +0800
+++ zhcon-0.2.5.new/src/winime.cpp 2007-03-28 13:42:41.000000000 +0800
@@ -74,7 +74,7 @@
return false;
}
//add a word to candilist then push rp forward
-void WinIme::AddCandilist(char *&rp,unsigned int& buflen) {
+void WinIme::AddCandilist(char *&rp,unsigned long& buflen) {
assert(mpList->mCount < 10);
assert(!IsHzCode1(*rp)); //*rp is last matched latter
@@ -163,7 +163,7 @@
count--;
break;
}
- AddCandilist(t,(unsigned int&)buflen);
+ AddCandilist(t,(unsigned long&)buflen);
} //search next word
else {
if (len == 1) //special for first char
@@ -250,7 +250,7 @@
if (p == (char *) 0xffffffff)
found = false;
- p = (unsigned int) p + mpText;
+ p = (unsigned long) p + mpText;
} //2nd level index
else if (mNum == 1) {
int l = strlen(mHead.mCodeSet);
@@ -271,7 +271,7 @@
if (p == (char *) 0xffffffff)
found = false;
- p = (unsigned int) p + mpText;
+ p = (unsigned long) p + mpText;
} else if (mNum < mHead.mMaxCodes) {
p = mpOffset[mNum - 1];
if (p == (char *) 0xffffffff)
diff -r -u zhcon-0.2.5.orig/src/winime.h zhcon-0.2.5.new/src/winime.h
--- zhcon-0.2.5.orig/src/winime.h 2007-03-28 13:33:26.000000000 +0800
+++ zhcon-0.2.5.new/src/winime.h 2007-03-28 13:42:45.000000000 +0800
@@ -69,7 +69,7 @@
return c >= 0xA1 && c <= 0xFE;
}
- void AddCandilist(char*& p,unsigned& buflen);
+ void AddCandilist(char*& p,unsigned long& buflen);
void SkipNext(char*& rp);
int MatchWord(char* p, int len, int offset);
bool IsGB2312(char* p);

14
zhcon-0.2.6-flags.patch Normal file
View File

@ -0,0 +1,14 @@
--- zhcon-0.2.5/tools/Makefile.am.flags 2006-04-25 01:38:46.000000000 +0900
+++ zhcon-0.2.5/tools/Makefile.am 2007-02-16 01:54:04.000000000 +0900
@@ -9,11 +9,6 @@
#getbpsf_LDADD = -L/usr/X11R6/lib -lX11
#getbpsf_CPPFLAGS = -I/usr/X11R6/include
-LDFLAGS=
-CXXFLAGS=
-CCFLAGS=
-LIBS=
-
EXTRA_DIST = README getbpsf.txt gpm-1.19.6-pty.diff\
gpm-1.19.6-patched.tar.gz

View File

@ -0,0 +1,117 @@
--- 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[] = {
{'.', "¡£"}
--- 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;

67
zhcon-0.2.6-path.patch Normal file
View File

@ -0,0 +1,67 @@
diff -ru zhcon-0.2.5/doc/Makefile.am zhcon-0.2.6/doc/Makefile.am
--- zhcon-0.2.5/doc/Makefile.am 2006-05-03 01:57:18.000000000 +0800
+++ zhcon-0.2.6/doc/Makefile.am 2007-02-12 17:46:12.000000000 +0800
@@ -3,8 +3,8 @@
EXTRA_DIST = zhcon.1.in poem.big5 poem.gb poem.gb.utf8 bpsf.txt manual.tex manual.dvi manual.ps README.html default.css html.tar.gz
install-data-local:
- $(mkinstalldirs) $(mandir)/man1/
- $(INSTALL_DATA) $(top_builddir)/doc/zhcon.1 $(mandir)/man1/zhcon.1
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1/
+ $(INSTALL_DATA) $(top_builddir)/doc/zhcon.1 $(DESTDIR)$(mandir)/man1/zhcon.1
uninstall-local:
- -rm -f $(mandir)/man1/zhcon.1
+ -rm -f $(DESTDIR)$(mandir)/man1/zhcon.1
diff -ru zhcon-0.2.5/font/Makefile.am zhcon-0.2.6/font/Makefile.am
--- zhcon-0.2.5/font/Makefile.am 2006-04-25 00:39:04.000000000 +0800
+++ zhcon-0.2.6/font/Makefile.am 2007-02-12 17:47:32.000000000 +0800
@@ -1,8 +1,8 @@
EXTRA_DIST = *.bpsf
install-data-local:
- $(mkinstalldirs) $(libdir)/zhcon/font/
- $(INSTALL_DATA) $(srcdir)/*.bpsf $(libdir)/zhcon/font/
+ $(mkinstalldirs) $(DESTDIR)$(libdir)/zhcon/font/
+ $(INSTALL_DATA) $(srcdir)/*.bpsf $(DESTDIR)$(libdir)/zhcon/font/
uninstall-local:
- -rm -f $(libdir)/zhcon/font/*.bpsf
+ -rm -f $(DESTDIR)$(libdir)/zhcon/font/*.bpsf
diff -ru zhcon-0.2.5/input/Makefile.am zhcon-0.2.6/input/Makefile.am
--- zhcon-0.2.5/input/Makefile.am 2006-04-25 00:38:44.000000000 +0800
+++ zhcon-0.2.6/input/Makefile.am 2007-02-12 17:48:22.000000000 +0800
@@ -1,8 +1,8 @@
EXTRA_DIST = *.mb
install-data-local:
- $(mkinstalldirs) $(libdir)/zhcon/input/
- $(INSTALL_DATA) $(srcdir)/*.mb $(libdir)/zhcon/input/
+ $(mkinstalldirs) $(DESTDIR)$(libdir)/zhcon/input/
+ $(INSTALL_DATA) $(srcdir)/*.mb $(DESTDIR)$(libdir)/zhcon/input/
uninstall-local:
- -rm -f $(libdir)/zhcon/input/*.mb
+ -rm -f $(DESTDIR)$(libdir)/zhcon/input/*.mb
diff -ru zhcon-0.2.5/src/Makefile.am zhcon-0.2.6/src/Makefile.am
--- zhcon-0.2.5/src/Makefile.am 2006-05-03 01:12:41.000000000 +0800
+++ zhcon-0.2.6/src/Makefile.am 2007-02-12 17:45:59.000000000 +0800
@@ -8,14 +8,14 @@
SUBDIRS = display
install-exec-local:
- chmod 4755 $(bindir)/zhcon
+ chmod 4755 $(DESTDIR)$(bindir)/zhcon
install-data-local:
- $(mkinstalldirs) $(prefix)/etc
- $(INSTALL_DATA) $(srcdir)/zhcon.conf $(prefix)/etc/zhcon.conf
+ $(mkinstalldirs) $(DESTDIR)$(prefix)/etc
+ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)$(prefix)/etc/zhcon.conf
uninstall-local:
- -rm -f $(prefix)/etc/zhcon.conf
+ -rm -f $(DESTDIR)$(prefix)/etc/zhcon.conf
# set the include path found by configure
INCLUDES= $(all_includes)

89
zhcon.spec Normal file
View File

@ -0,0 +1,89 @@
Name: zhcon
Summary: A Fast Console CJK System Using FrameBuffer
Version: 0.2.6
Release: 5%{?dist}
Group: Applications/System
License: GPL
URL: http://www.sourceforge.net/projects/%{name}/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-0.2.5.tar.gz
Patch0: http://downloads.sourceforge.net/%{name}/%{name}-0.2.5-to-0.2.6.diff.gz
Patch1: zhcon-0.2.6-path.patch
Patch2: zhcon-0.2.6-path-define.patch
Patch3: zhcon-0.2.6-flags.patch
Patch4: zhcon-0.2.6-64bit-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Buildrequires: autoconf automake
Buildrequires: gettext-devel ncurses-devel gpm-devel
%description
Zhcon is a fast Linux Console Chinese System which supports
framebuffer device.It can display Chinese, Japanese or Korean
double byte characters.Supported language encodings include:
GB2312, GBK, BIG5, JIS and KSC.
%description -l zh_CN
zhcon是一个工作在Linux控制台下的多内码中文平台。
它能够控制台上显示简体中文、繁体中文、日文、韩文
等双字节字符。支持多种输入法。
%prep
%setup -q -n zhcon-0.2.5
%patch0 -p1 -b .0.26
%patch1 -p1 -b .instpath
%patch2 -p1 -b .path_define
%patch3 -p1 -b .flags
%patch4 -p1 -b .64bit_fix
iconv -f GB2312 -t UTF-8 ChangeLog -o ChangeLog.utf && mv -f ChangeLog.utf ChangeLog
( cd doc; tar -zxf html.tar.gz; chmod 755 manual)
%build
# exit if bootstrap fails
# missing config.rpath causes automake failure
sed -i -e 's|set -x|set -e -x|' bootstrap
touch config.rpath
./bootstrap
%configure
make %{?_smp_mflags}
%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -c -p" install
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README README.utf8 THANKS TODO doc/bpsf.txt doc/README.html
%lang(zh_CN) %doc doc/manual* doc/poem.gb doc/poem.gb.utf8
%lang(zh_TW) %doc doc/poem.big5
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%attr(4755,root,root) %{_bindir}/%{name}
%{_datadir}/%{name}/
%changelog
* Thu Mar 29 2007 Hu Zheng <zhu@redhat.com> - 0.2.6-5
- Fix x86_64 compile error.
* Tue Feb 27 2007 Hu Zheng <zhu@redhat.com> - 0.2.6-3
- Update for review.
* Thu Feb 15 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.2.6-2.1
- Add source URL
- Check if bootstrap exited with success
- Change the directory of %%{name}.conf
- Move all files in %%{_libdir} to %%{_datadir} (no libraries is
found)
- Add BR gpm-devel
- Pass optflags correctly
- Keep timestamps
* Thu Feb 15 2007 Hu Zheng <zhu@redhat.com> - 0.2.6-2
- Fix spec file.
* Mon Feb 12 2007 Hu Zheng <zhu@redhat.com> - 0.2.6-1
- Initial build for Fedora Extra