From nobody@FreeBSD.org  Tue Oct  8 15:32:14 2013
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 ESMTP id 675D1156
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  8 Oct 2013 15:32:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 3AC962AF8
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  8 Oct 2013 15:32:14 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r98FWEIm053683
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 8 Oct 2013 15:32:14 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r98FWEIa053682;
	Tue, 8 Oct 2013 15:32:14 GMT
	(envelope-from nobody)
Message-Id: <201310081532.r98FWEIa053682@oldred.freebsd.org>
Date: Tue, 8 Oct 2013 15:32:14 GMT
From: Kuan-Chung Chiu <buganini@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [MAINTAINER] update security/chntpw
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182832
>Category:       ports
>Synopsis:       [MAINTAINER] update security/chntpw
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sunpoet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 08 15:40:00 UTC 2013
>Closed-Date:    Thu Oct 10 06:59:39 UTC 2013
>Last-Modified:  Thu Oct 10 07:00:00 UTC 2013
>Originator:     Kuan-Chung Chiu
>Release:        
>Organization:
Sixnology Inc.
>Environment:
>Description:
* Add LICENSE
* New option framework
* Enable for amd64
* Stagify
* Fix build without GCC

https://redports.org/buildarchive/20131008151000-10238/
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN /usr/ports/security/chntpw/Makefile chntpw/Makefile
--- /usr/ports/security/chntpw/Makefile	2013-09-21 06:55:24.000000000 +0800
+++ chntpw/Makefile	2013-10-08 23:08:49.740624727 +0800
@@ -10,27 +10,39 @@
 MAINTAINER=	buganini@gmail.com
 COMMENT=	Utility to set the password and edit registry on Microsoft NT system
 
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/GPL.txt
+
+OPTIONS_DEFINE=	DOCS
+
 USE_ZIP=	yes
 USE_GMAKE=	yes
 USE_OPENSSL=	yes
 
-ONLY_FOR_ARCHS=	i386
+ONLY_FOR_ARCHS=	i386 amd64
 
 PLIST_FILES=	bin/chntpw
 PORTDOCS=	README.txt WinReg.txt regedit.txt
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-NO_STAGE=	yes
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == "i386"
+MAKE_ARGS=	FLAG32=-m32
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e '10 s,/usr,$$\(OPENSSLBASE\),' \
 		${WRKSRC}/Makefile
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/chntpw ${PREFIX}/bin
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+	@${INSTALL_PROGRAM} ${WRKSRC}/chntpw ${STAGEDIR}${PREFIX}/bin
+
+.if ${PORT_OPTIONS:MDOCS}
+post-install:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>
diff -ruN /usr/ports/security/chntpw/files/patch-Makefile chntpw/files/patch-Makefile
--- /usr/ports/security/chntpw/files/patch-Makefile	1970-01-01 08:00:00.000000000 +0800
+++ chntpw/files/patch-Makefile	2013-10-05 19:25:21.842034658 +0800
@@ -0,0 +1,21 @@
+--- Makefile.orig	2011-05-12 03:33:56.000000000 +0800
++++ Makefile	2013-10-05 14:00:39.093625732 +0800
+@@ -10,17 +10,9 @@
+ OSSLPATH=/usr
+ OSSLINC=$(OSSLPATH)/include
+ 
+-CC=gcc
+-
+-# Force 32 bit
+-CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32 
++CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall ${FLAG32}
+ OSSLLIB=$(OSSLPATH)/lib
+ 
+-# 64 bit if default for compiler setup
+-#CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
+-#OSSLLIB=$(OSSLPATH)/lib64
+-
+-
+ # This is to link with whatever we have, SSL crypto lib we put in static
+ LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a
+ 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sunpoet 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Oct 8 15:40:08 UTC 2013 
Responsible-Changed-Why:  
sunpoet@ wants this submitter's PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182832 
State-Changed-From-To: open->closed 
State-Changed-By: sunpoet 
State-Changed-When: Thu Oct 10 06:59:39 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182832 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182832: commit references a PR
Date: Thu, 10 Oct 2013 06:54:07 +0000 (UTC)

 Author: sunpoet
 Date: Thu Oct 10 06:53:56 2013
 New Revision: 329967
 URL: http://svnweb.freebsd.org/changeset/ports/329967
 
 Log:
   - Add LICENSE
   - Convert to new OPTIONS framework
   - Allow build on amd64
   - Respect CC: fix build with clang
   - Support STAGEDIR
   - While I'm here, use USES=gmake
   
   PR:		ports/182832
   Submitted by:	Kuan-Chung Chiu <buganini@gmail.com> (maintainer)
 
 Modified:
   head/security/chntpw/Makefile   (contents, props changed)
 
 Modified: head/security/chntpw/Makefile
 ==============================================================================
 --- head/security/chntpw/Makefile	Thu Oct 10 06:53:51 2013	(r329966)
 +++ head/security/chntpw/Makefile	Thu Oct 10 06:53:56 2013	(r329967)
 @@ -10,27 +10,36 @@ DISTNAME=	${PORTNAME}-source-${PORTVERSI
  MAINTAINER=	buganini@gmail.com
  COMMENT=	Utility to set the password and edit registry on Microsoft NT system
  
 +LICENSE=	GPLv2
 +
 +OPTIONS_DEFINE=	DOCS
 +
  USE_ZIP=	yes
 -USE_GMAKE=	yes
  USE_OPENSSL=	yes
 +USES=		gmake
  
 -ONLY_FOR_ARCHS=	i386
 +ONLY_FOR_ARCHS=	i386 amd64
  
  PLIST_FILES=	bin/chntpw
  PORTDOCS=	README.txt WinReg.txt regedit.txt
  
  WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
  
 -NO_STAGE=	yes
 +.include <bsd.port.pre.mk>
 +
  post-patch:
 -	@${REINPLACE_CMD} -e '10 s,/usr,$$\(OPENSSLBASE\),' \
 -		${WRKSRC}/Makefile
 +	@${REINPLACE_CMD} -e '/^CC=/d; /^OSSLPATH=/ s|=.*|=${OPENSSLBASE}|' ${WRKSRC}/Makefile
 +.if ${ARCH} == "amd64"
 +	@${REINPLACE_CMD} -e '/^CFLAGS=/ s| -m32||' ${WRKSRC}/Makefile
 +.endif
  
  do-install:
 -	@${INSTALL_PROGRAM} ${WRKSRC}/chntpw ${PREFIX}/bin
 -.if !defined(NOPORTDOCS)
 -	@${MKDIR} ${DOCSDIR}
 -	@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
 +	@${INSTALL_PROGRAM} ${WRKSRC}/chntpw ${STAGEDIR}${PREFIX}/bin
 +
 +post-install:
 +.if ${PORT_OPTIONS:MDOCS}
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 +	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
  .endif
  
 -.include <bsd.port.mk>
 +.include <bsd.port.post.mk>
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
