NetBSD Problem Report #16415

Received: (qmail 25753 invoked from network); 19 Apr 2002 21:39:55 -0000
Message-Id: <20020419213949.D8723AC@proven.weird.com>
Date: Fri, 19 Apr 2002 17:39:49 -0400 (EDT)
From: woods@weird.com (Greg A. Woods)
Reply-To: woods@planix.com (Greg A. Woods)
To: gnats-bugs@gnats.netbsd.org
Subject: mail/faces-1.6.1nb1 fs2ikon script does not work with graphics/netpbm-9.25 and other faces bugs...
X-Send-Pr-Version: 3.95

>Number:         16415
>Category:       pkg
>Synopsis:       mail/faces-1.6.1nb1 fs2ikon script does not work with graphics/netpbm-9.25 and other faces bugs...
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 19 21:40:00 +0000 2002
>Closed-Date:    Sun Jul 07 14:44:36 +0000 2002
>Last-Modified:  Sun Jul 07 14:44:36 +0000 2002
>Originator:     Greg A. Woods
>Release:        pkgsrc-2002/04/02
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 1.5W
Architecture: i386
Machine: i386
>Description:

	there are several bugs in the mail/faces-1.6.1nb1 package:

	- it seems the fs2ikon script was not tested with netpbm-9.25 installed

	- there may be other scripts not tested with netpbm-9.25 installed

	- the package does not have a runtime dpendency registered for
	  graphics/netpbm

	- there are probably other dependencies that should be
	  registered, including perl (there's on perl script)

	- the do-configure target should probably use make's .for (and
	  appropriate make macro modifiers) instead of a shell 'for' loop

>How-To-Repeat:

	install mail/faces and graphics/netpbm and try to figure out how
	to convert a 48x48 GIF image into a format suitable for compface.

>Fix:

	this patch fixes the fs2ikon script, at least for the case where
	the image is already 48x48 pixels, but maybe it should instead
	use pnmscale?

--- /usr/pkg/bin/fs2ikon	Wed Apr 17 23:51:24 2002
+++ ./fs2ikon	Fri Apr 19 00:13:29 2002
@@ -26,14 +26,14 @@
     y=$2
     if [ $x -ge $y ]
     then
-	ppmscale -width 48 $file.pgm | ppmtopgm | pgmtopbm > $file.pbm
+	ppmtopgm < $file.pgm | pgmtopbm > $file.pbm
 	set `sed -n -e 2p -e 2q $file.pbm`
 	yo=`expr '(' 48 - $2 ')' / 2`
 	pbmmake 48 48 |
 	    pnmpaste $file.pbm 0 $yo |
 	    pbmtoicon 
     else
-	ppmscale -height 48 $file.pgm | ppmtopgm | pgmtopbm > $file.pbm
+	ppmtopgm < $file.pgm | pgmtopbm > $file.pbm
 	set `sed -n -e 2p -e 2q $file.pbm`
 	xo=`expr '(' 48 - $1 ')' / 2`
 	pbmmake 48 48 |
@@ -43,7 +43,6 @@
 	sed -e 1,2d -e '20s/$/,/' |
 	tr -d '\011\012' |
 	tr ',' '\012' |
-	sed -e 's/^/0x/' |
 	pr -l1 -t -w22 -3 -s, |
 	sed -e 's/$/,/' > $file.face
     rm $file.pbm
>Release-Note:
>Audit-Trail:

From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
To: gwoods@acm.org
Cc: gnats-bugs@netbsd.org
Subject: pkg/16415
Date: Tue, 2 Jul 2002 17:30:35 +0200

 --vA66WO2vHvL/CRSR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 Hi!

 I have no suitable input file.
 Does adding the attached patches to faces (and `make mps') work?

 Why is the sed necessary?

 Bye,
  Thomas

 -- 
 Thomas Klausner - wiz@danbala.tuwien.ac.at
 Intolerance is the last defense of the insecure.

 --vA66WO2vHvL/CRSR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch-ax

 $NetBSD$

 --- filters/fs2ikon.orig	Thu Oct 24 03:26:14 1991
 +++ filters/fs2ikon
 @@ -26,14 +26,14 @@
      y=$2
      if [ $x -ge $y ]
      then
 -	ppmscale -width 48 $file.pgm | ppmtopgm | pgmtopbm > $file.pbm
 +	pnmscale -width 48 $file.pgm | ppmtopgm | pgmtopbm > $file.pbm
  	set `sed -n -e 2p -e 2q $file.pbm`
  	yo=`expr '(' 48 - $2 ')' / 2`
  	pbmmake 48 48 |
  	    pnmpaste $file.pbm 0 $yo |
  	    pbmtoicon 
      else
 -	ppmscale -height 48 $file.pgm | ppmtopgm | pgmtopbm > $file.pbm
 +	pnmscale -height 48 $file.pgm | ppmtopgm | pgmtopbm > $file.pbm
  	set `sed -n -e 2p -e 2q $file.pbm`
  	xo=`expr '(' 48 - $1 ')' / 2`
  	pbmmake 48 48 |
 @@ -43,7 +43,6 @@
  	sed -e 1,2d -e '20s/$/,/' |
  	tr -d '\011\012' |
  	tr ',' '\012' |
 -	sed -e 's/^/0x/' |
  	pr -l1 -t -w22 -3 -s, |
  	sed -e 's/$/,/' > $file.face
      rm $file.pbm

 --vA66WO2vHvL/CRSR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch-ay

 $NetBSD$

 --- filters/fs2xbm.orig	Tue Nov 19 05:02:32 1991
 +++ filters/fs2xbm
 @@ -35,14 +35,14 @@

  if test $x -ge $y
  then
 -	ppmscale -width 48 $tmp1 | ppmtopgm | pgmtopbm > $tmp2
 +	pnmscale -width 48 $tmp1 | ppmtopgm | pgmtopbm > $tmp2
  	set `sed -n -e 2p -e 2q $tmp2`
  	yo=`expr '(' 48 - $2 ')' / 2`
  	pbmmake 48 48 |
  	    pnmpaste $tmp2 0 $yo |
  	    pbmtoxbm 
  else
 -	ppmscale -height 48 $tmp1 | ppmtopgm | pgmtopbm > $tmp2
 +	pnmscale -height 48 $tmp1 | ppmtopgm | pgmtopbm > $tmp2
  	set `sed -n -e 2p -e 2q $tmp2`
  	xo=`expr '(' 48 - $1 ')' / 2`
  	pbmmake 48 48 |

 --vA66WO2vHvL/CRSR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch-az

 $NetBSD$

 --- filters/xbmsize48.orig	Tue Nov 19 05:02:32 1991
 +++ filters/xbmsize48
 @@ -43,7 +43,7 @@
  	else	dim=ysize
  	fi

 -	xbmtopbm < $tmp | ppmscale -$dim $size |
 +	xbmtopbm < $tmp | pnmscale -$dim $size |
  	ppmtopgm | pgmtopbm | pbmtoxbm > $tmp2
  	mv $tmp2 $tmp
  fi

 --vA66WO2vHvL/CRSR--
State-Changed-From-To: open->closed 
State-Changed-By: tron 
State-Changed-When: Sun Jul 7 07:41:28 PDT 2002 
State-Changed-Why:  
1.) I've added a dependence on the "netpbm" package. 
2.) I've modified the include scripts to use "pnmscale" instead of "ppmscale". 
3.) I've added "USE_PERL" and "REPLACE_PERL" to treat the include Perl 
scripts properly. 
4.) I did *not* touch the "for" loop because using such shell loops is an 
accepted practice in the package sources. One of its advantages is the 
lower number of required fork()+exec() cycles. 
Thanks for reporting these problems. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.