From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 20 15:00:22 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FE961065674 for ; Fri, 20 May 2011 15:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5558FC1F for ; Fri, 20 May 2011 15:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4KF0MXt073371 for ; Fri, 20 May 2011 15:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4KF0MEZ073370; Fri, 20 May 2011 15:00:22 GMT (envelope-from gnats) Resent-Date: Fri, 20 May 2011 15:00:22 GMT Resent-Message-Id: <201105201500.p4KF0MEZ073370@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Florent Thoumie Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F76E1065673; Fri, 20 May 2011 14:57:02 +0000 (UTC) (envelope-from flz@ash.xbsd.org) Received: from mail07.mail.esat.net (mail07.mail.esat.net [193.120.142.50]) by mx1.freebsd.org (Postfix) with ESMTP id EDA5F8FC16; Fri, 20 May 2011 14:57:01 +0000 (UTC) Received: from ash.xbsd.org [193.120.123.154] by mail07.mail.esat.net with esmtp id 1QNR8O-000629-Bp; Fri, 20 May 2011 15:57:00 +0100 Received: from ash.xbsd.org (localhost [127.0.0.1]) by ash.xbsd.org (8.14.4/8.14.4) with ESMTP id p4KEq7Rb056426; Fri, 20 May 2011 14:52:07 GMT (envelope-from flz@ash.xbsd.org) Received: (from flz@localhost) by ash.xbsd.org (8.14.4/8.14.4/Submit) id p4KEq7rm056425; Fri, 20 May 2011 15:52:07 +0100 (IST) (envelope-from flz) Message-Id: <201105201452.p4KEq7rm056425@ash.xbsd.org> Date: Fri, 20 May 2011 15:52:07 +0100 (IST) From: Florent Thoumie To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: bapt@FreeBSD.org Subject: ports/157212: japanese/font-alias: use shell instead of perl for pkg-(de)install X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Florent Thoumie List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2011 15:00:22 -0000 >Number: 157212 >Category: ports >Synopsis: japanese/font-alias: use shell instead of perl for pkg-(de)install >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri May 20 15:00:21 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Florent Thoumie >Release: FreeBSD 8.2-RELEASE amd64 >Organization: Xbsd.org >Environment: System: FreeBSD ash.xbsd.org 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: >How-To-Repeat: >Fix: --- ja-alias-fonts.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/japanese/alias-fonts/Makefile,v retrieving revision 1.20 diff -u -r1.20 Makefile --- Makefile 31 May 2009 09:19:09 -0000 1.20 +++ Makefile 20 May 2011 14:55:26 -0000 @@ -7,7 +7,7 @@ PORTNAME= alias-fonts PORTVERSION= 1.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= japanese x11-fonts DISTFILES= # empty @@ -27,12 +27,11 @@ 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 Index: pkg-deinstall =================================================================== RCS file: /home/pcvs/ports/japanese/alias-fonts/pkg-deinstall,v retrieving revision 1.3 diff -u -r1.3 pkg-deinstall --- pkg-deinstall 9 Apr 2002 09:05:22 -0000 1.3 +++ pkg-deinstall 20 May 2011 14:55:26 -0000 @@ -1,24 +1,25 @@ -#!/usr/bin/perl +#!/bin/sh # $FreeBSD: ports/japanese/alias-fonts/pkg-deinstall,v 1.3 2002/04/09 09:05:22 sada Exp $ -$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 () { - 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 Index: pkg-install =================================================================== RCS file: /home/pcvs/ports/japanese/alias-fonts/pkg-install,v retrieving revision 1.6 diff -u -r1.6 pkg-install --- pkg-install 19 Jan 2003 05:45:46 -0000 1.6 +++ pkg-install 20 May 2011 14:55:26 -0000 @@ -1,29 +1,32 @@ -#!/usr/bin/perl +#!/bin/sh # $FreeBSD: ports/japanese/alias-fonts/pkg-install,v 1.6 2003/01/19 05:45:46 sada Exp $ -$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 () { - 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 <> $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 @@ -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 --- ja-alias-fonts.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: