mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
- Add missing patch for MULTIPLE_INSTANCES
PR: ports/112287 Submitted by: Sergey Prikhodko <sergey at network-asp.biz> Approved by: Vivek Khera <vivek at khera.org> (maintainer)
This commit is contained in:
parent
cfb04f7fa9
commit
8f38e7e51e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=194187
@ -108,6 +108,9 @@ BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/libperl.so:${PORTSDIR}/www/mod_perl
|
||||
${SITE_PERL}/${PERL_ARCH}/Apache/Request.pm:${PORTSDIR}/www/p5-libapreq
|
||||
.endif
|
||||
.endif
|
||||
.if defined(MULTIPLE_INSTANCES)
|
||||
EXTRA_PATCHES+= ${FILESDIR}/multiple*
|
||||
.endif
|
||||
|
||||
DB_TYPE?= mysql
|
||||
|
||||
|
15
www/rt36/files/multiple-bin-webmux_pl_in
Normal file
15
www/rt36/files/multiple-bin-webmux_pl_in
Normal file
@ -0,0 +1,15 @@
|
||||
--- bin/webmux.pl.in.orig Tue Sep 26 18:06:31 2006
|
||||
+++ bin/webmux.pl.in Mon Apr 30 23:04:45 2007
|
||||
@@ -63,6 +63,12 @@
|
||||
}
|
||||
|
||||
use lib ( "@LOCAL_LIB_PATH@", "@RT_LIB_PATH@" );
|
||||
+if ($ENV{RT_INSTANCE_PATH}) {
|
||||
+ lib->import("$ENV{RT_INSTANCE_PATH}/local/lib");
|
||||
+}
|
||||
+if ($ENV{RT_VENDOR_PATH}) {
|
||||
+ lib->import($ENV{RT_VENDOR_PATH});
|
||||
+}
|
||||
use RT;
|
||||
|
||||
package RT::Mason;
|
63
www/rt36/files/multiple-lib-RT_pm_in
Normal file
63
www/rt36/files/multiple-lib-RT_pm_in
Normal file
@ -0,0 +1,63 @@
|
||||
--- lib/RT.pm.in.orig Mon Nov 6 21:09:32 2006
|
||||
+++ lib/RT.pm.in Mon Apr 30 23:04:45 2007
|
||||
@@ -98,6 +98,60 @@
|
||||
# via the web interface)
|
||||
$MasonSessionDir = '@MASON_SESSION_PATH@';
|
||||
|
||||
+=item import
|
||||
+
|
||||
+Allow override of various internal paths.
|
||||
+
|
||||
+ RT->import (
|
||||
+ RT_INSTANCE_PATH => '/usr/local/rt/stuff',
|
||||
+ SITE_CONFIG_FILE => '/etc/stuff.pm',
|
||||
+ ...
|
||||
+ );
|
||||
+
|
||||
+If RT_INSTANCE_PATH is set in the arguments (or in %ENV)
|
||||
+then it replaces the old value of $BasePath in the following
|
||||
+variables:
|
||||
+ $SITE_CONFIG_FILE
|
||||
+ $LocalPath
|
||||
+ $LocalEtcPath
|
||||
+ $LocalLexiconPath
|
||||
+ $MasonLocalComponentRoot
|
||||
+ $MasonDataDir
|
||||
+ $MasonSessionDir
|
||||
+
|
||||
+Beyond that, those individual values can be set explicitly
|
||||
+by arguments.
|
||||
+
|
||||
+=cut
|
||||
+
|
||||
+sub import {
|
||||
+no strict 'refs';
|
||||
+ shift;
|
||||
+ my %args = @_;
|
||||
+ return unless ( scalar (keys %args) || $ENV{RT_INSTANCE_PATH} );
|
||||
+
|
||||
+ my @variables = qw (
|
||||
+ SITE_CONFIG_FILE
|
||||
+ LocalPath
|
||||
+ LocalEtcPath
|
||||
+ LocalLexiconPath
|
||||
+ MasonLocalComponentRoot
|
||||
+ MasonDataDir
|
||||
+ MasonSessionDir
|
||||
+ );
|
||||
+
|
||||
+ my $RT_INSTANCE_PATH = $args{RT_INSTANCE_PATH} || $ENV{RT_INSTANCE_PATH};
|
||||
+ if ($RT_INSTANCE_PATH) {
|
||||
+ foreach my $vref (@variables) {
|
||||
+ $$vref =~ s/^\Q$BasePath\E/$RT_INSTANCE_PATH/;
|
||||
+ }
|
||||
+ }
|
||||
+ foreach my $vref (@variables) {
|
||||
+ $$vref = $args{$vref} if defined ( $args{$vref} );
|
||||
+ }
|
||||
+
|
||||
+use strict 'refs';
|
||||
+}
|
||||
|
||||
|
||||
=head1 NAME
|
21
www/rt36/files/multiple-sbin-rt-setup-database_in
Normal file
21
www/rt36/files/multiple-sbin-rt-setup-database_in
Normal file
@ -0,0 +1,21 @@
|
||||
--- sbin/rt-setup-database.in.orig Fri Dec 1 20:59:26 2006
|
||||
+++ sbin/rt-setup-database.in Mon Apr 30 23:04:45 2007
|
||||
@@ -51,11 +51,17 @@
|
||||
|
||||
use lib "@LOCAL_LIB_PATH@";
|
||||
use lib "@RT_LIB_PATH@";
|
||||
+## RT_INSTANCE_PATH can be passed in environment.
|
||||
+## Can change where RT_SiteConfig is read from.
|
||||
+my $RT_INSTANCE_PATH;
|
||||
+BEGIN {
|
||||
+ $RT_INSTANCE_PATH = $ENV{RT_INSTANCE_PATH};
|
||||
+}
|
||||
|
||||
#This drags in RT's config.pm
|
||||
# We do it in a begin block because RT::Handle needs to know the type to do its
|
||||
# inheritance
|
||||
-use RT;
|
||||
+use RT (RT_INSTANCE_PATH => $RT_INSTANCE_PATH);
|
||||
use Carp;
|
||||
use RT::User;
|
||||
use RT::CurrentUser;
|
Loading…
Reference in New Issue
Block a user