From freebsd@grem.de  Sun Oct  7 04:16:53 2012
Return-Path: <freebsd@grem.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 0362E1065670
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Oct 2012 04:15:55 +0000 (UTC)
	(envelope-from freebsd@grem.de)
Received: from mail.grem.de (outcast.grem.de [213.239.217.27])
	by mx1.freebsd.org (Postfix) with SMTP id 6642B8FC1A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Oct 2012 04:15:54 +0000 (UTC)
Received: (qmail 60556 invoked by uid 0); 7 Oct 2012 04:15:53 -0000
Message-Id: <20121007041553.60555.qmail@mail.grem.de>
Date: 7 Oct 2012 04:15:53 -0000
From: Michael Gmelin <freebsd@grem.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] textproc/xmlwrapp: Converting port to new options framework
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         172437
>Category:       ports
>Synopsis:       [PATCH] textproc/xmlwrapp: Converting port to new options framework
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 07 04:20:20 UTC 2012
>Closed-Date:    Sun Oct 07 13:25:08 UTC 2012
>Last-Modified:  Sun Oct 07 13:25:08 UTC 2012
>Originator:     Michael Gmelin
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
Grem Equity GmbH
>Environment:
System: FreeBSD bsd64.grem.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC
>Description:
The patch below converts the port to use the new options framework[1]
and converts the Makefile header to the new format[2].

The patch is to be applied using:

patch -p0 -E </path/to/patchfile

No attempts have been made to fix any potential issues the port might
have beyond this scope. I also didn't fix any indentation issues to
keep the patch small and easy to audit, a future port maintainer might
want to take care of this.

See also:
1. http://lists.freebsd.org/pipermail/freebsd-ports/2012-October/078676.html
2. http://lists.freebsd.org/pipermail/freebsd-ports/2012-August/077801.html

Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: suffix)
>How-To-Repeat:
>Fix:

--- xmlwrapp-0.6.3.patch begins here ---
diff -ruN --exclude=CVS ../xmlwrapp.orig/Makefile ./Makefile
--- ../xmlwrapp.orig/Makefile	2012-10-07 01:24:24.905236975 +0200
+++ ./Makefile	2012-10-07 01:27:18.825385486 +0200
@@ -1,10 +1,5 @@
-# ex:ts=8
-# Ports collection makefile for:	xmlwrapp
-# Date created:			Jan 14, 2003
-# Whom:				ijliao
-#
-# $FreeBSD: ports/textproc/xmlwrapp/Makefile,v 1.20 2012/07/26 05:40:22 bapt Exp $
-#
+# Created by: ijliao
+# $FreeBSD: $
 
 PORTNAME=	xmlwrapp
 PORTVERSION=	0.6.3
@@ -19,7 +14,8 @@
 
 LIB_DEPENDS=	boost_iostreams.4:${PORTSDIR}/devel/boost-libs
 
-OPTIONS=	XSLT "build libxsltwrap library (requires libxslt)" off
+OPTIONS_DEFINE=	DOCS XSLT
+XSLT_DESC=	Build libxsltwrap library (requires libxslt)
 
 USE_GNOME=	gnomehack libxml2
 USE_PERL5_BUILD=yes
@@ -34,7 +30,7 @@
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_XSLT)
+.if ${PORT_OPTIONS:MXSLT}
 USE_GNOME+=	libxslt
 PLIST_SUB+=	XSLT=""
 .else
@@ -47,7 +43,7 @@
 	@${REINPLACE_CMD} '/^SUBDIRS/s|docs||' ${WRKSRC}/Makefile.in
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@(cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \
 		${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
 .endif
--- xmlwrapp-0.6.3.patch ends here ---

>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/172437: commit references a PR
Date: Sun,  7 Oct 2012 04:49:22 +0000 (UTC)

 Author: eadler
 Date: Sun Oct  7 04:49:08 2012
 New Revision: 305430
 URL: http://svn.freebsd.org/changeset/ports/305430
 
 Log:
   Convert to OptionsNG
   
   PR:	ports/172437
   Submitted by:	Michael Gmelin <freebsd@grem.de>
 
 Modified:
   head/textproc/xmlwrapp/Makefile
 
 Modified: head/textproc/xmlwrapp/Makefile
 ==============================================================================
 --- head/textproc/xmlwrapp/Makefile	Sun Oct  7 04:44:48 2012	(r305429)
 +++ head/textproc/xmlwrapp/Makefile	Sun Oct  7 04:49:08 2012	(r305430)
 @@ -1,10 +1,5 @@
 -# ex:ts=8
 -# Ports collection makefile for:	xmlwrapp
 -# Date created:			Jan 14, 2003
 -# Whom:				ijliao
 -#
 +# Created by: ijliao
  # $FreeBSD$
 -#
  
  PORTNAME=	xmlwrapp
  PORTVERSION=	0.6.3
 @@ -19,7 +14,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
  
  LIB_DEPENDS=	boost_iostreams.4:${PORTSDIR}/devel/boost-libs
  
 -OPTIONS=	XSLT "build libxsltwrap library (requires libxslt)" off
 +OPTIONS_DEFINE=	XSLT
 +XSLT_DESC=	Build libxsltwrap library (requires libxslt)
  
  USE_GNOME=	gnomehack libxml2
  USE_PERL5_BUILD=yes
 @@ -34,7 +30,7 @@ LDFLAGS+=	-L${LOCALBASE}/lib
  
  .include <bsd.port.options.mk>
  
 -.if defined(WITH_XSLT)
 +.if ${PORT_OPTIONS:MXSLT}
  USE_GNOME+=	libxslt
  PLIST_SUB+=	XSLT=""
  .else
 @@ -47,9 +43,8 @@ post-patch:
  	@${REINPLACE_CMD} '/^SUBDIRS/s|docs||' ${WRKSRC}/Makefile.in
  
  post-install:
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  	@(cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \
  		${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
  .endif
 -
  .include <bsd.port.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"
 
State-Changed-From-To: open->closed 
State-Changed-By: eadler 
State-Changed-When: Sun Oct 7 13:25:07 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

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