mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
- Add support for www/rt40
* Patches for 4.0.x compatibility obtained from https://github.com/bestpractical/rtx-calendar - Add license - Pet portlint PR: ports/160976 Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
This commit is contained in:
parent
77de1b7302
commit
b7d14a42d5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=283827
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= RTx-Calendar
|
||||
PORTVERSION= 0.08
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= www perl5
|
||||
MASTER_SITES= CPAN
|
||||
PKGNAMEPREFIX= p5-
|
||||
@ -15,28 +15,44 @@ PKGNAMEPREFIX= p5-
|
||||
MAINTAINER= m.seaman@infracaninophile.co.uk
|
||||
COMMENT= Calendar extension module for the RT ticketing system
|
||||
|
||||
LICENSE_COMB= dual
|
||||
LICENSE= ART10 GPLv1
|
||||
|
||||
BUILD_DEPENDS= ${SITE_PERL}/Date/ICal.pm:${PORTSDIR}/devel/p5-Date-ICal \
|
||||
${SITE_PERL}/Data/ICal.pm:${PORTSDIR}/deskutils/p5-Data-ICal \
|
||||
${SITE_PERL}/DateTime/Set.pm:${PORTSDIR}/devel/p5-DateTime-Set
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
RTHOME?= share/rt38
|
||||
RT_PM_DIR= ${SITE_PERL}
|
||||
BUILD_DEPENDS+= ${RT_PM_DIR}/RT.pm:${PORTSDIR}/www/rt38
|
||||
OPTIONS= RT38 "Install for rt-3.8.x (default rt-4.0.x)" off
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if defined(WITH_RT38)
|
||||
RT_VER= 38
|
||||
.else
|
||||
RT_VER= 40
|
||||
.endif
|
||||
|
||||
BUILD_DEPENDS+= ${SITE_PERL}/RT.pm:${PORTSDIR}/www/rt${RT_VER}
|
||||
RUN_DEPENDS+= ${SITE_PERL}/RT.pm:${PORTSDIR}/www/rt${RT_VER}
|
||||
|
||||
MAN3PREFIX= ${PREFIX}
|
||||
|
||||
MAN3= RTx::Calendar.3
|
||||
PLIST_SUB+= RTHOME=${RTHOME}
|
||||
PLIST_SUB+= RTHOME=share/rt${RT_VER}
|
||||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name '*.orig' -delete
|
||||
|
||||
# Note: You can install using an arbitrary $PREFIX but only if it
|
||||
# matches the $PREFIX used to install www/rt3{6,8}. Hence ignore
|
||||
# matches the $PREFIX used to install www/rt{38,40}. Hence ignore
|
||||
# $PREFIX in the environment and inherit settings from RT.pm
|
||||
do-configure:
|
||||
@cd ${CONFIGURE_WRKSRC} && \
|
||||
unset PREFIX && \
|
||||
${SETENV} ${CONFIGURE_ENV} ${PERL5} -I${RT_PM_DIR} ./${CONFIGURE_SCRIPT} && \
|
||||
${SETENV} ${CONFIGURE_ENV} ${PERL5} -I${SITE_PERL} ./${CONFIGURE_SCRIPT} && \
|
||||
${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -0,0 +1,79 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged.orig
|
||||
+++ html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
|
||||
@@ -0,0 +1,73 @@
|
||||
+%# BEGIN BPS TAGGED BLOCK {{{
|
||||
+%#
|
||||
+%# COPYRIGHT:
|
||||
+%#
|
||||
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
|
||||
+%# <jesse@bestpractical.com>
|
||||
+%#
|
||||
+%# (Except where explicitly superseded by other copyright notices)
|
||||
+%#
|
||||
+%#
|
||||
+%# LICENSE:
|
||||
+%#
|
||||
+%# This work is made available to you under the terms of Version 2 of
|
||||
+%# the GNU General Public License. A copy of that license should have
|
||||
+%# been provided with this software, but in any event can be snarfed
|
||||
+%# from www.gnu.org.
|
||||
+%#
|
||||
+%# This work is distributed in the hope that it will be useful, but
|
||||
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+%# General Public License for more details.
|
||||
+%#
|
||||
+%# You should have received a copy of the GNU General Public License
|
||||
+%# along with this program; if not, write to the Free Software
|
||||
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
+%# 02110-1301 or visit their web page on the internet at
|
||||
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
|
||||
+%#
|
||||
+%#
|
||||
+%# CONTRIBUTION SUBMISSION POLICY:
|
||||
+%#
|
||||
+%# (The following paragraph is not intended to limit the rights granted
|
||||
+%# to you to modify and distribute this software under the terms of
|
||||
+%# the GNU General Public License and is only of importance to you if
|
||||
+%# you choose to contribute your changes and enhancements to the
|
||||
+%# community by submitting them to Best Practical Solutions, LLC.)
|
||||
+%#
|
||||
+%# By intentionally submitting any modifications, corrections or
|
||||
+%# derivatives to this work, or any other work intended for use with
|
||||
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
|
||||
+%# you are the copyright holder for those contributions and you grant
|
||||
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
|
||||
+%# royalty-free, perpetual, license to use, copy, create derivative
|
||||
+%# works based on those contributions, and sublicense and distribute
|
||||
+%# those contributions and any derivatives thereof.
|
||||
+%#
|
||||
+%# END BPS TAGGED BLOCK }}}
|
||||
+<%INIT>
|
||||
+my $request_path = $HTML::Mason::Commands::r->path_info;
|
||||
+
|
||||
+my $query_string = sub {
|
||||
+ my %args = @_;
|
||||
+ my $u = URI->new();
|
||||
+ $u->query_form(%args);
|
||||
+ return $u->query;
|
||||
+};
|
||||
+
|
||||
+if ( $request_path =~ qr{^/Search/} && $m->request_args->{Query} ) {
|
||||
+ my $tabs = PageMenu;
|
||||
+ $tabs->child( 'calendar' => title => loc('Calendar'),
|
||||
+ path => '/Search/Calendar.html?' . $query_string->(
|
||||
+ %{$m->request_args} ) );
|
||||
+}
|
||||
+
|
||||
+my $about_me = Menu->child( 'preferences' );
|
||||
+my $settings = $about_me ? $about_me->child('settings') : undef;
|
||||
+
|
||||
+if ( $settings ) {
|
||||
+ $settings->child( 'calendar' => title => loc('Calendar'),
|
||||
+ path => '/Prefs/Calendar.html' );
|
||||
+}
|
||||
+
|
||||
+</%INIT>
|
20
www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html
Normal file
20
www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- html/Prefs/Calendar.html.orig
|
||||
+++ html/Prefs/Calendar.html
|
||||
@@ -6,10 +6,14 @@
|
||||
</%args>
|
||||
|
||||
<& /Elements/Header, Title => $title &>
|
||||
+% if ( $m->comp_exists( '/User/Elements/Tabs' ) ) {
|
||||
<& /User/Elements/Tabs,
|
||||
current_tab => 'Prefs/Calendar.html',
|
||||
Title => $title
|
||||
&>
|
||||
+% } else {
|
||||
+<& /Elements/Tabs &>
|
||||
+% }
|
||||
|
||||
<&| /Widgets/TitleBox, title => loc('ICal Feeds (ics)') &>
|
||||
|
52
www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html
Normal file
52
www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
$FreeBSD$
|
||||
|
||||
--- html/Search/Calendar.html.orig
|
||||
+++ html/Search/Calendar.html
|
||||
@@ -10,9 +10,15 @@
|
||||
</%args>
|
||||
|
||||
<& /Elements/Header, Title => $title &>
|
||||
+
|
||||
+% if ( $m->comp_exists( '/Ticket/Elements/Tabs' ) ) {
|
||||
<& /Ticket/Elements/Tabs,
|
||||
current_tab => "Search/Calendar.html?$QueryString",
|
||||
Title => $title &>
|
||||
+% } else {
|
||||
+ <& /Elements/Tabs &>
|
||||
+% }
|
||||
+
|
||||
<&| /Widgets/TitleBox,
|
||||
title => loc('Calendar for ') . $rtdate->GetMonth($Month) . " $Year" ,
|
||||
title_class=> 'inverse',
|
||||
@@ -26,7 +32,7 @@
|
||||
% $PYear--;
|
||||
% $PMonth = 11;
|
||||
% }
|
||||
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">«<%$rtdate->GetMonth($PMonth)%></a>
|
||||
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">?<%$rtdate->GetMonth($PMonth)%></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="<%$RT::WebPath%>/Prefs/Calendar.html">Calendar Preferences and Help</a>
|
||||
@@ -37,7 +43,7 @@
|
||||
% $NYear++;
|
||||
% $NMonth = 0;
|
||||
% }
|
||||
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>»</a>
|
||||
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>?</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -77,10 +83,10 @@
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">«<%$rtdate->GetMonth($PMonth)%></a>
|
||||
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">?<%$rtdate->GetMonth($PMonth)%></a>
|
||||
</td>
|
||||
<td align="right">
|
||||
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>»</a>
|
||||
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>?</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -17,6 +17,7 @@
|
||||
%%RTHOME%%/plugins/RTx-Calendar/html/Elements/CalendarEvent
|
||||
%%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/User/Elements/Tabs/Default
|
||||
%%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Ticket/Elements/Tabs/Default
|
||||
%%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
|
||||
%%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Elements/Header/Head
|
||||
man/auto/RTx/Calendar/.packlist
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/lib/RTx
|
||||
@ -35,6 +36,7 @@ man/auto/RTx/Calendar/.packlist
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Ticket/Elements/Tabs
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Ticket/Elements
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Ticket
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Elements/Tabs
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Elements/Header
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar/Elements
|
||||
@dirrm %%RTHOME%%/plugins/RTx-Calendar/html/Callbacks/RTx-Calendar
|
||||
|
Loading…
Reference in New Issue
Block a user