ports/182832: [MAINTAINER] update security/chntpw

Kuan-Chung Chiu buganini at gmail.com
Tue Oct 8 15:40:00 UTC 2013


>Number:         182832
>Category:       ports
>Synopsis:       [MAINTAINER] update security/chntpw
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 08 15:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-ports-bugs mailing list