From toadboy@frisket.cstone.net  Sun Oct  4 23:19:44 1998
Received: from Frisket.cstone.net (frisket.cstone.net [206.205.42.2])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA15887
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 4 Oct 1998 23:19:40 -0700 (PDT)
          (envelope-from toadboy@frisket.cstone.net)
Received: (from toadboy@localhost) by Frisket.cstone.net (8.8.8/8.6.12) id CAA09283; Mon, 5 Oct 1998 02:19:32 -0400 (EDT)
Message-Id: <199810050619.CAA09283@Frisket.cstone.net>
Date: Mon, 5 Oct 1998 02:19:32 -0400 (EDT)
From: adrian@ubergeeks.com
Reply-To: adrian@ubergeeks.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: patch for libpng port
X-Send-Pr-Version: 3.2

>Number:         8153
>Category:       ports
>Synopsis:       the current libpng port doesn't build under 2.2-stable.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct  4 23:20:00 PDT 1998
>Closed-Date:    Sun Oct 4 23:50:57 PDT 1998
>Last-Modified:  Sun Oct  4 23:51:20 PDT 1998
>Originator:     Adrian Filipi-Martin
>Release:        FreeBSD 2.2.7-STABLE i386
>Organization:
Ubergeeks Consulting
>Environment:

	

>Description:

	If the PORTOBJFORMAT variable is not defined the makefiles for
	libpng die with syntax errors due to missing opperands to ==.

	One solution is to test that PORTOBJFORMAT is defined before
	testing its value.

>How-To-Repeat:

	cd /usr/graphigs/png; make

>Fix:
	
	Apply the following patch to patch-aa.  An alternative
	would be to set PORTOBJFORMAT to some value if it is not
	defined at the top instead of testing for it being deinfed
	multiply.

--- patch-aa.orig	Wed Sep 16 20:51:27 1998
+++ patch-aa	Mon Oct  5 02:08:08 1998
@@ -48,7 +48,7 @@
 + # read libpng.txt or png.h to see why PNGMAJ is 2.  You should not
 + # have to change it.
 + PNGMAJ = 2
-+ .if (${PORTOBJFORMAT} == "elf")
++ .if defined(PORTOBJFORMAT) && (${PORTOBJFORMAT} == "elf")
 + PNGVER = $(PNGMAJ)
 + .else
 + PNGMIN = 1
@@ -74,7 +74,7 @@
   	$(RANLIB) $@
   
 + libpng.so.${PNGVER}: $(OBJS:S/o$/so/g)
-+ .if (${PORTOBJFORMAT} == "elf")
++ .if defined(PORTOBJFORMAT) && (${PORTOBJFORMAT} == "elf")
 + 	${CC} -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ $(OBJS:S/o$/so/g) -lz -lm
 + .else
 + 	${CC} -shared -Wl,-x -Wl,-assert -Wl,pure-text -o $@ $(OBJS:S/o$/so/g) -lz -lm
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asami 
State-Changed-When: Sun Oct 4 23:50:57 PDT 1998 
State-Changed-Why:  
You need to get the current bsd.port.mk if you want to use the 
current libpng port. :) 
>Unformatted:
