ports/147826: [maintainer update] chinese/fortune
Ju Pengfei
jupengfei at gmail.com
Sun Jun 13 02:50:02 UTC 2010
>Number: 147826
>Category: ports
>Synopsis: [maintainer update] chinese/fortune
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Jun 13 02:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Ju Pengfei
>Release: 8.0-RELEASE-p3
>Organization:
Ju Pengfei
>Environment:
>Description:
removed shells/bash from RUN_DEPENDS.
>How-To-Repeat:
>Fix:
apply this patch, please.
Patch attached with submission follows:
diff -ruN fortune.bak/Makefile fortune/Makefile
--- fortune.bak/Makefile 2010-06-13 10:36:08.000000000 +0800
+++ fortune/Makefile 2010-06-13 10:30:40.000000000 +0800
@@ -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 @@
MAINTAINER= jupengfei at 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 @@
.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 -ruN fortune.bak/files/patch-src-fortune-zh fortune/files/patch-src-fortune-zh
--- fortune.bak/files/patch-src-fortune-zh 1970-01-01 08:00:00.000000000 +0800
+++ fortune/files/patch-src-fortune-zh 2010-06-13 10:14:44.000000000 +0800
@@ -0,0 +1,55 @@
+--- 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'
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list