Compare commits

...

44 Commits
fc6 ... master

Author SHA1 Message Date
Fedora Release Engineering b2ded47d83 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 04:59:43 +00:00
Fedora Release Engineering 089f54e028 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 13:10:32 +00:00
Parag Nemade 6047ac6c5d
Fix FTBFS(rh#1606790) 2018-08-21 14:26:12 +05:30
Fedora Release Engineering 6925eeff76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 09:49:58 +00:00
Jason Tibbitts d3fd9c46cf Remove needless use of %defattr 2018-07-09 23:14:27 -05:00
Igor Gnatenko cc3b14a991 add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-09 19:06:54 +02:00
Igor Gnatenko 3563d0fb2d
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 09:08:05 +01:00
Igor Gnatenko 6bdbb2bcf5 Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 00:52:58 +01:00
Fedora Release Engineering cc8e2954b3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 22:27:21 +00:00
Fedora Release Engineering 02f05d9c5e - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 11:10:53 +00:00
Fedora Release Engineering 8c223d2dbd - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 22:42:36 +00:00
Fedora Release Engineering 64b3149418 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 18:24:09 +00:00
Fedora Release Engineering c787aa6953 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 04:06:16 +00:00
Dennis Gilmore 4cee9c8548 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 04:46:58 +00:00
Kalev Lember 5ae0e7e391 Rebuilt for GCC 5 C++11 ABI change 2015-05-02 18:52:39 +02:00
Peter Robinson d0fb156f4b - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 11:38:23 +00:00
Dennis Gilmore b695a9d37b - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 13:09:03 -05:00
Dennis Gilmore 172c0df536 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 04:51:20 -05:00
Ding-Yi Chen 64b14e54b8 Resolves: Bug 965518 - zhcon package should be built with PIE flags 2013-05-22 13:26:23 +10:00
Ding-Yi Chen 2988ec7fd0 Resolves Bug 926861 2013-04-15 14:11:39 +10:00
Dennis Gilmore e4668f3c61 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 22:19:49 -06:00
Dennis Gilmore d8d409e84d - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-22 03:15:59 -05:00
Dennis Gilmore e5396a0d9d - Rebuilt for c++ ABI breakage 2012-02-28 14:42:27 -06:00
Dennis Gilmore 51c950cb78 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-14 03:36:26 -06:00
Dennis Gilmore bd673afea5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-08 02:51:07 -06:00
Ding-Yi Chen 6767688990 - Applied Debian's zhcon_0.2.6-6-1.diff.gz patch.
- Remove input/big5-liu5.mb, as it may cause license issue.
2010-11-19 15:31:48 +10:00
Fedora Release Engineering ff5a8c80a5 dist-git conversion 2010-07-29 16:29:39 +00:00
Ding-Yi Chen f5ffb03665 Fixed Bug 539125 - FTBFS 2010-01-04 23:35:33 +00:00
Ding-Yi Chen 19ba2968bc Fixed Bug 539125 - FTBFS zhcon-0.2.6-14 2010-01-04 05:54:42 +00:00
Bill Nottingham 34676333b5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:39:19 +00:00
Jesse Keating 4a9d1d1504 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-27 09:01:33 +00:00
Jesse Keating 5cdfdf4ab5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 18:38:58 +00:00
Ding-Yi Chen abb3f97a8b Apply Debian patch 2008-11-25 03:51:39 +00:00
Ding-Yi Chen 85cac5eebd Apply Debian patch 2008-11-25 02:14:18 +00:00
Caolan McNamara c17efec8a4 add zhcon-0.2.6-processor-flags.patch to build on rawhide 2008-07-29 09:53:27 +00:00
Ding-Yi Chen ecece1837f Fedora<=8 dependency 2008-07-28 05:25:56 +00:00
Ding-Yi Chen 7809dc7f13 Fix Bug 441203,449625,454228 2008-07-15 04:31:25 +00:00
Hu Zheng e713dac411 i386 build fix 2008-03-03 06:13:52 +00:00
Hu Zheng d40c236830 gcc-4.3 compile fix 2008-02-26 09:13:06 +00:00
Jesse Keating e669245c33 - Autorebuild for GCC 4.3 2008-02-20 08:43:57 +00:00
Hu Zheng e43c1e1a23 to fix cvs tag error 2007-03-29 04:06:29 +00:00
Hu Zheng 30dd2cca7b update spec files 2007-03-29 03:43:22 +00:00
Hu Zheng 0d89ac85cd add 64bit fix 2007-03-28 05:53:57 +00:00
Hu Zheng a5d2356436 add source files 2007-03-27 07:25:40 +00:00
11 changed files with 820 additions and 21 deletions

View File

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
zhcon_0.2.6-6.diff.gz
zhcon_0.2.6.orig.tar.gz
/zhcon_0.2.6-6.1.diff.gz
/zhcon_0.2.6.orig.tar.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 @@
3d60dc62f734d32b909c6ef631729bbe zhcon_0.2.6-6.1.diff.gz
0f765cbe444776c9051a2b7c213737eb zhcon_0.2.6.orig.tar.gz

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

@ -0,0 +1,14 @@
--- zhcon-0.2.6/tools/Makefile.am.flags 2006-04-25 01:38:46.000000000 +0900
+++ zhcon-0.2.6/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

288
zhcon-0.2.6-gcc43.patch Normal file
View File

@ -0,0 +1,288 @@
diff -up ./src/basefont.cpp.gcc43 ./src/basefont.cpp
--- ./src/basefont.cpp.gcc43 2006-04-25 02:38:27.000000000 +1000
+++ ./src/basefont.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -24,6 +24,7 @@
#include <sys/stat.h>
#include <stdexcept>
#include <cassert>
+#include <string.h>
#include "global.h"
#include "debug.h"
#include "hzdecoder.h"
diff -up ./src/big5decoder.cpp.gcc43 ./src/big5decoder.cpp
--- ./src/big5decoder.cpp.gcc43 2006-04-25 02:38:25.000000000 +1000
+++ ./src/big5decoder.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -27,7 +27,8 @@ bool BIG5Decoder::IsCode1(char c) {
}
bool BIG5Decoder::IsCode2(char c) {
- return c >= 40 && c <= 0xff;
+// return c >= 40 && c <= 0xff;
+ return c>=40;
}
unsigned int BIG5Decoder::Index(char c1, char c2) {
diff -up ./src/display/fblinear16.cpp.gcc43 ./src/display/fblinear16.cpp
--- ./src/display/fblinear16.cpp.gcc43 2006-04-25 02:38:24.000000000 +1000
+++ ./src/display/fblinear16.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -86,7 +86,8 @@ void FBLinear16::RevRect(int x1,int y1,i
for(; height--; dest += mNextLine) {
dest32 = (__u32*)dest;
for (cnt = width/2; cnt--;) {
- fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
+ fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32);
+ dest32++;
}
if (width & 1) {
dest16 = (__u16*)dest32;
diff -up ./src/display/fblinear24.cpp.gcc43 ./src/display/fblinear24.cpp
--- ./src/display/fblinear24.cpp.gcc43 2006-04-25 02:38:23.000000000 +1000
+++ ./src/display/fblinear24.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -136,19 +136,25 @@ void FBLinear24::RevRect(int x1,int y1,i
for(; height--; dest += mNextLine) {
dest32 = (__u32*)dest;
for (cnt = width/4; cnt--;) {
- fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
- fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
- fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
+ fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32);
+ dest32++;
+ fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32);
+ dest32++;
+ fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32);
+ dest32++;
}
if (width & 2) {
- fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
+ fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32);
+ dest32++;
dest16 = (__u16*)dest32;
- fb_writew(fb_readw(dest16) ^ 0xffff, dest16++);
+ fb_writew(fb_readw(dest16) ^ 0xffff, dest16);
+ dest16++;
dest32 = (__u32*)dest16;
}
if (width & 1) {
dest16 = (__u16*)dest32;
- fb_writew(fb_readw(dest16) ^ 0xffff, dest16++);
+ fb_writew(fb_readw(dest16) ^ 0xffff, dest16);
+ dest16++;
dest8 = (__u8*)dest16;
fb_writeb(fb_readb(dest8) ^ 0xff, dest8);
}
diff -up ./src/display/fblinear32.cpp.gcc43 ./src/display/fblinear32.cpp
--- ./src/display/fblinear32.cpp.gcc43 2006-04-25 02:38:23.000000000 +1000
+++ ./src/display/fblinear32.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -74,7 +74,8 @@ void FBLinear32::RevRect(int x1,int y1,i
for(; height--; dest += mNextLine) {
dest32 = (__u32*)dest;
for (cnt = width; cnt--;) {
- fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32++);
+ fb_writel(fb_readl(dest32) ^ 0xffffffff, dest32);
+ dest32++;
}
}
}
diff -up ./src/display/fblinear4.cpp.gcc43 ./src/display/fblinear4.cpp
--- ./src/display/fblinear4.cpp.gcc43 2006-04-25 02:38:23.000000000 +1000
+++ ./src/display/fblinear4.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -19,6 +19,7 @@
#include <assert.h>
#include <endian.h>
+#include <string.h>
#include "global.h"
#include "fblinear4.h"
diff -up ./src/display/fblinear8.cpp.gcc43 ./src/display/fblinear8.cpp
--- ./src/display/fblinear8.cpp.gcc43 2006-04-25 02:38:23.000000000 +1000
+++ ./src/display/fblinear8.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -19,6 +19,7 @@
#include <assert.h>
#include <endian.h>
+#include <string.h>
#include "global.h"
#include "fblinear8.h"
@@ -63,11 +64,13 @@ void FBLinear8::RevRect(int x1,int y1,in
for(; height--; dest += mNextLine) {
dest32 = (__u32*)dest;
for (cnt = width/4; cnt--;) {
- fb_writel(fb_readl(dest32) ^ 0x0f0f0f0f, dest32++);
+ fb_writel(fb_readl(dest32) ^ 0x0f0f0f0f, dest32);
+ dest32++;
}
if (width & 2) {
dest16 = (__u16*)dest32;
- fb_writew(fb_readw(dest16) ^ 0x0f0f, dest16++);
+ fb_writew(fb_readw(dest16) ^ 0x0f0f, dest16);
+ dest16++;
dest32 = (__u32*)dest16;
}
if (width & 1) {
diff -up ./src/display/fbvgaplanes.cpp.gcc43 ./src/display/fbvgaplanes.cpp
--- ./src/display/fbvgaplanes.cpp.gcc43 2006-04-25 02:38:23.000000000 +1000
+++ ./src/display/fbvgaplanes.cpp 2008-07-15 12:53:18.000000000 +1000
@@ -22,6 +22,7 @@
#ifdef USING_VGA
#include <assert.h>
#include <unistd.h>
+#include <string.h>
#include "debug.h"
#include "fbvgaplanes.h"
diff -up ./src/encfilter.c.gcc43 ./src/encfilter.c
--- ./src/encfilter.c.gcc43 2006-04-29 05:09:33.000000000 +1000
+++ ./src/encfilter.c 2008-07-15 12:31:16.000000000 +1000
@@ -37,6 +37,7 @@
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
+#include <string.h>
#include "encfilter.h"
@@ -46,7 +47,9 @@
#error ICONV_CONST not defined
#endif /* ICONV_CONST */
-#define BUFSIZ 8192
+#ifndef BUFSIZ
+# define BUFSIZ 8192
+#endif
int UseEncodingFilter; /* use filter such as UTF-8 */
char EncodingFilterBuff[BUFSIZ]; /* global buffer used by ConsoleHandler() and TextCopy() */
size_t EncodingFilterLen;
diff -up ./src/gbkdecoder.cpp.gcc43 ./src/gbkdecoder.cpp
--- ./src/gbkdecoder.cpp.gcc43 2006-04-25 02:38:27.000000000 +1000
+++ ./src/gbkdecoder.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -27,13 +27,15 @@ bool GBKDecoder::IsCode1(char c) {
}
bool GBKDecoder::IsCode2(char c) {
- return c >= 0x40 && c <= 0xff;
+// return c >= 0x40 && c <= 0xff;
+ return c>=0x40;
}
unsigned int GBKDecoder::Index(char c1, char c2) {
int n;
n = (c1 - 0x81) * 192;
- if (c2 <= 0xff && c2 >= 0x40)
+ // if (c2 <= 0xff && c2 >= 0x40)
+ if (c2 >= 0x40)
n += (c2 - 0x40);
return n;
}
diff -up ./src/iconv_string.c.gcc43 ./src/iconv_string.c
--- ./src/iconv_string.c.gcc43 2006-04-25 02:38:27.000000000 +1000
+++ ./src/iconv_string.c 2008-07-15 12:31:16.000000000 +1000
@@ -69,7 +69,7 @@ int iconv_string (const char* tocode, co
{
size_t count = 0;
char tmpbuf[tmpbufsize];
- const char* inptr = start;
+ char* inptr = (char *) start;
size_t insize = end-start;
while (insize > 0) {
char* outptr = tmpbuf;
@@ -121,7 +121,7 @@ int iconv_string (const char* tocode, co
iconv(cd,NULL,NULL,NULL,NULL); /* return to the initial state */
/* Do the conversion for real. */
{
- const char* inptr = start;
+ char* inptr = (char *) start;
size_t insize = end-start;
char* outptr = result;
size_t outsize = length;
diff -up src/inputmanager.h.gcc43 src/inputmanager.h
--- src/inputmanager.h.gcc43 2008-11-21 17:18:50.000000000 +1000
+++ src/inputmanager.h 2008-11-21 17:20:28.000000000 +1000
@@ -27,6 +27,7 @@ using namespace std;
#include <cassert>
#include <vector>
#include <sys/types.h>
+#include <sys/select.h>
#include "mouse.h"
#if defined(__FreeBSD__)
--- ./src/nativeinputserver.h.gcc43 2006-04-25 02:38:26.000000000 +1000
+++ ./src/nativeinputserver.h 2008-07-15 12:31:16.000000000 +1000
@@ -62,7 +62,7 @@ class NativeInputServer : public InputSe
bool mAutoSelectUnique;
static struct Symbol {
char mKey;
- char *mpSymbol;
+ const char *mpSymbol;
}
mFullSymbolTable[];
static char mFullCharTable[];
--- ./src/window.cpp.gcc43 2006-04-25 02:38:25.000000000 +1000
+++ ./src/window.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -20,6 +20,8 @@
#include <algorithm>
#include <sys/time.h>
#include <algorithm>
+#include <stdlib.h>
+#include <string.h>
#include "global.h"
#include "debug.h"
#include "window.h"
--- ./src/winime.cpp.gcc43 2008-07-15 12:31:15.000000000 +1000
+++ ./src/winime.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -47,7 +47,7 @@ mCandilistBufLen(0)
throw (runtime_error("can not get gbfont size!"));
mBufSize = st.st_size;
- mpBuf = (char *) mmap(0, mBufSize, PROT_READ, MAP_SHARED, mFd, 0);
+ mpBuf = (char *) mmap(NULL, mBufSize, PROT_READ, MAP_SHARED, mFd, 0);
if (mpBuf == MAP_FAILED)
throw (runtime_error("mmap failed!"));
@@ -163,7 +163,8 @@ int WinIme::MatchWord(char *p, int len,
count--;
break;
}
- AddCandilist(t,(unsigned int&)buflen);
+ unsigned int buflength=buflen;
+ AddCandilist(t,(unsigned int&)buflength);
} //search next word
else {
if (len == 1) //special for first char
--- ./src/zhcon.cpp.gcc43 2008-07-15 12:31:15.000000000 +1000
+++ ./src/zhcon.cpp 2008-07-15 12:31:16.000000000 +1000
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <cstdlib>
#include <cstdio>
+#include <string.h>
#include <sys/ioctl.h>
#if defined(linux)
@@ -452,9 +457,11 @@ void Zhcon::InitTty() {
return;
}
char *pCap = mCapBuf;
- mpCapClearScr = tgetstr("cl", &pCap);
- mpCapCursorOff = tgetstr("vi", &pCap);
- mpCapCursorOn = tgetstr("ve", &pCap);
+ char ids[][3]={"cl","vi","ve"};
+
+ mpCapClearScr = tgetstr(ids[0], &pCap);
+ mpCapCursorOff = tgetstr(ids[1], &pCap);
+ mpCapCursorOn = tgetstr(ids[2], &pCap);
if (mpCapClearScr) write(mConFd, mpCapClearScr, strlen(mpCapClearScr));
if (mpCapCursorOff) write(mConFd, mpCapCursorOff, strlen(mpCapCursorOff));
--- src/display/vgadev.cpp.gcc43 2008-07-15 14:10:33.000000000 +1000
+++ src/display/vgadev.cpp 2008-07-15 14:10:57.000000000 +1000
@@ -33,6 +33,7 @@
#include <sys/mman.h>
#include <sys/io.h>
#include <cassert>
+#include <string.h>
#include "debug.h"
#include "vgadev.h"
#include "lrmi.h"

View File

@ -0,0 +1,49 @@
--- ./src/zhcon.cpp.keyswitch 2008-07-14 16:17:53.000000000 +1000
+++ ./src/zhcon.cpp 2008-07-14 16:20:16.000000000 +1000
@@ -132,6 +132,10 @@
//the InitXXX sequence is important,do not change
//unless you know what you are doing
InitTty();
+
+ /* Set to K_XLATE (ascii) */
+ ioctl(0, KDSKBMODE, K_XLATE);
+
// set blank line height, must before init font
InitGraphDev(f);
GraphMode();
--- ./src/inputmanager.cpp.keyswitch 2008-07-14 16:14:10.000000000 +1000
+++ ./src/inputmanager.cpp 2008-07-14 16:23:45.000000000 +1000
@@ -101,9 +101,12 @@
struct timeval tv;
int rcved, shift;
+ bool ctrlShiftPressed=false;
shift = GetShiftState();
- if (shift != 0) {
+ if (shift ==5){
+ /* Ctrl-Shift Pressed */
+ ctrlShiftPressed=true;
//printf("Shift stat %d\r\n", s);
}
@@ -120,7 +123,7 @@
tv.tv_sec = 0;
tv.tv_usec = 100000; /* 0.1 sec */
rcved = select(FD_SETSIZE, &mFdSet, NULL, NULL, &tv);
- if (rcved <= 0)
+ if (rcved <= 0 && !ctrlShiftPressed)
return;
#ifdef HAVE_GPM_H
@@ -154,7 +157,9 @@
mOutputRead = 0;
}
}
- }
+ }else if (ctrlShiftPressed){
+ DoCtrlShift();
+ }
if (FD_ISSET(mTtyFd, &mFdSet)) {
mInputRead += read(mTtyFd, mInputBuf+mInputRead, BUFSIZE-mInputRead);

69
zhcon-0.2.6-locale.patch Normal file
View File

@ -0,0 +1,69 @@
--- ./src/zhcon.h.locale 2008-07-14 11:14:23.000000000 +1000
+++ ./src/zhcon.h 2008-07-14 11:08:09.000000000 +1000
@@ -27,6 +27,10 @@
#include <string>
#include "global.h"
#include "cmdline.h"
+#define LOCALE_STR_UTF8 "utf8"
+#define LOCALE_STR_GB2312 "gb2312"
+#define LOCALE_STR_GBK "gbk"
+#define LOCALE_STR_BIG5 "big5"
using namespace std;
--- ./src/zhcon.cpp.locale 2008-07-14 11:21:29.000000000 +1000
+++ ./src/zhcon.cpp 2008-07-14 11:37:28.000000000 +1000
@@ -485,13 +485,13 @@
f = new BaseFont(mGB2312Font, 16, 16);
h = new GBDecoder();
}
- locale = "zh_CN.GB2312";
+ locale = "zh_CN." LOCALE_STR_GB2312;
break;
case GBK:
assert(font == GBK);
f = new BaseFont(mGBKFont, 16, 16);
h = new GBKDecoder();
- locale = "zh_CN.GBK";
+ locale = "zh_CN." LOCALE_STR_GBK;
break;
case BIG5:
assert(font == GB2312 || font == BIG5);
@@ -502,7 +502,7 @@
f = new BaseFont(mBIG5Font, 16, 16);
h = new BIG5Decoder();
}
- locale = "zh_TW.Big5";
+ locale = "zh_TW." LOCALE_STR_BIG5;
break;
case JIS:
assert(font == e);
@@ -647,22 +647,22 @@
setenv("LC_ALL", "zh_CN.EUC", 1);
#else
if (mArgs.utf8_flag)
- setenv("LC_ALL", "zh_CN.UTF-8", 1);
+ setenv("LC_ALL", "zh_CN." LOCALE_STR_UTF8, 1);
else
- setenv("LC_ALL", "zh_CN.GB2312", 1);
+ setenv("LC_ALL", "zh_CN." LOCALE_STR_GB2312, 1);
#endif
mDefaultEncode = GB2312;
} else if (s == "gbk") {
if (mArgs.utf8_flag)
- setenv("LC_ALL", "zh_CN.UTF-8", 1);
+ setenv("LC_ALL", "zh_CN." LOCALE_STR_UTF8, 1);
else
- setenv("LC_ALL", "zh_CN.GBK", 1);
+ setenv("LC_ALL", "zh_CN." LOCALE_STR_GBK, 1);
mDefaultEncode = GBK;
} else if (s == "big5") {
if (mArgs.utf8_flag)
- setenv("LC_ALL", "zh_TW.UTF-8", 1);
+ setenv("LC_ALL", "zh_TW." LOCALE_STR_UTF8, 1);
else
- setenv("LC_ALL", "zh_TW.Big5", 1);
+ setenv("LC_ALL", "zh_TW." LOCALE_STR_BIG5, 1);
mDefaultEncode = BIG5;
} else if (s == "jis") {
//SetEncode(JIS,JIS);

View File

@ -0,0 +1,150 @@
--- ./doc/Makefile.am.path-define 2006-05-03 03:57:18.000000000 +1000
+++ ./doc/Makefile.am 2008-07-15 10:48:01.000000000 +1000
@@ -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
--- ./configure.in.path-define 2006-07-06 04:20:09.000000000 +1000
+++ ./configure.in 2008-07-15 10:48:01.000000000 +1000
@@ -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!
--- ./font/Makefile.am.path-define 2006-04-25 02:39:04.000000000 +1000
+++ ./font/Makefile.am 2008-07-15 10:48:01.000000000 +1000
@@ -1,8 +1,8 @@
EXTRA_DIST = *.bpsf
install-data-local:
- $(mkinstalldirs) $(libdir)/zhcon/font/
- $(INSTALL_DATA) $(srcdir)/*.bpsf $(libdir)/zhcon/font/
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/zhcon/font/
+ $(INSTALL_DATA) $(srcdir)/*.bpsf $(DESTDIR)$(datadir)/zhcon/font/
uninstall-local:
- -rm -f $(libdir)/zhcon/font/*.bpsf
+ -rm -f $(DESTDIR)$(datadir)/zhcon/font/*.bpsf
--- ./input/Makefile.am.path-define 2006-04-25 02:38:44.000000000 +1000
+++ ./input/Makefile.am 2008-07-15 10:48:01.000000000 +1000
@@ -1,8 +1,8 @@
EXTRA_DIST = *.mb
install-data-local:
- $(mkinstalldirs) $(libdir)/zhcon/input/
- $(INSTALL_DATA) $(srcdir)/*.mb $(libdir)/zhcon/input/
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/zhcon/input/
+ $(INSTALL_DATA) $(srcdir)/*.mb $(DESTDIR)$(datadir)/zhcon/input/
uninstall-local:
- -rm -f $(libdir)/zhcon/input/*.mb
+ -rm -f $(DESTDIR)$(datadir)/zhcon/input/*.mb
--- ./src/zhcon.conf.path-define 2008-07-15 11:15:09.000000000 +1000
+++ ./src/zhcon.conf 2008-07-15 11:16:36.000000000 +1000
@@ -2,10 +2,10 @@
#it can be named as ~/.zhconrc or /etc/zhcon.conf
#you can edit it manually
-zhconpath = /usr/lib/zhcon/
+zhconpath = /usr/share/zhcon/
#unicon(3.x) path
-uniconpath = /usr/lib/unicon/
+uniconpath = /usr/share/unicon/
#defaultencode: default encoding can be :gb2312,gbk,big5,jis,ksc
defaultencode = gb2312
--- ./src/zhcon.cpp.path-define 2008-07-15 10:48:01.000000000 +1000
+++ ./src/zhcon.cpp 2008-07-15 10:49:15.000000000 +1000
@@ -123,7 +124,7 @@
string cfgfile = getenv("HOME");
cfgfile += "/.zhconrc";
if (access(cfgfile.c_str(), R_OK) != 0)
- cfgfile = "/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 +628,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 +759,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;
--- ./src/nativeinputserver.cpp.path-define 2006-04-25 02:38:27.000000000 +1000
+++ ./src/nativeinputserver.cpp 2008-07-15 10:48:01.000000000 +1000
@@ -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[] = {
{'.', "¡£"}
--- ./src/Makefile.am.path-define 2006-05-03 03:12:41.000000000 +1000
+++ ./src/Makefile.am 2008-07-15 10:48:01.000000000 +1000
@@ -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)$(sysconfdir)
+ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)$(sysconfdir)/zhcon.conf
uninstall-local:
- -rm -f $(prefix)/etc/zhcon.conf
+ -rm -f $(DESTDIR)$(sysconfdir)/zhcon.conf
# set the include path found by configure
INCLUDES= $(all_includes)

View File

@ -0,0 +1,37 @@
diff -up ./src/display/lrmi.c.xf86int10 ./src/display/lrmi.c
--- ./src/display/lrmi.c.xf86int10 2006-04-25 02:38:23.000000000 +1000
+++ ./src/display/lrmi.c 2008-11-24 17:01:19.000000000 +1000
@@ -13,6 +13,15 @@ This software has NO WARRANTY. Use it a
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#define X86_TF_MASK 0x00000100
+#define X86_IF_MASK 0x00000200
+#define X86_IOPL_MASK 0x00003000
+#define X86_NT_MASK 0x00004000
+#define X86_VM_MASK 0x00020000
+#define X86_AC_MASK 0x00040000
+#define X86_VIF_MASK 0x00080000 /* virtual interrupt flag */
+#define X86_VIP_MASK 0x00100000 /* virtual interrupt pending */
+#define X86_ID_MASK 0x00200000
#ifdef USING_VGA
#if defined(linux)
@@ -176,7 +185,7 @@ LRMI_free_real(void *m)
}
-#define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+#define DEFAULT_VM86_FLAGS (X86_IF_MASK | X86_IOPL_MASK)
#define DEFAULT_STACK_SIZE 0x1000
#define RETURN_TO_32_INT 255
@@ -790,7 +799,7 @@ run_vm86(void)
context.vm.regs.cs = get_int_seg(v);
context.vm.regs.eip = get_int_off(v);
- context.vm.regs.eflags &= ~(VIF_MASK | TF_MASK);
+ context.vm.regs.eflags &= ~(X86_VIF_MASK | X86_TF_MASK);
continue;
}

207
zhcon.spec Normal file
View File

@ -0,0 +1,207 @@
Name: zhcon
Version: 0.2.6
Release: 37%{?dist}
License: GPLv2+
URL: http://zhcon.sourceforge.net/
Source0: http://ftp.debian.org/debian/pool/main/z/zhcon/%{name}_%{version}.orig.tar.gz
Patch0: http://ftp.debian.org/debian/pool/main/z/zhcon/%{name}_%{version}-6.1.diff.gz
Patch1: %{name}-%{version}-flags.patch
Patch2: %{name}-%{version}-path-define.patch
Patch3: %{name}-%{version}-gcc43.patch
Patch4: %{name}-%{version}-locale.patch
Patch5: %{name}-%{version}-keyswitch.patch
Patch6: %{name}-%{version}-xf86int10.patch
Summary: A fast Linux Console Chinese System that supports framebuffer
Summary(zh_CN): Zhcon 是一个支持 Framebuffer Linux 中日韩文控制台
Summary(zh_TW): Zhcon 是一個支援 Framebuffer 及多內碼 Linux 中日韓文主控台
%if 0%{?fedora} >= 9
%define ncurse_libs_postfix -libs
%endif
BuildRequires: gcc-c++
BuildRequires: autoconf automake
BuildRequires: gettext-devel ncurses-devel gpm-devel
Requires: gpm ncurses%{!?ncurse_libs_postfix: }
%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:
UTF8, GB2312, GBK, BIG5, JIS and KSC.
%description -l zh_CN
zhcon 是一个支持 Framebuffer Linux 中日韩文控制台。
它能够控制台上显示简体中文、繁体中文、日文、韩文
等双字节字符。支持多种输入法。
现支持的有: UTF8, GB2312, GBK, BIG5, JIS KSC。
%description -l zh_TW
zhcon 是一個支援 Framebuffer 與多内碼的 Linux 中日韓文主控台。
它能够在控制台上顯示簡體中文、繁體中文、日文、韓文
等雙位元組字元。支援多种输入法。
現支援的內碼有: UTF8, GB2312, GBK, BIG5, JIS KSC。
%prep
%setup -q
%patch0 -p1 -b .6-diff
%patch1 -p1 -b .flags
%patch2 -p0 -b .path-define
%patch3 -p0 -b .gcc43
%patch4 -p0 -b .locale
%patch5 -p0 -b .keyswitch
%patch6 -p0 -b .xf86int10
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)
# liu5 is a non-free input method
rm -f input/big5-liu5.mb
%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
autoreconf -ivf
%global _hardened_build 1
%configure
make %{?_smp_mflags}
%install
make DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -c -p" install
%files
%doc AUTHORS ChangeLog README README.utf8 THANKS TODO doc/bpsf.txt doc/README.html
%license COPYING
%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
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Aug 21 2018 Parag Nemade <pnemade AT fedoraproject.org> - 0.2.6-35
- Fix FTBFS(rh#1606790)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.2.6-27
- Rebuilt for GCC 5 C++11 ABI change
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed May 22 2013 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-23
- Resolves: Bug 965518 - zhcon package should be built with PIE flags
* Mon Apr 15 2013 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-22
- Resolves: Bug 926861 - zhcon: Does not support aarch64 in f19 and rawhide
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-19
- Rebuilt for c++ ABI breakage
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Nov 19 2010 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-16
- Applied Debian's zhcon_0.2.6-6-1.diff.gz patch.
- Remove input/big5-liu5.mb, as it may cause license issue.
* Mon Jan 04 2010 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-15
- Applied Debian's zhcon_0.2.6-6.diff.gz patch.
- Fixed Bug 539125 - FTBFS zhcon-0.2.6-14.fc12
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Nov 25 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-12
- Debian provide patch of zhcon_0.2.6-5.2.diff.gz
* Tue Jul 15 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-10
- Address the dependence in RHEL5 and Fedora <= 8 which do not have ncurses-libs.
- Add gpm as Required
* Tue Jul 15 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.2.6-9
- [Bug 454228] [zhcon] Cannot start input method for x86_64 user
- [Bug 449625] FTBFS zhcon-0.2.6-8.fc9
- [Bug 441203] [zhcon] The input methods other than the default one were not changable for use
* Mon Mar 03 2008 Hu Zheng <zhu@redhat.com> - 0.2.6-8
- i386 build fix.
* Tue Feb 26 2008 Hu Zheng <zhu@redhat.com> - 0.2.6-7
- Gcc-4.3 compile fix.
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.2.6-6
- Autorebuild for GCC 4.3
* 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