aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/zhcon
diff options
context:
space:
mode:
authorvanilla <vanilla@FreeBSD.org>2002-11-28 10:25:03 +0800
committervanilla <vanilla@FreeBSD.org>2002-11-28 10:25:03 +0800
commitbb9aa265c222d9c163616b751db3312a2cefa546 (patch)
treec3b95e0efafca6165d0f5aa40a8860dc51eab305 /chinese/zhcon
parent54c3aedeb1950717aa659a0ca5fdac0a889ac564 (diff)
downloadfreebsd-ports-gnome-bb9aa265c222d9c163616b751db3312a2cefa546.tar.gz
freebsd-ports-gnome-bb9aa265c222d9c163616b751db3312a2cefa546.tar.zst
freebsd-ports-gnome-bb9aa265c222d9c163616b751db3312a2cefa546.zip
1: Upgrade to 0.2.1.
2: Fix build on -current. 3: Fix hangs on -current. PR: ports/45797 Submitted by: maintainer Approved by: kris
Diffstat (limited to 'chinese/zhcon')
-rw-r--r--chinese/zhcon/Makefile11
-rw-r--r--chinese/zhcon/distinfo2
-rw-r--r--chinese/zhcon/files/patch-configure24
-rw-r--r--chinese/zhcon/files/patch-intl::dcigettext.c15
-rw-r--r--chinese/zhcon/files/patch-src::Makefile.in34
-rw-r--r--chinese/zhcon/files/patch-src::zhcon.conf16
-rw-r--r--chinese/zhcon/files/patch-src::zhcon.cpp54
-rw-r--r--chinese/zhcon/files/patch-tools::Makefile.in20
-rw-r--r--chinese/zhcon/pkg-plist17
9 files changed, 102 insertions, 91 deletions
diff --git a/chinese/zhcon/Makefile b/chinese/zhcon/Makefile
index 0df5a24c7ae6..134e2dae8b46 100644
--- a/chinese/zhcon/Makefile
+++ b/chinese/zhcon/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= zhcon
-PORTVERSION= 0.2
-PORTREVISION= 4
+PORTVERSION= 0.2.1
CATEGORIES= chinese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -20,6 +19,8 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-included-gettext=${LOCALBASE}
USE_GMAKE= yes
USE_REINPLACE= yes
+REINPLACE_ARGS= # empty
+USE_XLIB= yes
MAN1= zhcon.1
@@ -27,7 +28,11 @@ MAN1= zhcon.1
post-patch:
.if ${OSVERSION} > 500012
- @${FIND} ${WRKSRC}/src/ -name "*.cpp" | ${XARGS} ${REINPLACE_CMD} -e 's,machine/console.h>,sys/consio.h>\n#include <sys/fbio.h>\n#include <sys/kbio.h>\n,'
+.for i in src/main.cpp src/zhcon.cpp src/inputmanager.cpp src/display/fbdev.cpp src/mouse.h
+ ${REINPLACE_CMD} 's,machine/console.h>,sys/consio.h>@#include <sys/fbio.h>@#include <sys/kbio.h>,' ${WRKSRC}/${i} | tr '@' '\n' > ${WRKSRC}/${i}.bak && \
+ ${MV} ${WRKSRC}/${i}.bak ${WRKSRC}/${i}
+.endfor
+ ${REINPLACE_CMD} -i.bak -e 's,machine/mouse.h>,sys/mouse.h>,' ${WRKSRC}/src/mouse.h
.endif
.include <bsd.port.post.mk>
diff --git a/chinese/zhcon/distinfo b/chinese/zhcon/distinfo
index b6d51a53c250..3d9eb46d7fe2 100644
--- a/chinese/zhcon/distinfo
+++ b/chinese/zhcon/distinfo
@@ -1 +1 @@
-MD5 (zhcon-0.2.tar.gz) = 67ea99f487c9c2d878238213e5162560
+MD5 (zhcon-0.2.1.tar.gz) = 3171b538b8bb5c5eb70a8229e52bd28d
diff --git a/chinese/zhcon/files/patch-configure b/chinese/zhcon/files/patch-configure
index c565a00c7be5..a637d5e41923 100644
--- a/chinese/zhcon/files/patch-configure
+++ b/chinese/zhcon/files/patch-configure
@@ -1,21 +1,11 @@
---- configure.orig Fri Feb 15 21:01:04 2002
-+++ configure Sun Feb 24 14:25:34 2002
-@@ -818,8 +818,9 @@
- CFLAGS=" -O2 -DNDEBUG -funsigned-char -Wall "
- CXXFLAGS=" -O2 -DNDEBUG -funsigned-char -Wall "
+--- configure.orig Mon Jun 10 10:29:34 2002
++++ configure Wed Nov 27 20:03:03 2002
+@@ -1671,7 +1671,7 @@
fi
--LIBS=" -L/usr/lib/unicon"
-+LIBS=" -L/usr/lib/unicon -L$ac_default_prefix/lib"
- LDFLAGS=" -Wl,-rpath=/usr/lib/unicon"
-+CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include"
+-ZHCON_LOCALE_DIR="/usr/share/locale"
++ZHCON_LOCALE_DIR="/usr/local/share/locale"
-@@ -2780,6 +2781,7 @@
-
- if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
- INTLLIBS="-lintl $LIBICONV"
-+ LIBS="-lintl $LIBS"
- fi
-
- gt_save_LIBS="$LIBS"
+ if test "$ZHCON_ARCH" = "freebsd";then
+ echo $ac_n "checking for main in -lintl""... $ac_c" 1>&6
diff --git a/chinese/zhcon/files/patch-intl::dcigettext.c b/chinese/zhcon/files/patch-intl::dcigettext.c
new file mode 100644
index 000000000000..4b9abc6b574b
--- /dev/null
+++ b/chinese/zhcon/files/patch-intl::dcigettext.c
@@ -0,0 +1,15 @@
+--- intl/dcigettext.c.orig Mon Nov 25 23:59:34 2002
++++ intl/dcigettext.c Tue Nov 26 00:19:20 2002
+@@ -57,10 +57,12 @@
+ #include <stdlib.h>
+
+ #include <string.h>
++#if 0
+ #if !HAVE_STRCHR && !defined _LIBC
+ # ifndef strchr
+ # define strchr index
+ # endif
++#endif
+ #endif
+
+ #if defined HAVE_UNISTD_H || defined _LIBC
diff --git a/chinese/zhcon/files/patch-src::Makefile.in b/chinese/zhcon/files/patch-src::Makefile.in
index 97be9114445a..e8f75bad3e38 100644
--- a/chinese/zhcon/files/patch-src::Makefile.in
+++ b/chinese/zhcon/files/patch-src::Makefile.in
@@ -1,15 +1,29 @@
---- src/Makefile.in.orig Sun Feb 17 02:15:15 2002
-+++ src/Makefile.in Sun Feb 24 14:25:35 2002
-@@ -441,10 +441,10 @@
+--- src/Makefile.in.orig Tue Jun 11 10:25:52 2002
++++ src/Makefile.in Tue Nov 26 01:37:47 2002
+@@ -81,7 +81,7 @@
+ LIB = @LIB@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
+-LIBS = @LIBS@
++LIBS = -lintl -lcurses @LIBS@ -I/usr/lib
+ LN_S = @LN_S@
+ LTLIB = @LTLIB@
+ LTLIBICONV = @LTLIBICONV@
+@@ -117,7 +117,7 @@
+ PROGRAMS = $(bin_PROGRAMS)
+
+
+-DEFS = @DEFS@ -I. -I$(srcdir) -I..
++DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I/usr/include
+ CPPFLAGS = @CPPFLAGS@
+ zhcon_OBJECTS = basefont.o big52gbdecoder.o big5decoder.o configfile.o \
+ console.o gb2big5decoder.o gbdecoder.o gbkdecoder.o graphdev.o \
+@@ -395,7 +395,7 @@
install-data-local:
- $(mkinstalldirs) $(libdir)/zhcon/
-- $(INSTALL_DATA) $(srcdir)/zhcon.conf /etc/zhcon.conf
+ $(mkinstalldirs) $(DESTDIR)/etc
+- $(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)/etc/zhcon.conf
+ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf
+ $(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf.sample
uninstall-local:
-- -rm -f /etc/zhcon.conf
-+ -rm -f $(PREFIX)/etc/zhcon.conf
-
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/chinese/zhcon/files/patch-src::zhcon.conf b/chinese/zhcon/files/patch-src::zhcon.conf
new file mode 100644
index 000000000000..e96b3980b367
--- /dev/null
+++ b/chinese/zhcon/files/patch-src::zhcon.conf
@@ -0,0 +1,16 @@
+--- src/zhcon.conf.orig Tue Nov 26 02:03:39 2002
++++ src/zhcon.conf Tue Nov 26 02:03:50 2002
+@@ -34,10 +34,10 @@
+ # FreeBSD wizard and ask him to compile a new kernel with VESA support
+ # for you and ... emmmm ... explain all these stuff to you ...
+ #
+-x_resolution = 800
+-y_resolution = 600
++x_resolution = 640
++y_resolution = 480
+ # 4 bits = 16 colors, 8 bits = 256 colors, 16 bits = 64K colors, and so on..
+-color_depth = 8
++color_depth = 4
+
+ #blanklineheight must >= 0
+ blanklineheight = 1
diff --git a/chinese/zhcon/files/patch-src::zhcon.cpp b/chinese/zhcon/files/patch-src::zhcon.cpp
index c9e255cf6e68..21df71193387 100644
--- a/chinese/zhcon/files/patch-src::zhcon.cpp
+++ b/chinese/zhcon/files/patch-src::zhcon.cpp
@@ -1,55 +1,11 @@
---- src/zhcon.cpp.orig Sun Feb 17 02:12:17 2002
-+++ src/zhcon.cpp Sun Feb 24 14:31:41 2002
-@@ -113,7 +113,7 @@
+--- src/zhcon.cpp.orig Tue Nov 26 01:35:04 2002
++++ src/zhcon.cpp Tue Nov 26 01:35:25 2002
+@@ -131,7 +131,7 @@
string cfgfile = getenv("HOME");
cfgfile += "/.zhconrc";
if (access(cfgfile.c_str(), R_OK) != 0)
- cfgfile = "/etc/zhcon.conf";
+ cfgfile = PREFIX"/etc/zhcon.conf";
- // char c;cin>>c;
- ConfigFile f(cfgfile.c_str());
-@@ -129,6 +129,7 @@
- InstallVtHandle();
- InstallSignal();
- ForkPty();
-+ SetEncode(mDefaultEncode, mDefaultEncode);
- InitInputManager(f);
- if (f.GetOption("startupmsg",true))
- StartupMsg();
-@@ -489,29 +490,30 @@
- string s;
- s = f.GetOption(string("defaultencode"), string("gb2312"));
- if (s == "gb2312") {
-- SetEncode(GB2312,GB2312);
-+ //SetEncode(GB2312,GB2312);
- setenv("LC_ALL", "zh_CN.GB2312", 1);
- mDefaultEncode = GB2312;
- } else if (s == "gbk") {
-- SetEncode(GBK,GBK);
-+ //SetEncode(GBK,GBK);
- setenv("LC_ALL", "zh_CN.GBK", 1);
- mDefaultEncode = GBK;
- } else if (s == "big5") {
-- SetEncode(BIG5,BIG5);
-+ //SetEncode(BIG5,BIG5);
- setenv("LC_ALL", "zh_TW.Big5", 1);
- mDefaultEncode = BIG5;
- } else if (s == "jis") {
-- SetEncode(JIS,JIS);
-+ //SetEncode(JIS,JIS);
- setenv("LC_ALL", "ja.JIS", 1);
- mDefaultEncode = JIS;
- } else if (s == "kscm") {
-- SetEncode(KSCM,KSCM);
-+ //SetEncode(KSCM,KSCM);
- setenv("LC_ALL", "ko", 1);
- mDefaultEncode = GBK;
- } else {
- throw runtime_error("unable to set default encode!");
- }
-
-+ setenv("LC_CTYPE", getenv("LC_ALL"), 1);
- s = f.GetOption(string("autoencode"), string("manual"));
- if (s == "auto")
- mAutoEncode = AUTO;
+ //for debug,a pause enable us to attach zhcon's pid in gdb
+ //char c;cin>>c;
diff --git a/chinese/zhcon/files/patch-tools::Makefile.in b/chinese/zhcon/files/patch-tools::Makefile.in
new file mode 100644
index 000000000000..5b6ba4c56bb3
--- /dev/null
+++ b/chinese/zhcon/files/patch-tools::Makefile.in
@@ -0,0 +1,20 @@
+--- tools/Makefile.in.orig Mon Nov 25 23:45:33 2002
++++ tools/Makefile.in Mon Nov 25 23:49:43 2002
+@@ -107,7 +107,7 @@
+ LDFLAGS =
+ CXXFLAGS =
+ CCFLAGS =
+-LIBS =
++LIBS = -lX11 -L/usr/X11R6/lib
+
+ EXTRA_DIST = README getbpsf.txt gpm-1.19.6-pty.diff gpm-1.19.6-patched.tar.gz
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+@@ -116,7 +116,7 @@
+ PROGRAMS = $(bin_PROGRAMS)
+
+
+-DEFS = @DEFS@ -I. -I$(srcdir) -I..
++DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I/usr/X11R6/include
+ CPPFLAGS = @CPPFLAGS@
+ uc2win_OBJECTS = uc2win.o
+ uc2win_LDADD = $(LDADD)
diff --git a/chinese/zhcon/pkg-plist b/chinese/zhcon/pkg-plist
index 872064ad5a29..871f6d28706d 100644
--- a/chinese/zhcon/pkg-plist
+++ b/chinese/zhcon/pkg-plist
@@ -1,5 +1,9 @@
+bin/getbpsf
+bin/uc2win
+bin/win2mb
bin/zhcon
etc/zhcon.conf
+etc/zhcon.conf.sample
lib/zhcon/font/asc12.bpsf
lib/zhcon/font/asc12x.bpsf
lib/zhcon/font/asc14.bpsf
@@ -7,7 +11,6 @@ lib/zhcon/font/asc14b.bpsf
lib/zhcon/font/asc16.bpsf
lib/zhcon/font/asc24.bpsf
lib/zhcon/font/big5-12-ming.bpsf
-lib/zhcon/font/big5-16-ming.bpsf
lib/zhcon/font/big5-16.bpsf
lib/zhcon/font/gb-16.bpsf
lib/zhcon/font/gb-24-kai.bpsf
@@ -16,7 +19,7 @@ lib/zhcon/font/hzk12.bpsf
lib/zhcon/font/hzk14.bpsf
lib/zhcon/font/hzk16.bpsf
lib/zhcon/font/jis-16.bpsf
-lib/zhcon/font/kscm-16.bpsf
+lib/zhcon/font/ksc-16.bpsf
lib/zhcon/input/big5-ary30.mb
lib/zhcon/input/big5-cj.mb
lib/zhcon/input/big5-liu5.mb
@@ -36,18 +39,10 @@ lib/zhcon/input/winpy.mb
lib/zhcon/input/winsp.mb
lib/zhcon/input/winzm.mb
share/locale/ja/LC_MESSAGES/zhcon.mo
-share/locale/kr/LC_MESSAGES/zhcon.mo
+share/locale/ko/LC_MESSAGES/zhcon.mo
share/locale/zh_CN.GB2312/LC_MESSAGES/zhcon.mo
share/locale/zh_CN.GBK/LC_MESSAGES/zhcon.mo
share/locale/zh_TW.Big5/LC_MESSAGES/zhcon.mo
-@dirrm share/locale/zh_TW.Big5/LC_MESSAGES
-@dirrm share/locale/zh_TW.Big5
-@dirrm share/locale/zh_CN.GBK/LC_MESSAGES
-@dirrm share/locale/zh_CN.GBK
-@dirrm share/locale/zh_CN.GB2312/LC_MESSAGES
-@dirrm share/locale/zh_CN.GB2312
-@dirrm share/locale/kr/LC_MESSAGES
-@dirrm share/locale/kr
@dirrm lib/zhcon/input
@dirrm lib/zhcon/font
@dirrm lib/zhcon