From klammer@webonaut.com  Mon Oct 17 09:03:43 2005
Return-Path: <klammer@webonaut.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A954F16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Oct 2005 09:03:43 +0000 (GMT)
	(envelope-from klammer@webonaut.com)
Received: from sv02.webonaut.com (kirk.webonaut.com [212.41.243.26])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2DAF243D46
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Oct 2005 09:03:42 +0000 (GMT)
	(envelope-from klammer@webonaut.com)
Received: from localhost (localhost [127.0.0.1])
	by sv02.webonaut.com (Postfix) with ESMTP id 0798F76499
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Oct 2005 11:03:45 +0200 (CEST)
Received: from sv02.webonaut.com ([127.0.0.1])
 by localhost (sv02.webonaut.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 06558-03 for <FreeBSD-gnats-submit@freebsd.org>;
 Mon, 17 Oct 2005 11:03:26 +0200 (CEST)
Received: from acer.webonaut.com (unknown [213.147.173.194])
	by sv02.webonaut.com (Postfix) with ESMTP id B7FDF76498
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Oct 2005 11:03:26 +0200 (CEST)
Message-Id: <1129539906.0@acer.webonaut.com>
Date: Mon, 17 Oct 2005 11:05:06 +0200
From: "Franz Klammer" <klammer@webonaut.com>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: [MAINTAINER UPDATE] graphics/png2ico - repect non-standard PREFIX 
X-Send-Pr-Version: gtk-send-pr 0.4.6 
X-GNATS-Notify:

>Number:         87563
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] graphics/png2ico - repect non-standard PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jylefort
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 17 09:10:14 GMT 2005
>Closed-Date:    Mon Oct 17 11:45:52 GMT 2005
>Last-Modified:  Mon Oct 17 11:45:52 GMT 2005
>Originator:     Franz Klammer
>Release:        FreeBSD 6.0-RC1 i386
>Organization:
>Environment:


System: FreeBSD 6.0-RC1 #6: Tue Oct 11 18:53:26 CEST 2005
    root@acer.webonaut.com:/usr/obj/usr/src/sys/ACER292



>Description:


- repect non-standard PREFIX 

don't search in hardcoded /usr/local for include 
and libs - instead use PREFIX/include and PREFIX/lib

as this port has no configure-script look 
also in the default-PREFIX  /usr/local for includes and libs

got info from: Kris Kennaway <kris@obsecurity.org>


>How-To-Repeat:





>Fix:


--- png2ico_use_prefix.diff begins here ---
diff -Nur png2ico.orig/Makefile png2ico/Makefile
--- png2ico.orig/Makefile	Fri Feb  6 14:11:28 2004
+++ png2ico/Makefile	Mon Oct 17 10:42:42 2005
@@ -25,7 +25,7 @@
 USE_REINPLACE=	yes
 
 post-patch:
-	${REINPLACE_CMD} -e 's|-O2|${CFLAGS}|' ${WRKSRC}/Makefile
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Makefile
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
diff -Nur png2ico.orig/files/patch-Makefile png2ico/files/patch-Makefile
--- png2ico.orig/files/patch-Makefile	Mon Mar  1 13:26:35 2004
+++ png2ico/files/patch-Makefile	Mon Oct 17 10:55:30 2005
@@ -2,7 +2,7 @@
 +++ Makefile	Mon Mar  1 13:24:57 2004
 @@ -1,11 +1,11 @@
 -CPPFLAGS=-W -Wall -O2 -finline-functions
-+CPPFLAGS=-W -Wall -g -O -pipe  -finline-functions -I/usr/local/include -L/usr/local/lib
++CPPFLAGS=-W -Wall -g -O -pipe  -finline-functions -I%%PREFIX%%/include -L%%PREFIX%%/lib -I/usr/local/include -L/usr/local/lib
  #CPPFLAGS=-O0 -W -Wall
 -DEBUG=-g
 +#DEBUG=-g
--- png2ico_use_prefix.diff ends here ---



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->jylefort 
Responsible-Changed-By: jylefort 
Responsible-Changed-When: Mon Oct 17 11:09:11 GMT 2005 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87563 
State-Changed-From-To: open->closed 
State-Changed-By: jylefort 
State-Changed-When: Mon Oct 17 11:44:29 GMT 2005 
State-Changed-Why:  
Committed with a few modifications, thanks! 

Note: ${PREFIX} is the port's installation location. To refer to third-party 
software, use ${LOCALBASE} or ${X11BASE}. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87563 
>Unformatted:
