From mjl@caida.org  Mon May 12 18:53:20 2014
Return-Path: <mjl@caida.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 5A4C62B5
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 May 2014 18:53:20 +0000 (UTC)
Received: from caida.org (rommie.caida.org [192.172.226.78])
	(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 3191723FF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 May 2014 18:53:19 +0000 (UTC)
Received: from sorcerer.caida.org (sorcerer.caida.org [192.172.226.95])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by caida.org (Postfix) with ESMTP id 636EDB8EF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 May 2014 11:53:19 -0700 (PDT)
Received: from mjl by sorcerer.caida.org with local (Exim 4.82 (FreeBSD))
	(envelope-from <mjl@caida.org>)
	id 1WjvLO-000HVv-DM
	for FreeBSD-gnats-submit@freebsd.org; Mon, 12 May 2014 11:52:58 -0700
Message-Id: <E1WjvLO-000HVv-DM@sorcerer.caida.org>
Date: Mon, 12 May 2014 11:52:58 -0700
From: Matthew Luckie <mjl@luckie.org.nz>
Sender: Matthew Luckie <mjl@caida.org>
Reply-To: Matthew Luckie <mjl@luckie.org.nz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] net/libbgpdump staging support
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         189732
>Category:       ports
>Synopsis:       [patch] net/libbgpdump staging support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    amdmi3
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 12 19:00:00 UTC 2014
>Closed-Date:    Wed May 14 12:04:17 UTC 2014
>Last-Modified:  Wed May 14 12:10:00 UTC 2014
>Originator:     Matthew Luckie
>Release:        FreeBSD 9.2-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD sorcerer.caida.org 9.2-RELEASE-p5 FreeBSD 9.2-RELEASE-p5 #0: Tue Apr 29 18:53:19 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

>Description:

Add staging support to libbgpdump.  Note, the patch is unfinished and
will need someone with clue to finish the job.  I got as far as:

$ sudo make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PORTDOCS%%%%DOCSDIR%%
Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%PORTDOCS%%%%DOCSDIR%%/README
Error: Missing: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/example.c
Error: Missing: %%PORTDOCS%%@dirrmtry %%DOCSDIR%%
Error: Missing: %%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%
===> Error: Plist issues found.
*** [check-plist] Error code 1

and I'm not sure what's wrong.  I have PORTDOCS%%%%DOCSDIR%%
in the plist, but I'm obviously missing something else.

>How-To-Repeat:

N/A

>Fix:

	

--- patch-libbgpdump-staging begins here ---
diff -uNr libbgpdump/Makefile libbgpdump-new/Makefile
--- libbgpdump/Makefile	2014-01-22 09:00:46.000000000 -0800
+++ libbgpdump-new/Makefile	2014-05-12 11:35:30.000000000 -0700
@@ -15,25 +15,15 @@
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 
-PORTDOCS=	README
-PORTEXAMPLES=	example.c
+OPTIONS_DEFINE=	DOCS EXAMPLES
 
-NO_STAGE=	yes
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/bgpdump ${PREFIX}/bin
-	@${INSTALL_DATA} ${WRKSRC}/libbgpdump.* ${PREFIX}/lib
+	@${INSTALL_PROGRAM} ${WRKSRC}/bgpdump ${STAGEDIR}${PREFIX}/bin
+	@${INSTALL_DATA} ${WRKSRC}/libbgpdump.* ${STAGEDIR}${PREFIX}/lib
 .for i in bgpdump_attr.h bgpdump_formats.h bgpdump_lib.h
-	@${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include
+	@${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/include
 .endfor
-
-post-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
-.if !defined(NOPORTEXAMPLES)
-	${MKDIR} ${EXAMPLESDIR}
-	${INSTALL_DATA} ${WRKSRC}/example.c ${EXAMPLESDIR}
-.endif
+	@${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/example.c ${STAGEDIR}${EXAMPLESDIR}
 
 .include <bsd.port.mk>
diff -uNr libbgpdump/pkg-descr libbgpdump-new/pkg-descr
--- libbgpdump/pkg-descr	2014-01-22 07:44:51.000000000 -0800
+++ libbgpdump-new/pkg-descr	2014-05-12 11:26:18.000000000 -0700
@@ -12,4 +12,4 @@
           - BGP messages (OPEN, UPDATE, NOTIFY, KEEPALIVE)
           - BGP state changes
 
-WWW:	http://www.ris.ripe.net/source/
+WWW: http://www.ris.ripe.net/source/
diff -uNr libbgpdump/pkg-plist libbgpdump-new/pkg-plist
--- libbgpdump/pkg-plist	2014-01-22 07:16:56.000000000 -0800
+++ libbgpdump-new/pkg-plist	2014-05-12 11:46:51.000000000 -0700
@@ -4,3 +4,7 @@
 include/bgpdump_attr.h
 include/bgpdump_formats.h
 include/bgpdump_lib.h
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example.c
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
--- patch-libbgpdump-staging ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->amdmi3 
Responsible-Changed-By: amdmi3 
Responsible-Changed-When: Wed May 14 03:37:15 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=189732 
State-Changed-From-To: open->closed 
State-Changed-By: amdmi3 
State-Changed-When: Wed May 14 12:04:15 UTC 2014 
State-Changed-Why:  
Committed, with minor changes.  Thanks!  (You missed DOCS/EXAMPLES 
diretory creation, so files were installed instead, not into 
directories, so plist was incorrect).  Please also consider unsilencing 
install target and stripping the library (Warning: 'lib/libbgpdump.so' 
is not stripped consider using ${STRIP_CMD}). 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/189732: commit references a PR
Date: Wed, 14 May 2014 12:04:35 +0000 (UTC)

 Author: amdmi3
 Date: Wed May 14 12:04:31 2014
 New Revision: 354041
 URL: http://svnweb.freebsd.org/changeset/ports/354041
 QAT: https://qat.redports.org/buildarchive/r354041/
 
 Log:
   - Support staging
   
   PR:		189732
   Submitted by:	Matthew Luckie <mjl@luckie.org.nz> (maintainer)
 
 Modified:
   head/net/libbgpdump/Makefile
   head/net/libbgpdump/pkg-descr
   head/net/libbgpdump/pkg-plist
 
 Modified: head/net/libbgpdump/Makefile
 ==============================================================================
 --- head/net/libbgpdump/Makefile	Wed May 14 12:04:21 2014	(r354040)
 +++ head/net/libbgpdump/Makefile	Wed May 14 12:04:31 2014	(r354041)
 @@ -15,25 +15,16 @@ LICENSE=	GPLv2
  GNU_CONFIGURE=	yes
  USE_LDCONFIG=	yes
  
 -PORTDOCS=	README
 -PORTEXAMPLES=	example.c
 +OPTIONS_DEFINE=	DOCS EXAMPLES
  
 -NO_STAGE=	yes
  do-install:
 -	@${INSTALL_PROGRAM} ${WRKSRC}/bgpdump ${PREFIX}/bin
 -	@${INSTALL_DATA} ${WRKSRC}/libbgpdump.* ${PREFIX}/lib
 +	@${INSTALL_PROGRAM} ${WRKSRC}/bgpdump ${STAGEDIR}${PREFIX}/bin
 +	@${INSTALL_DATA} ${WRKSRC}/libbgpdump.* ${STAGEDIR}${PREFIX}/lib
  .for i in bgpdump_attr.h bgpdump_formats.h bgpdump_lib.h
 -	@${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include
 +	@${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/include
  .endfor
 -
 -post-install:
 -.if !defined(NOPORTDOCS)
 -	${MKDIR} ${DOCSDIR}
 -	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
 -.endif
 -.if !defined(NOPORTEXAMPLES)
 -	${MKDIR} ${EXAMPLESDIR}
 -	${INSTALL_DATA} ${WRKSRC}/example.c ${EXAMPLESDIR}
 -.endif
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${EXAMPLESDIR}
 +	@${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 +	@${INSTALL_DATA} ${WRKSRC}/example.c ${STAGEDIR}${EXAMPLESDIR}
  
  .include <bsd.port.mk>
 
 Modified: head/net/libbgpdump/pkg-descr
 ==============================================================================
 --- head/net/libbgpdump/pkg-descr	Wed May 14 12:04:21 2014	(r354040)
 +++ head/net/libbgpdump/pkg-descr	Wed May 14 12:04:31 2014	(r354041)
 @@ -12,4 +12,4 @@ Entry formats:
            - BGP messages (OPEN, UPDATE, NOTIFY, KEEPALIVE)
            - BGP state changes
  
 -WWW:	http://www.ris.ripe.net/source/
 +WWW: http://www.ris.ripe.net/source/
 
 Modified: head/net/libbgpdump/pkg-plist
 ==============================================================================
 --- head/net/libbgpdump/pkg-plist	Wed May 14 12:04:21 2014	(r354040)
 +++ head/net/libbgpdump/pkg-plist	Wed May 14 12:04:31 2014	(r354041)
 @@ -4,3 +4,7 @@ lib/libbgpdump.so
  include/bgpdump_attr.h
  include/bgpdump_formats.h
  include/bgpdump_lib.h
 +%%PORTDOCS%%%%DOCSDIR%%/README
 +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example.c
 +%%PORTDOCS%%@dirrm %%DOCSDIR%%
 +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 _______________________________________________
 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:
