ports/113135: [maintainer] textproc/sphinxsearch -- fix rc script, etc

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue May 29 19:20:06 UTC 2007


>Number:         113135
>Category:       ports
>Synopsis:       [maintainer] textproc/sphinxsearch -- fix rc script, etc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 29 19:20:05 GMT 2007
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list