aboutsummaryrefslogtreecommitdiff
path: root/japanese
diff options
context:
space:
mode:
authorTAKATSU Tomonari <tota@FreeBSD.org>2011-08-15 07:03:55 +0000
committerTAKATSU Tomonari <tota@FreeBSD.org>2011-08-15 07:03:55 +0000
commit4f74e14fb0e831cd78903f8aa1f7dd5ce5cd7902 (patch)
treec7d532b4522c80a6dce6f462b91b67535442b2da /japanese
parentef94120e4ff06fb9ae3ec6b045945adfee405f6f (diff)
downloadports-4f74e14fb0e831cd78903f8aa1f7dd5ce5cd7902.tar.gz
ports-4f74e14fb0e831cd78903f8aa1f7dd5ce5cd7902.zip
Notes
Diffstat (limited to 'japanese')
-rw-r--r--japanese/alias-fonts/Makefile6
-rw-r--r--japanese/alias-fonts/pkg-deinstall45
-rw-r--r--japanese/alias-fonts/pkg-install56
3 files changed, 54 insertions, 53 deletions
diff --git a/japanese/alias-fonts/Makefile b/japanese/alias-fonts/Makefile
index 95667cc53194..ef0f27c080a5 100644
--- a/japanese/alias-fonts/Makefile
+++ b/japanese/alias-fonts/Makefile
@@ -7,8 +7,9 @@
PORTNAME= alias-fonts
PORTVERSION= 1.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= japanese x11-fonts
+MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= koma2@lovepeers.org
@@ -27,12 +28,11 @@ BUILD_DEPENDS= bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf \
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
NO_BUILD= yes
-USE_PERL5= yes
FONTSDIR= ${LOCALBASE}/lib/X11/fonts/local
do-install:
@${SETENV} PKG_PREFIX=${PREFIX} \
- ${PERL} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/japanese/alias-fonts/pkg-deinstall b/japanese/alias-fonts/pkg-deinstall
index 8a18e4a9cba8..3092b9f797fe 100644
--- a/japanese/alias-fonts/pkg-deinstall
+++ b/japanese/alias-fonts/pkg-deinstall
@@ -1,24 +1,25 @@
-#!/usr/bin/perl
+#!/bin/sh
# $FreeBSD$
-$prefix = $ENV{'PKG_PREFIX'};
-$dir = "$prefix/lib/X11/fonts/local";
-$to = "$dir/fonts.alias";
-$from = "$to.orig";
-rename($to, $from) || die("Can't rename: $!");
-open(IN, $from) || die("Can't open $from: $!");
-open(OUT, ">$to") || die("Can't open $to: $!");
-while (<IN>) {
- chop;
- if (/^\s*!/ || /^\s*$/) {
- print OUT "$_\n";
- }
- else {
- @line = split(/\s+/, $_);
- @elm = split(/-+/, $line[0]);
- if ($elm[1] ne 'alias') {
- print OUT "$_\n";
- }
- }
-}
-#system("$prefix/bin/xset fp rehash");
+dir="${PKG_PREFIX}/lib/X11/fonts/local";
+to="$dir/fonts.alias";
+from="$to.orig";
+
+if ! mv $to $from; then
+ echo "Couldn't rename $to."
+ exit 1
+fi
+
+IFS="
+"
+
+while read line; do
+ trimmed=${line# *}
+ case $trimmed in
+ !*|"") echo $line;;
+ -alias-*) echo $line;;
+ *) ;;
+ esac
+done < $from > $to
+
+rm $from
diff --git a/japanese/alias-fonts/pkg-install b/japanese/alias-fonts/pkg-install
index 0a133141266f..b28bcfd2204c 100644
--- a/japanese/alias-fonts/pkg-install
+++ b/japanese/alias-fonts/pkg-install
@@ -1,29 +1,32 @@
-#!/usr/bin/perl
+#!/bin/sh
# $FreeBSD$
-$prefix = $ENV{'PKG_PREFIX'};
-$dir = "$prefix/lib/X11/fonts/local";
-$to = "$dir/fonts.alias";
-$from = "$to.orig";
-$option = $ARGV[1];
-exit 0 if $option ne 'POST-INSTALL';
-rename($to, $from) || die("Can't rename: $!");
-open(IN, $from) || die("Can't open $from: $!");
-open(OUT, ">$to") || die("Can't open $to: $!");
-while (<IN>) {
- chop;
- if (/^\s*!/ || /^\s*$/) {
- print OUT "$_\n";
- }
- else {
- @line = split(/\s+/, $_);
- @elm = split(/-+/, $line[0]);
- if ($elm[1] ne 'alias') {
- print OUT "$_\n";
- }
- }
-}
-for (split(/\n/, <<"END"))
+if [ $1 != "POST-INSTALL" ]; then
+ exit 0
+fi
+
+dir="${PKG_PREFIX}/lib/X11/fonts/local";
+to="$dir/fonts.alias";
+from="$to.orig";
+
+if ! mv $to $from; then
+ echo "Couldn't rename $to."
+ exit 1
+fi
+
+IFS="
+"
+
+while read line; do
+ trimmed=${line# *}
+ case $trimmed in
+ !*|"") echo $line;;
+ -alias-*) echo $line;;
+ *) ;;
+ esac
+done < $from > $to
+
+cat <<EOF >> $to
-alias-fixed-medium-r-normal--24-234-75-75-c-120-iso8859-1 -sony-fixed-medium-r-normal--24-230-75-75-c-120-iso8859-1
-alias-fixed-medium-r-normal--20-190-75-75-c-200-iso8859-1 -kappa-fixed-medium-r-normal--20-190-75-75-c-100-iso8859-1
-alias-fixed-medium-i-normal--20-190-75-75-c-200-iso8859-1 -kappa-fixed-medium-i-normal--20-190-75-75-c-100-iso8859-1
@@ -138,7 +141,4 @@ for (split(/\n/, <<"END"))
-alias-fixed-bold-i-normal--16-150-75-75-c-160-jisx0213.2000-1 -misc-fixed-bold-i-normal--16-150-75-75-c-160-jisx0213.2000-1
-alias-mincho-bold-r-normal--20-190-75-75-c-200-jisx0213.2000-1 -kappa-mincho-bold-r-normal--20-190-75-75-c-200-jisx0213.2000-1
-alias-mincho-bold-i-normal--20-190-75-75-c-200-jisx0213.2000-1 -kappa-mincho-bold-i-normal--20-190-75-75-c-200-jisx0213.2000-1
-END
-{
- print OUT "$_\n";
-}
+EOF