From nobody@FreeBSD.org  Sat Oct 10 06:38:49 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2DE851065694
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Oct 2009 06:38:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 037988FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Oct 2009 06:38:49 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n9A6cmOx064034
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 10 Oct 2009 06:38:48 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n9A6cmHJ064033;
	Sat, 10 Oct 2009 06:38:48 GMT
	(envelope-from nobody)
Message-Id: <200910100638.n9A6cmHJ064033@www.freebsd.org>
Date: Sat, 10 Oct 2009 06:38:48 GMT
From: Sahil Tandon <sahil@tandon.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] databases/sqlrelay: fix broken mtree with custom PREFIX
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139472
>Category:       ports
>Synopsis:       [PATCH] databases/sqlrelay: fix broken mtree with custom PREFIX
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    skv
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 10 06:40:01 UTC 2009
>Closed-Date:    Mon Nov 02 15:55:59 UTC 2009
>Last-Modified:  Mon Nov  2 16:00:19 UTC 2009
>Originator:     Sahil Tandon
>Release:        7.2-RELEASE
>Organization:
>Environment:
>Description:
See QATty log:
http://qatty.tecnik93.com//errors/7-STABLE-FPT-CustDir/sqlrelay-0.39.4_1.log
>How-To-Repeat:

>Fix:
Use ${REINPLACE_CMD} instead of files/patch-init-Makefile; dynamically reference ${PREFIX} instead of hard-coding "usr/local".

Patch attached.

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/sqlrelay/Makefile,v
retrieving revision 1.61
diff -u -r1.61 Makefile
--- Makefile	22 Aug 2009 00:17:38 -0000	1.61
+++ Makefile	10 Oct 2009 06:31:49 -0000
@@ -134,12 +134,16 @@
 		sqlr-listener.8 sqlr-scaler.8 sqlr-start.8 sqlr-stop.8
 
 post-patch:
-	${REINPLACE_CMD} -E \
+	@${REINPLACE_CMD} -E \
+		-e 's,(freebsd.*)/usr/local(.*rc.d),\1${PREFIX}\2/sqlrelay.sh-sample,' \
+		-e 's,(freebsd/sqlrelay )(.*etc),\1$$(sysconfdir)/sqlrelay-sample,' \
+			${WRKSRC}/init/Makefile
+	@${REINPLACE_CMD} -E \
 		-e 's,/usr/local[[:>:]],${PREFIX},g;' \
 		-e 's,[[:<:]]gtk-config[[:>:]],${GTK_CONFIG:T},g;' \
 			${WRKSRC}/acsite.m4
 	@${REINPLACE_CMD} -e '/EXAMPLEDIR/d' ${WRKSRC}/etc/Makefile
-	${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} -E \
+	@${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} -E \
 		-e 's#-release \$$\(SQLR_VERSION\)##g;'
 .ifdef NOPORTDOCS
 	 @${REINPLACE_CMD} '/$$(MAKE) -C doc/d' ${WRKSRC}/Makefile
Index: files/patch-init-Makefile
===================================================================
RCS file: files/patch-init-Makefile
diff -N files/patch-init-Makefile
--- files/patch-init-Makefile	9 May 2005 07:18:06 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
---- init/Makefile.orig	Mon May  9 01:50:51 2005
-+++ init/Makefile	Mon May  9 01:56:03 2005
-@@ -44,8 +44,8 @@
- endif
- ifeq ($(UNAME),FreeBSD)
- 	$(MKINSTALLDIRS) $(initroot)/usr/local/etc/rc.d
--	$(INSTALL) -m 755 freebsd/rc.d/sqlrelay $(initroot)/usr/local/etc/rc.d
--	$(INSTALL) -m 644 freebsd/sqlrelay $(initroot)/etc
-+	$(INSTALL) -m 755 freebsd/rc.d/sqlrelay $(initroot)/usr/local/etc/rc.d/sqlrelay.sh-sample
-+	$(INSTALL) -m 644 freebsd/sqlrelay $(sysconfdir)/sqlrelay-sample
- endif
- ifeq ($(UNAME),SCO_SV)
- 	$(MKINSTALLDIRS) $(initroot)/etc/init.d


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->skv 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Oct 10 06:40:12 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139472 
State-Changed-From-To: open->closed 
State-Changed-By: skv 
State-Changed-When: Mon Nov 2 15:55:56 UTC 2009 
State-Changed-Why:  
Committed, thanks. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/139472: commit references a PR
Date: Mon,  2 Nov 2009 15:55:30 +0000 (UTC)

 skv         2009-11-02 15:55:09 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/sqlrelay   Makefile Makefile.common distinfo 
                          pkg-plist 
   Removed files:
     databases/sqlrelay/files patch-init-Makefile 
   Log:
   - Update to 0.41
   - Add WANT_GNOME [1]
   - Be PREFIX-neutral [2]
   
   Changes:
   PR:             ports/137491 [1], ports/138912 [1], ports/139472 [2],
   Submitted by:   Pavel Gubin <pg xx 2lazy.ru> [1],
                   Anatoly Borodin <anatoly.borodin xx gmail.com> [1],
                   Sahil Tandon <sahil xx tandon.net> [2]
   
   Revision  Changes    Path
   1.62      +7 -2      ports/databases/sqlrelay/Makefile
   1.15      +2 -2      ports/databases/sqlrelay/Makefile.common
   1.16      +3 -3      ports/databases/sqlrelay/distinfo
   1.2       +0 -13     ports/databases/sqlrelay/files/patch-init-Makefile (dead)
   1.21      +4 -14     ports/databases/sqlrelay/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
