aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2012-02-28 15:38:41 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2012-02-28 15:38:41 +0000
commitc2034ae9a18da136b1ecd464709ad90bbb65fef4 (patch)
tree037af0f95ca1a0795addbb6e0ee024b9c0599e2b
parent884ff371e95a6b9844770f50d058626e53fbe3a7 (diff)
downloadports-c2034ae9a18da136b1ecd464709ad90bbb65fef4.tar.gz
ports-c2034ae9a18da136b1ecd464709ad90bbb65fef4.zip
Notes
-rw-r--r--chinese/zhcon/Makefile54
-rw-r--r--chinese/zhcon/distinfo6
-rw-r--r--chinese/zhcon/files/patch-doc-zhcon.1.in166
-rw-r--r--chinese/zhcon/files/patch-src-global.h11
-rw-r--r--chinese/zhcon/files/patch-src-mouse.cpp10
5 files changed, 208 insertions, 39 deletions
diff --git a/chinese/zhcon/Makefile b/chinese/zhcon/Makefile
index eff4404600f2..6bec8a322a09 100644
--- a/chinese/zhcon/Makefile
+++ b/chinese/zhcon/Makefile
@@ -1,6 +1,6 @@
-# Ports collection makefile for: zhcon
-# Date created: Sun Sep 9, 2001
-# Whom: statue@freebsd.sinica.edu.tw
+# New ports collection makefile for: Zhcon
+# Date created: Sun Sep 9, 2001
+# Whom: Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
#
# $FreeBSD$
#
@@ -9,12 +9,17 @@ PORTNAME= zhcon
PORTVERSION= 0.2.6
PORTREVISION= 2
CATEGORIES= chinese
-MASTER_SITES= LOCAL/chinsan/chinese
+MASTER_SITES= SF
+DISTNAME= ${PORTNAME}-0.2.5
+
+PATCH_SITES= ${MASTER_SITES}
+PATCHFILES= ${DISTNAME}-to-${PORTVERSION}.diff.gz
+PATCH_DIST_STRIP= -p1
MAINTAINER= ports@FreeBSD.org
-COMMENT= A fast Console Chinese System which supports framebuffer device
+COMMENT= A fast CJK (Chinese/Japanese/Korean) virtual console
-PORTSCOUT= limit:^0\.2.[0-9]*
+LICENSE= GPLv2
GNU_CONFIGURE= yes
ONLY_FOR_ARCHS= i386
@@ -25,24 +30,41 @@ CONFIGURE_ARGS= --with-libintl-prefix=${LOCALBASE}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-message
MAN1= zhcon.1
+PORTDOCS= *
+
+OPTIONS= BIG5 "Use Big5 by default (Taiwan, Hong Kong, Macau)" off
+
+.include <bsd.port.options.mk>
post-patch:
- @${REINPLACE_CMD} -e 's,/etc,${PREFIX}/etc,' ${WRKSRC}/doc/zhcon.1.in
- @${REINPLACE_CMD} -Ee 's,/dev/vga,/dev/ttyv0,g' ${WRKSRC}/src/display/fbdev.cpp
- @${REINPLACE_CMD} -Ee 's,endian,sys/endian,g' ${WRKSRC}/src/display/fblinear4.cpp \
- ${WRKSRC}/src/display/fblinear8.cpp ${WRKSRC}/src/display/fblinear16.cpp \
- ${WRKSRC}/src/display/fblinear24.cpp
- @${REINPLACE_CMD} -e '5 s,#,,; s,/usr/lib,${PREFIX}/lib,' ${WRKSRC}/src/zhcon.conf
- @${REINPLACE_CMD} -Ee 's,(\s*=\s*)("?)/usr/local([^"]*)("?),\1\2${PREFIX}\3\4,g' \
- -e '/_nl_expand_alias/s,\(0\),\(\),g' ${WRKSRC}/${CONFIGURE_SCRIPT}
+ @${REINPLACE_CMD} -e 's,/etc,${PREFIX}&, ; s,doc/,${DOCSDIR},' \
+ ${WRKSRC}/doc/zhcon.1.in
+ @${REINPLACE_CMD} -e 's,/dev/vga,/dev/ttyv0,' \
+ ${WRKSRC}/src/display/fbdev.cpp
+ @${REINPLACE_CMD} -e 's,endian,sys/endian,' \
+ ${WRKSRC}/src/display/fblinear*.cpp
+ @${REINPLACE_CMD} -e '/zhconpath/s,#,, ; s,/usr/lib,${PREFIX}/lib,' \
+ ${WRKSRC}/src/zhcon.conf
+ @${REINPLACE_CMD} -e 's,$$enable_debug = ,x&x,' \
+ ${WRKSRC}/configure
.if defined(WITH_BIG5)
- @${REINPLACE_CMD} -e '11 s,gb2312,big5,' ${WRKSRC}/src/zhcon.conf
+ @${REINPLACE_CMD} -e '/defaultencode =/s,gb2312,big5,' \
+ ${WRKSRC}/src/zhcon.conf
.endif
post-install:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.html ${WRKSRC}/doc/bpsf.txt \
+ ${WRKSRC}/doc/poem.* ${WRKSRC}/ChangeLog ${WRKSRC}/NEWS \
+ ${WRKSRC}/README ${WRKSRC}/README.utf8 ${WRKSRC}/THANKS \
+ ${WRKSRC}/TODO ${DOCSDIR}
+ ${TAR} xf ${WRKSRC}/doc/html.tar.gz -C ${DOCSDIR}
+.endif
+ @${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
.include <bsd.port.mk>
diff --git a/chinese/zhcon/distinfo b/chinese/zhcon/distinfo
index aadc705350bc..b799354e6637 100644
--- a/chinese/zhcon/distinfo
+++ b/chinese/zhcon/distinfo
@@ -1,2 +1,4 @@
-SHA256 (zhcon-0.2.6.tar.gz) = 4085c072e145239fb353eddec16886e69871ae8bb57e07a14711a5bc4018e430
-SIZE (zhcon-0.2.6.tar.gz) = 5011891
+SHA256 (zhcon-0.2.5.tar.gz) = 4ce4dc1395b6f6a920d44aac069a284bff76df4019ac4164850d263538465d59
+SIZE (zhcon-0.2.5.tar.gz) = 5011644
+SHA256 (zhcon-0.2.5-to-0.2.6.diff.gz) = c9da3f7290f7d74f3ca4f0d78c00c73c0100bcca5eba5d08c629ddc6c7ced9e1
+SIZE (zhcon-0.2.5-to-0.2.6.diff.gz) = 2881
diff --git a/chinese/zhcon/files/patch-doc-zhcon.1.in b/chinese/zhcon/files/patch-doc-zhcon.1.in
new file mode 100644
index 000000000000..a490c0f9dac8
--- /dev/null
+++ b/chinese/zhcon/files/patch-doc-zhcon.1.in
@@ -0,0 +1,166 @@
+--- doc/zhcon.1.in.orig 2006-04-25 00:38:47.000000000 +0800
++++ doc/zhcon.1.in 2012-02-28 20:48:51.000000000 +0800
+@@ -1,99 +1,102 @@
+-.TH "zhcon" "1" "zhcon @VERSION@" "Chinese" "zhcon user manual"
++.TH "zhcon" "1" "zhcon @VERSION@" "Chinese" "Zhcon user manual"
+ .SH "NAME"
+-.LP
++.LP
+ Zhcon \- a fast CJK console environment for GNU/Linux and BSD
+ .SH "SYNTAX"
+-.LP
++.LP
+ zhcon [prog]
+ .SH "DESCRIPTION"
+-.LP
+-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.
+-It can also use input methods(table based) from M$ pwin98 and
++.LP
++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.
++It can also use input methods (table based) from M$ Pwin98 and
+ UCDOS for M$\-DOG.
+
+-* Features include:
++Features include:
+
+-* Full support for Linux FrameBuffer device(from 640x480x8bpp to 1024x768x32bpp)
++* Full support for Linux FrameBuffer device (from 640x480x8bpp to
++ 1024x768x32bpp)
+
+-* Multiple language support (GB2312, GBK, BIG5, JIS, KSCM)
++* Multiple language support (GB2312, GBK, Big5, JIS, KSCM)
+
+ * Gpm mouse support under GNU/Linux (in progress)
+
+ * Mouse support under FreeBSD (finished)
+
+-* Auto\-detect and convert between GB2312 and BIG5 encoding(like hztty)
++* Auto\-detect and convert between GB2312 and Big5 encoding (like hztty)
+
+ * Hot key to change language encoding on the fly
+
+-* Can use input method from M$Pwin98 or UCDOS for M$\-DOG
++* Can use input method from M$ Pwin98 or UCDOS for M$\-DOG
+
+-If a command line argument (prog) is given, zhcon will
+-run this program on start instead of a shell and quit when
+-that program exits.
++If a command line argument (prog) is given, zhcon will run this program
++on start instead of a shell and quit when that program exits.
+ For example:
+-.br
++
+ zhcon screen
+-.br
+-will run screen on start
+-.SH "CONFIGURE FILE"
+-On startup, zhcon first try to load configuration from ~/.zhconrc.If failed, it will use /etc/zhcon.conf by default.The configure file has many options that control the behavior of zhcon.See the comments in the file for instruction on customizing zhcon.Comprehensive document can be found in doc/ directory of source package.
+
+-.SH "KEY SUMMAY"
+-.LP
+-CTRL_ALT_H: active online help
+-.br
++will run screen on start
++.SH "CONFIGURATION FILE"
++On startup, zhcon first try to load configuration from ~/.zhconrc.
++If this fails, it will use /etc/zhcon.conf by default.
++The configuration file has many options that control the behavior of zhcon.
++See the comments in the file for instructions on customizing zhcon.
++Comprehensive documentation can be found in the doc/ directory of installed
++package.
++.SH "KEY SUMMARY"
++.LP
++CTRL_ALT_H: activate online help
++.br
+ ALT_SPACE: open/close CJK mode
+-.br
++.br
+ CTRL_SPACE: open/close input method
+-.br
++.br
+ ALT_SPACE: show/hide input bar
+-.br
++.br
+ CTRL_,: toggle Full/Half char mode
+-.br
++.br
+ CTRL_.: toggle Chinese symbol
+-.br
+-CTRL_F1: set encode to GB2312
+-.br
+-CTRL_F2: set encode to GBK
+-.br
+-CTRL_F3: set encode to BIG5
+-.br
+-CTRL_F4: set encode to JIS
+-.br
+-CTRL_F5: set encode to KSCM
+-.br
++.br
++CTRL_F1: set encoding to GB2312
++.br
++CTRL_F2: set encoding to GBK
++.br
++CTRL_F3: set encoding to Big5
++.br
++CTRL_F4: set encoding to JIS
++.br
++CTRL_F5: set encoding to KSCM
++.br
+ CTRL_F7: toggle between nativebar and overspot input style
+-.br
+-CTRL_F9: toggle GB2312/BIG5 auto\-detect mode
+-.br
++.br
++CTRL_F9: toggle GB2312/Big5 auto\-detect mode
++.br
+ CTRL_F10: menu mode
+-.br
+-CTRL_ALT_1 \- CTRL_ALT_9: switch to input method 1 to 9
+-.br
+-CTRL_ALT_0: English mode
+-.br
++.br
++CTRL_ALT_1\-ALT_9: switch to Chinese input method 1 to 9
++.br
++CTRL_ALT_0: English input mode
++.br
+
+ History mode keys:
+-.br
++.br
+ SHIFT_PAGEUP: scroll up half screen in history
+-.br
++.br
+ SHIFT_PAGEDOWN: scroll down half screen in history
+-.br
++.br
+ SHIFT_ARROWUP: scroll up one line in history
+-.br
++.br
+ SHIFT_ARROWDOWN: scroll down one in history
+-
+ .SH "AUTHORS"
+-.LP
+-ejoy <ejoy@users.sourceforge.net>
+-.br
++.LP
++Zhang Le <ejoy@users.sourceforge.net>
++.br
+ Hu Yong <ccpaging@etang.com>
+-.br
++.br
+ Rick Lei <rick@chinaren.com>
+-.LP
+-This manpage is written by ejoy.
++.LP
++This manpage was written by Zhang Le.
+ .SH "SEE ALSO"
+-.LP
++.LP
diff --git a/chinese/zhcon/files/patch-src-global.h b/chinese/zhcon/files/patch-src-global.h
deleted file mode 100644
index 9f49708c4a44..000000000000
--- a/chinese/zhcon/files/patch-src-global.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/global.h.orig Thu Aug 7 12:54:31 2003
-+++ src/global.h Thu Aug 7 12:54:46 2003
-@@ -26,7 +26,7 @@
- //#endif
- #define _(String) gettext (String)
- #define gettext_noop(String) (String)
--
-+#include <assert.h>
- #include "graphdev.h"
- #include "hzdecoder.h"
- //class Console;
diff --git a/chinese/zhcon/files/patch-src-mouse.cpp b/chinese/zhcon/files/patch-src-mouse.cpp
deleted file mode 100644
index 7b39f069ab8c..000000000000
--- a/chinese/zhcon/files/patch-src-mouse.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/mouse.cpp.orig Sat Aug 16 16:36:28 2003
-+++ src/mouse.cpp Sat Aug 16 16:36:39 2003
-@@ -18,6 +18,7 @@
-
- #include "debug.h"
- #include "mouse.h"
-+#include <cassert>
- #include <sys/signal.h>
-
- #if defined(__FreeBSD__)