aboutsummaryrefslogtreecommitdiff
path: root/audio/gnump3d
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2005-12-13 15:20:16 +0000
committerVolker Stolz <vs@FreeBSD.org>2005-12-13 15:20:16 +0000
commit102a399c0f5da7f724d9f4e1c374d95816c7257f (patch)
tree05340fcc79d940207eb4c97e659cd46708efd3c8 /audio/gnump3d
parent121b359e87f3514c77e4c874a3fd0637adc7ac14 (diff)
downloadports-102a399c0f5da7f724d9f4e1c374d95816c7257f.tar.gz
ports-102a399c0f5da7f724d9f4e1c374d95816c7257f.zip
Notes
Diffstat (limited to 'audio/gnump3d')
-rw-r--r--audio/gnump3d/Makefile17
-rw-r--r--audio/gnump3d/files/gnump3.sh.in37
2 files changed, 49 insertions, 5 deletions
diff --git a/audio/gnump3d/Makefile b/audio/gnump3d/Makefile
index 8905ad2eac8e..6868cad57f03 100644
--- a/audio/gnump3d/Makefile
+++ b/audio/gnump3d/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gnump3d
PORTVERSION= 2.9.8
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -23,8 +24,11 @@ RUN_DEPENDS= lame:${PORTSDIR}/audio/lame \
USE_GPG?= yes
SIG_FILES= ${DISTNAME}${EXTRACT_SUFX}.asc
USE_BZIP2= yes
-USE_PERL5= yes
+USE_REINPLACE= yes
+USE_PERL5_RUN= yes
NO_BUILD= yes
+USE_RC_SUBR= gnump3.sh
+SUB_LIST+= PERL=${PERL}
MAN1= gnump3d-index.1 gnump3d-top.1 gnump3d.1 gnump3d.conf.1
@@ -32,16 +36,19 @@ CONFDIR= ${PREFIX}/etc/${PORTNAME}
.include <bsd.port.pre.mk>
-.if ${PERL_LEVEL} < 500600
-IGNORE= You need at least perl 5.6.0. Do not use FreeBSD 4.x' system perl,\
- it's outdated. Install lang/perl5 and issue 'use.perl port'
+.if ${PERL_LEVEL} < 500800
+IGNORE= needs at least perl 5.8. Do not use FreeBSD 4.x' system perl,\
+ it's outdated. Install lang/perl5.8 and issue 'use.perl port'
+.elif ${PERL_LEVEL} < 500806
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Encode.pm:${PORTSDIR}/devel/p5-Encode
.endif
post-patch:
.for f in bin/gnump3d-index bin/gnump3d-top bin/gnump3d2 etc/gnump3d.conf \
man/gnump3d.conf.1
- @${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g ; \
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g ; \
+ s|!/usr/bin/perl|!${PERL}| ; \
s|%%SITE_PERL%%|${SITE_PERL}|g' ${WRKSRC}/${f}
.endfor
diff --git a/audio/gnump3d/files/gnump3.sh.in b/audio/gnump3d/files/gnump3.sh.in
new file mode 100644
index 000000000000..98de6a39fb00
--- /dev/null
+++ b/audio/gnump3d/files/gnump3.sh.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# PROVIDE: gnump3d
+# REQUIRE: DAEMON NETWORKING LOGIN
+# KEYWORD: FreeBSD shutdown
+
+. %%RC_SUBR%%
+
+gnump3d_enable=${gnump3d_enable-"NO"}
+gnump3d_program=${gnump3d_program:-%%PREFIX%%/bin/gnump3d}
+gnump3d_flags=${gnump3d_flags-"--quiet --background"}
+gnump3d_pidfile=${gnump3d_pidfile:-/var/run/gnump3d.pid}
+
+name="gnump3d"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/gnump3d"
+command_interpreter="%%PERL%%"
+pidfile="${gnump3d_pidfile}"
+
+load_rc_config $name
+
+start_cmd=gnump3d_start
+
+# hack to capture the PID
+gnump3d_start() {
+ pid=`check_process ${command} ${command_interpreter}`
+ if [ -z $pid ]; then
+ echo "Starting ${name}."
+ ${command} ${gnump3d_flags}
+ pid=`check_process ${command} ${command_interpreter}`
+ echo $pid > ${gnump3d_pidfile}
+ else
+ echo "${name} already running? (pid = $pid)"
+ fi
+}
+
+run_rc_command "$1"