aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-10-07 22:35:12 +0800
committerpav <pav@FreeBSD.org>2006-10-07 22:35:12 +0800
commit587f6a025d9fb4145b5b23b4208d831e63c43006 (patch)
treeaf6068376b9ef98d9963ab383f4c28e56709ecb4
parente4434eaa0e51385d8be5e952658d1bd8fa3869cc (diff)
downloadfreebsd-ports-gnome-587f6a025d9fb4145b5b23b4208d831e63c43006.tar.gz
freebsd-ports-gnome-587f6a025d9fb4145b5b23b4208d831e63c43006.tar.zst
freebsd-ports-gnome-587f6a025d9fb4145b5b23b4208d831e63c43006.zip
- Add a command line option -d to specify configuration directory
PR: ports/102651 Submitted by: Aaron Gifford <astounding@gmail.com> Approved by: Kirk Strauser <kirk@strauser.com> (maintainer)
-rw-r--r--net-im/jabberd/Makefile2
-rw-r--r--net-im/jabberd/files/patch-tools-jabberd.in42
2 files changed, 43 insertions, 1 deletions
diff --git a/net-im/jabberd/Makefile b/net-im/jabberd/Makefile
index 6c6d6d0d68b0..c0c639088a57 100644
--- a/net-im/jabberd/Makefile
+++ b/net-im/jabberd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= jabberd
PORTVERSION= 2.0.11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-im
MASTER_SITES= http://jabberstudio.rediris.es/jabberd2/ \
http://jabberstudio.2nw.net/jabberd2/
diff --git a/net-im/jabberd/files/patch-tools-jabberd.in b/net-im/jabberd/files/patch-tools-jabberd.in
new file mode 100644
index 000000000000..00c37af3de79
--- /dev/null
+++ b/net-im/jabberd/files/patch-tools-jabberd.in
@@ -0,0 +1,42 @@
+--- tools/jabberd.in.orig Wed Jun 22 22:32:05 2005
++++ tools/jabberd.in Sat Oct 7 16:27:19 2006
+@@ -28,8 +28,7 @@
+ my $Bin = "@bindir@";
+ my $VERSION = "@VERSION@";
+ my $config_dir = "@sysconfdir@";
+-my $config = $config_dir."/jabberd.cfg";
+-$config = "internal" unless (-e $config);
++my $config = "jabberd.cfg";
+ my $debug = 0;
+ my $daemon = 0;
+ my $select = IO::Select->new();
+@@ -43,13 +42,20 @@
+ # Process the command line arguments
+ #-----------------------------------------------------------------------------
+ my %opts;
+-getopts("c:Dhb",\%opts);
++getopts("c:d:Dhb",\%opts);
+ &usage if exists($opts{h});
+ if (exists($opts{c}))
+ {
+ $config = $opts{c} if (defined($opts{c}) && ($opts{c} ne ""));
+ &usage() if (!defined($opts{c}) || ($opts{c} eq ""));
+ }
++if (exists($opts{d}))
++{
++ $config_dir = $opts{d} if (defined($opts{d}) && ($opts{d} ne ""));
++ &usage() if (!defined($opts{d}) || ($opts{d} eq ""));
++}
++$config = $config_dir.'/'.$config if ($config !~ /^\//);
++$config = "internal" unless (-e $config);
+
+ $debug = 1 if exists($opts{D});
+ $daemon = 1 if exists($opts{b});
+@@ -123,6 +129,7 @@
+ &debug("jabberd","stdout","debug on\n");
+ &debug("jabberd","stdout","version($VERSION)\n");
+ &debug("jabberd","stdout","config_dir($config_dir)\n");
++ &debug("jabberd","stdout","config($config)\n");
+ }
+
+ #-----------------------------------------------------------------------------