From nobody@FreeBSD.org  Thu May 29 16:28:57 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 7F80DB30
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 May 2014 16:28:57 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 54F452BC2
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 May 2014 16:28:57 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4TGSuEC016984
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 May 2014 16:28:56 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4TGSuqI016981;
	Thu, 29 May 2014 16:28:56 GMT
	(envelope-from nobody)
Message-Id: <201405291628.s4TGSuqI016981@cgiserv.freebsd.org>
Date: Thu, 29 May 2014 16:28:56 GMT
From: Joseph Benden <joe@thrallingpenguin.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Add staging support to www/py-HTMLgen
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         190374
>Category:       ports
>Synopsis:       [patch] Add staging support to www/py-HTMLgen
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-python
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 29 16:30:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Thu May 29 16:30:04 UTC 2014
>Originator:     Joseph Benden
>Release:        FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014     root@lucy:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Adds staging support to www/py-HTMLgen.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/www/py-HTMLgen/Makefile b/www/py-HTMLgen/Makefile
index 0e15abe..973f13c 100644
--- a/www/py-HTMLgen/Makefile
+++ b/www/py-HTMLgen/Makefile
@@ -16,7 +16,6 @@ COMMENT=	A Python library for the generation of HTML documents
 
 USE_PYTHON=	2
 NO_BUILD=	yes
-NO_STAGE=	yes
 
 .if !defined(NOPORTDOCS)
 PORTDOCS=	*
@@ -27,12 +26,12 @@ post-patch:
 
 .if !defined(NOPORTDOCS)
 post-install:
-	@${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	@${TAR} -C ${WRKSRC} -cf - README html image | \
-		${TAR} -C ${DOCSDIR} -xvf -
-	@${CHOWN} -R ${BINOWN}:${BINGRP} ${DOCSDIR}
-	@${FIND} ${DOCSDIR} -type d -exec ${CHMOD} 0555 {} \;
-	@${FIND} ${DOCSDIR} -type f -exec ${CHMOD} 0444 {} \;
+		${TAR} -C ${STAGEDIR}${DOCSDIR} -xvf -
+	@${CHOWN} -R ${BINOWN}:${BINGRP} ${STAGEDIR}${DOCSDIR}
+	@${FIND} ${STAGEDIR}${DOCSDIR} -type d -exec ${CHMOD} 0555 {} \;
+	@${FIND} ${STAGEDIR}${DOCSDIR} -type f -exec ${CHMOD} 0444 {} \;
 .endif
 
 .include <bsd.port.mk>
diff --git a/www/py-HTMLgen/files/patch-aa b/www/py-HTMLgen/files/patch-aa
index 258b086..0f7781b 100644
--- a/www/py-HTMLgen/files/patch-aa
+++ b/www/py-HTMLgen/files/patch-aa
@@ -1,6 +1,6 @@
---- installp.py	Sat Mar 20 02:34:29 1999
-+++ installp.py.orig	Sat Mar 20 02:33:44 1999
-@@ -14,7 +14,7 @@
+--- installp.py.orig	1999-02-03 21:59:11.000000000 -0700
++++ installp.py	2014-05-29 09:23:31.000000000 -0700
+@@ -14,17 +14,22 @@
          print "Usage: %s [-f] pymodule [npymodule...]" % sys.argv[0]
          sys.exit(1)
      for opt in opts:
@@ -9,3 +9,21 @@
  
      v = sys.version[:3]
  
++    try:
++        destdir = os.environ['DESTDIR']
++    except KeyError:
++        destdir = ""
++
+     if string.atof(v) >= 1.5:
+-        sp = "%s/lib/python%s/site-packages" % (sys.prefix, v)
++        sp = "%s%s/lib/python%s/site-packages" % (destdir, sys.prefix, v)
+         if not os.path.exists(sp):
+-            os.mkdir(sp)
++            os.makedirs(sp)
+     else:
+         print "looks like Python is older than 1.5"
+-        sp = "%s/lib/python%s" % (sys.prefix, v)
++        sp = "%s%s/lib/python%s" % (destdir, sys.prefix, v)
+ 
+     if not FORCE:
+         ans = raw_input("Install Python modules into %s? [y] " % sp)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-python 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu May 29 16:30:04 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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