From swell.k@gmail.com  Mon Jun  7 08:41:13 2010
Return-Path: <swell.k@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B7791065676
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jun 2010 08:41:13 +0000 (UTC)
	(envelope-from swell.k@gmail.com)
Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C94B8FC1F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  7 Jun 2010 08:41:12 +0000 (UTC)
Received: by ey-out-2122.google.com with SMTP id 25so150562eya.9
        for <FreeBSD-gnats-submit@freebsd.org>; Mon, 07 Jun 2010 01:41:12 -0700 (PDT)
Received: by 10.213.31.141 with SMTP id y13mr752217ebc.34.1275900072217;
        Mon, 07 Jun 2010 01:41:12 -0700 (PDT)
Received: from localhost (hd5b906df.selukra.dyn.perspektivbredband.net [213.185.6.223])
        by mx.google.com with ESMTPS id 16sm2510896ewy.11.2010.06.07.01.41.07
        (version=SSLv3 cipher=RC4-MD5);
        Mon, 07 Jun 2010 01:41:10 -0700 (PDT)
Message-Id: <86wrubgrqg.fsf@gmail.com>
Date: Mon, 07 Jun 2010 08:40:55 +0000
From: Anonymous <swell.k@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] misc/xdelta3: update to 3.0.y

>Number:         147642
>Category:       ports
>Synopsis:       [patch] misc/xdelta3: update to 3.0.y
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    makc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 07 08:50:02 UTC 2010
>Closed-Date:    Sun Jul 11 18:59:05 UTC 2010
>Last-Modified:  Sun Jul 11 18:59:05 UTC 2010
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
- update
- prepare for slave port, ports/147641
- remove `-O3' and `-g' from CFLAGS.
  useful when WITH_DEBUG/DEBUG_FLAGS are defined.

cosmetic:
- use proper PORTVERSION
- strip MASTER_SITE_ prefix
- dispose of backreferences and `-E' option in REINPLACE_CMD
>How-To-Repeat:
>Fix:
--- a.diff begins here ---
Index: misc/xdelta3/Makefile
===================================================================
RCS file: /a/.cvsup/ports/misc/xdelta3/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- misc/xdelta3/Makefile	10 Jan 2010 03:54:05 -0000	1.5
+++ misc/xdelta3/Makefile	7 Jun 2010 08:32:43 -0000
@@ -6,22 +6,44 @@
 #
 
 PORTNAME=	xdelta
-PORTVERSION=	3.0u
-CATEGORIES=	misc devel
-MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
-DISTNAME=	${PORTNAME}${PORTVERSION}
+DISTVERSION=	3.0y
+CATEGORIES?=	misc devel
+MASTER_SITES=	GOOGLE_CODE
+DISTNAME=	${PORTNAME}${DISTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Open-source binary diff, VCDIFF/RFC 3284 delta compression
+COMMENT?=	Open-source binary diff, VCDIFF/RFC 3284 delta compression
 
-ALL_TARGET=	xdelta3
 USE_GMAKE=	yes
-PLIST_FILES=	bin/xdelta3
 
-post-patch:
-	${REINPLACE_CMD} -E -e 's/^(CFLAGS)=/\1+=/' ${WRKSRC}/Makefile
+.include <bsd.port.pre.mk>
+
+.if ${SLAVE_PORT:Mno}
+PLIST_FILES=	bin/xdelta3
+.endif
 
+post-patch:	.SILENT
+	${REINPLACE_CMD} -e '/^CFLAGS/s/=/+&/' \
+		-e 's/-O3//; s/-g//' \
+		-e '/^all:/,/^$$/ { s/:.*/: xdelta3/; /testing/d; }' \
+		${WRKSRC}/Makefile
+.if ${SLAVE_PORT:Myes}
+	${REINPLACE_CMD} -i.slave.bak -e '/^SWIG_FLAGS/s/=/& `python$$(PYVER)-config --cflags` -fpic/' \
+		-e '/^xdelta3module\.so:/,/^$$/ { s/ld/$$(CC)/; \
+			s/.*libpython.*\.so.*/`python$$(PYVER)-config --ldflags`/; \
+			/-lc/d; }' \
+		-e 's|/usr/include/python$$(PYVER)|${PYTHON_INCLUDEDIR}|' \
+		-e 's|/usr/lib/python$$(PYVER)|${PYTHON_LIBDIR}|' \
+		-e 's|/usr/lib/libpython|${LOCALBASE}/lib/libpython|' \
+		-e '/^all:/s/:.*/: swigtgt/' \
+		-e '/^PYVER/s/=.*/= ${PYTHON_VER}/' \
+		${WRKSRC}/Makefile
+	${REINPLACE_CMD} -e "/^REL/s/=.*/='${PORTVERSION}'/" \
+		-e "/extra_compile_args.*\[/,/]/ { s/'-O3',//; s/'-g',//; }" \
+		${WRKSRC}/${PYSETUP}
+.else
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/xdelta3 ${PREFIX}/bin/
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: misc/xdelta3/distinfo
===================================================================
RCS file: /a/.cvsup/ports/misc/xdelta3/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- misc/xdelta3/distinfo	17 Dec 2008 15:52:03 -0000	1.3
+++ misc/xdelta3/distinfo	7 Jun 2010 05:37:59 -0000
@@ -1,3 +1,3 @@
-MD5 (xdelta3.0u.tar.gz) = 361e9be8d5a833bb40050c779d26066d
-SHA256 (xdelta3.0u.tar.gz) = 218c5fc7e44beae2937a1af5d6fe9896350ac5224a8df1b32a868e42f96dc5d2
-SIZE (xdelta3.0u.tar.gz) = 219264
+MD5 (xdelta3.0y.tar.gz) = 8246e6ba89a5a6b9efc24f9552fcf940
+SHA256 (xdelta3.0y.tar.gz) = 13fc809e51016d5633b12029efed2dd0c8cb050154809684938dc291faf16a79
+SIZE (xdelta3.0y.tar.gz) = 228808
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->makc 
Responsible-Changed-By: makc 
Responsible-Changed-When: Sun Jul 11 18:15:00 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147642 
State-Changed-From-To: open->closed 
State-Changed-By: makc 
State-Changed-When: Sun Jul 11 18:59:04 UTC 2010 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

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