summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2010-06-25 02:06:34 +0000
committerWen Heping <wen@FreeBSD.org>2010-06-25 02:06:34 +0000
commita26323c29c29f85b8b07d45e1d3be35e69b52e51 (patch)
tree6e61e5df0ef09df22401af833054708b700168c7 /chinese
parentUpdate to version 2.2.10 which has the following bug fixes: (diff)
- Removed shells/bash from RUN_DEPENDS
PR: ports/147826 Submitted by: Ju Pengfei <jupengfei@gmail.com> (maintainer) Feature safe: yes
Notes
Notes: svn path=/head/; revision=256933
Diffstat (limited to 'chinese')
-rw-r--r--chinese/fortune/Makefile8
-rw-r--r--chinese/fortune/files/patch-src-fortune-zh56
2 files changed, 58 insertions, 6 deletions
diff --git a/chinese/fortune/Makefile b/chinese/fortune/Makefile
index deceb99fdbe0..e5f8683c0965 100644
--- a/chinese/fortune/Makefile
+++ b/chinese/fortune/Makefile
@@ -7,7 +7,7 @@
PORTNAME= fortune
PORTVERSION= 1.2.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= chinese
MASTER_SITES= GOOGLE_CODE
PKGNAMEPREFIX= zh-
@@ -16,8 +16,7 @@ DISTNAME= fortune-mod-zh-${PORTVERSION}
MAINTAINER= jupengfei@gmail.com
COMMENT= A very classic fortune file in Chinese
-RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \
- autob5:${PORTSDIR}/chinese/autoconvert
+RUN_DEPENDS= autob5:${PORTSDIR}/chinese/autoconvert
PROJECTHOST= chinese-fortune
NO_BUILD= yes
@@ -30,9 +29,6 @@ IGNORE= needs the FreeBSD games distribution
.endif
post-patch:
- @${REINPLACE_CMD} -e "s|/bin/bash|${LOCALBASE}/bin/bash|" \
- -e "s|/usr/bin/fortune|/usr/games/fortune|" \
- ${WRKSRC}/src/fortune-zh
@${REINPLACE_CMD} -e "s|/usr/|${PREFIX}/|" \
-e "s|strfile|/usr/games/strfile|" \
${WRKSRC}/src/Makefile
diff --git a/chinese/fortune/files/patch-src-fortune-zh b/chinese/fortune/files/patch-src-fortune-zh
new file mode 100644
index 000000000000..19e4205d2bb2
--- /dev/null
+++ b/chinese/fortune/files/patch-src-fortune-zh
@@ -0,0 +1,56 @@
+--- src/fortune-zh.orig 2010-06-13 10:07:36.000000000 +0800
++++ src/fortune-zh 2010-06-13 10:10:00.000000000 +0800
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # fortune-zh v1.2
+ #
+@@ -18,7 +18,7 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+-FORTUNE="/usr/bin/fortune"
++FORTUNE="/usr/games/fortune"
+ CMD=`basename "$0"`
+
+ if [ -f $HOME/.fortune-zh.conf ]
+@@ -32,16 +32,13 @@
+ LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
+ LC_IDENTIFICATION LC_ALL;
+ do
+- if [ ! -z ${!category} ]
+- then
+- LANG="${!category}";
+- break;
+- fi
++ eval LANG="\$$category"
++ [ x"$LANG" = x ] || break
+ done
+
+ CHARSET=`echo ${LANG#*.} | tr A-Z a-z | sed -e 's/-//g'`
+
+-if test $CMD == "fortune-zh"; then
++if test $CMD = "fortune-zh"; then
+ case "$CHARSET" in
+ big5)
+ LC_ALL=zh_CN.GB18030 $FORTUNE $FILE | autob5
+@@ -50,7 +47,7 @@
+ LC_ALL=$LANG $FORTUNE $FILE
+ ;;
+ esac
+-elif test $CMD == "fortune-sc"; then
++elif test $CMD = "fortune-sc"; then
+ case "$CHARSET" in
+ big5)
+ echo 'Not available in BIG5 environment, try UTF-8'
+@@ -59,7 +56,7 @@
+ LC_ALL=$LANG $FORTUNE $FILE
+ ;;
+ esac
+-elif test $CMD == "fortune-tc"; then
++elif test $CMD = "fortune-tc"; then
+ case "$CHARSET" in
+ gb*)
+ echo 'Not available in GB environment, try UTF-8'
+