From m.seaman@infracaninophile.co.uk  Tue May 29 19:12:27 2007
Return-Path: <m.seaman@infracaninophile.co.uk>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 5C8B416A400
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 May 2007 19:12:27 +0000 (UTC)
	(envelope-from m.seaman@infracaninophile.co.uk)
Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.187.76.162])
	by mx1.freebsd.org (Postfix) with ESMTP id C3C3513C448
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 May 2007 19:12:26 +0000 (UTC)
	(envelope-from m.seaman@infracaninophile.co.uk)
Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])
	by smtp.infracaninophile.co.uk (8.14.1/8.14.1) with ESMTP id l4TJCB3W023506
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 May 2007 20:12:11 +0100 (BST)
	(envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk)
Received: (from matthew@localhost)
	by happy-idiot-talk.infracaninophile.co.uk (8.14.1/8.14.1/Submit) id l4TJCBOe023505;
	Tue, 29 May 2007 20:12:11 +0100 (BST)
	(envelope-from matthew)
Message-Id: <200705291912.l4TJCBOe023505@happy-idiot-talk.infracaninophile.co.uk>
Date: Tue, 29 May 2007 20:12:11 +0100 (BST)
From: Matthew Seaman <m.seaman@infracaninophile.co.uk>
Reply-To: Matthew Seaman <m.seaman@infracaninophile.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [maintainer] textproc/sphinxsearch -- fix rc script, etc
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         113135
>Category:       ports
>Synopsis:       [maintainer] textproc/sphinxsearch -- fix rc script, etc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 29 19:20:05 GMT 2007
>Closed-Date:    Mon Jun 04 07:25:02 GMT 2007
>Last-Modified:  Mon Jun  4 07:30:10 GMT 2007
>Originator:     Matthew Seaman
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
Infracaninophile
>Environment:
System: FreeBSD happy-idiot-talk.infracaninophile.co.uk 6.2-STABLE FreeBSD 6.2-STABLE #1: Thu May 24 09:34:36 BST 2007 root@happy-idiot-talk.infracaninophile.co.uk:/usr/obj/usr/src/sys/HAPPY-IDIOT-TALK i386


	
>Description:

i) Fix a bug reported by Mikhal Monashyov -- mistakes in the rc.d
script prevented the default values being overridden.

ii) In consultation with Andrew Aksyonoff (sphinxsearch author) update
the sphinxstd.h patch to what will be in the next release.


>How-To-Repeat:
	
>Fix:

	

--- sphinxsearch.diff begins here ---
diff -Nur /usr/ports/textproc/sphinxsearch/Makefile sphinxsearch/Makefile
--- /usr/ports/textproc/sphinxsearch/Makefile	Tue Apr 17 06:57:02 2007
+++ sphinxsearch/Makefile	Tue May 29 19:46:33 2007
@@ -9,6 +9,7 @@
 
 PORTNAME=	sphinxsearch
 PORTVERSION=	0.9.7
+PORTREVISION=	1
 CATEGORIES=	textproc databases
 MASTER_SITES=	http://www.sphinxsearch.com/downloads/
 DISTNAME=	sphinx-${PORTVERSION}
diff -Nur /usr/ports/textproc/sphinxsearch/files/patch-src-sphinxsearch.h sphinxsearch/files/patch-src-sphinxsearch.h
--- /usr/ports/textproc/sphinxsearch/files/patch-src-sphinxsearch.h	Sun Apr 15 20:07:30 2007
+++ sphinxsearch/files/patch-src-sphinxsearch.h	Tue May 29 19:55:18 2007
@@ -1,11 +1,13 @@
---- src/sphinxstd.h.orig	Sun Apr 15 20:16:11 2007
-+++ src/sphinxstd.h	Sun Apr 15 20:17:25 2007
-@@ -57,7 +57,7 @@
+--- src/sphinxstd.h.orig	Tue May 29 19:50:47 2007
++++ src/sphinxstd.h	Tue May 29 19:52:23 2007
+@@ -57,9 +57,7 @@
  #error "Internal 64-bit integer macros already defined."
  #endif
  
 -#if __STDC_VERSION__>=199901L || __STDC_VERSION>=199901L || defined(_STDINT_H) || defined(_STDINT_H_)
-+#if __STDC_VERSION__>=199901L || __STDC_VERSION>=199901L || defined(_STDINT_H) || defined(_STDINT_H_) || defined(_SYS_STDINT_H_)
- #include <stdint.h>
- #else // no stdint.h
+-#include <stdint.h>
+-#else // no stdint.h
++#if !HAVE_STDINT_H
  
+ #if defined(_MSC_VER)
+ typedef __int64 int64_t;
diff -Nur /usr/ports/textproc/sphinxsearch/files/sphinxsearch.sh.in sphinxsearch/files/sphinxsearch.sh.in
--- /usr/ports/textproc/sphinxsearch/files/sphinxsearch.sh.in	Wed Jan 31 06:14:37 2007
+++ sphinxsearch/files/sphinxsearch.sh.in	Tue May 29 18:18:31 2007
@@ -30,21 +30,20 @@
 name=%%PORTNAME%%
 rcvar=`set_rcvar`
 
-%%PORTNAME%%_enable=${%%PORTNAME%%_enable-"NO"}
-%%PORTNAME%%_conffile=${%%PORTNAME%%_conffile-"%%CFGFILE%%"}
-%%PORTNAME%%_pidfile=${%%PORTNAME%%_pidfile-"%%SPHINX_RUN%%/searchd.pid"}
-%%PORTNAME%%_user=${%%PORTNAME%%_user-"%%SPHINX_USR%%"}
-%%PORTNAME%%_group=${%%PORTNAME%%_group-"%%SPHINX_GRP%%"}
-%%PORTNAME%%_logdir=${%%PORTNAME%%_logdir-"%%SPHINX_LOG%%"}
+load_rc_config ${name}
 
-start_precmd="create_dirs"
+: ${%%PORTNAME%%_enable="NO"}
+: ${%%PORTNAME%%_conffile="%%CFGFILE%%"}
+: ${%%PORTNAME%%_pidfile="%%SPHINX_RUN%%/searchd.pid"}
+: ${%%PORTNAME%%_user="%%SPHINX_USR%%"}
+: ${%%PORTNAME%%_group="%%SPHINX_GRP%%"}
+: ${%%PORTNAME%%_logdir="%%SPHINX_LOG%%"}
 
 command=%%PREFIX%%/sbin/searchd
 pidfile=${%%PORTNAME%%_pidfile}
 required_files=${%%PORTNAME%%_conffile}
-%%PORTNAME%%_flags="--config ${%%PORTNAME%%_conffile}"
 
-create_dirs ()
+%%PORTNAME%%_precmd ()
 {
     piddir=$(dirname ${%%PORTNAME%%_pidfile})
     if [ ! -d ${piddir} ]; then
@@ -58,5 +57,14 @@
     fi
 }
 
-load_rc_config ${name}
+case "${%%PORTNAME%%_flags}" in
+    *--config\ *)
+    echo "Warning \$%%PORTNAME%%_flags includes --config option." \
+	"Please use \$%%PORTNAME%%_conffile instead."
+    ;;
+    *)
+    %%PORTNAME%%_flags="--config ${%%PORTNAME%%_conffile} ${%%PORTNAME%%_flags}"
+    ;;
+esac
+
 run_rc_command "$1"
--- sphinxsearch.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Tue May 29 21:12:21 UTC 2007 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113135 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Mon Jun 4 07:24:58 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/113135: commit references a PR
Date: Mon,  4 Jun 2007 07:25:00 +0000 (UTC)

 miwi        2007-06-04 07:24:48 UTC
 
   FreeBSD ports repository
 
   Modified files:
     textproc/sphinxsearch Makefile 
     textproc/sphinxsearch/files patch-src-sphinxsearch.h 
                                 sphinxsearch.sh.in 
   Log:
   - Fix few mistakes in rc.d script
   
   PR:             113135
   Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
   
   Revision  Changes    Path
   1.5       +1 -0      ports/textproc/sphinxsearch/Makefile
   1.2       +8 -6      ports/textproc/sphinxsearch/files/patch-src-sphinxsearch.h
   1.3       +19 -11    ports/textproc/sphinxsearch/files/sphinxsearch.sh.in
 _______________________________________________
 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:
