diff options
author | wen <wen@FreeBSD.org> | 2010-06-25 10:06:34 +0800 |
---|---|---|
committer | wen <wen@FreeBSD.org> | 2010-06-25 10:06:34 +0800 |
commit | 003e5826fd2ccebe83f033fe28c465f9957a6088 (patch) | |
tree | f5c84ffea8771e1485afca815703626453c2cd9b /chinese | |
parent | f5a3e24cf9f69da8cb4bead3344cebb04cd1dc14 (diff) | |
download | freebsd-ports-gnome-003e5826fd2ccebe83f033fe28c465f9957a6088.tar.gz freebsd-ports-gnome-003e5826fd2ccebe83f033fe28c465f9957a6088.tar.zst freebsd-ports-gnome-003e5826fd2ccebe83f033fe28c465f9957a6088.zip |
- Removed shells/bash from RUN_DEPENDS
PR: ports/147826
Submitted by: Ju Pengfei <jupengfei@gmail.com> (maintainer)
Feature safe: yes
Diffstat (limited to 'chinese')
-rw-r--r-- | chinese/fortune/Makefile | 8 | ||||
-rw-r--r-- | chinese/fortune/files/patch-src-fortune-zh | 56 |
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' + |