Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2014 16:28:56 GMT
From:      Joseph Benden <joe@thrallingpenguin.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/190374: [patch] Add staging support to www/py-HTMLgen
Message-ID:  <201405291628.s4TGSuqI016981@cgiserv.freebsd.org>
Resent-Message-ID: <201405291630.s4TGU0L0054522@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         190374
>Category:       ports
>Synopsis:       [patch] Add staging support to www/py-HTMLgen
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>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:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405291628.s4TGSuqI016981>