aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-06-04 15:24:48 +0800
committermiwi <miwi@FreeBSD.org>2007-06-04 15:24:48 +0800
commit5dce9836c48616ff330ca284e3331e54b6a217f9 (patch)
treeaa580f8190d2cb5a0224304780f38e7066453fac
parent39a5a0645850fa7b53ba71c5ecb122dd28bb0023 (diff)
downloadfreebsd-ports-graphics-5dce9836c48616ff330ca284e3331e54b6a217f9.tar.gz
freebsd-ports-graphics-5dce9836c48616ff330ca284e3331e54b6a217f9.tar.zst
freebsd-ports-graphics-5dce9836c48616ff330ca284e3331e54b6a217f9.zip
- Fix few mistakes in rc.d script
PR: 113135 Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
-rw-r--r--textproc/sphinxsearch/Makefile1
-rw-r--r--textproc/sphinxsearch/files/patch-src-sphinxsearch.h14
-rw-r--r--textproc/sphinxsearch/files/sphinxsearch.sh.in28
3 files changed, 27 insertions, 16 deletions
diff --git a/textproc/sphinxsearch/Makefile b/textproc/sphinxsearch/Makefile
index c103215d44a..09298c5c5c4 100644
--- a/textproc/sphinxsearch/Makefile
+++ b/textproc/sphinxsearch/Makefile
@@ -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 --git a/textproc/sphinxsearch/files/patch-src-sphinxsearch.h b/textproc/sphinxsearch/files/patch-src-sphinxsearch.h
index b869576a62e..b1da5d68c74 100644
--- a/textproc/sphinxsearch/files/patch-src-sphinxsearch.h
+++ b/textproc/sphinxsearch/files/patch-src-sphinxsearch.h
@@ -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 --git a/textproc/sphinxsearch/files/sphinxsearch.sh.in b/textproc/sphinxsearch/files/sphinxsearch.sh.in
index 83c2ff67b76..5fe3887eafa 100644
--- a/textproc/sphinxsearch/files/sphinxsearch.sh.in
+++ b/textproc/sphinxsearch/files/sphinxsearch.sh.in
@@ -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 @@ create_dirs ()
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"