aboutsummaryrefslogtreecommitdiff
path: root/www/p5-RTx-Calendar
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2011-10-18 16:02:33 +0000
committerFlorian Smeets <flo@FreeBSD.org>2011-10-18 16:02:33 +0000
commitb7d14a42d51b8dc6503fc3ac91fdbce7882a552e (patch)
tree06d7bc865447749dc9578eff70cf330d8bd15e2e /www/p5-RTx-Calendar
parent77de1b7302643a67be5bce3c28cf5764fd158cf9 (diff)
downloadports-b7d14a42d51b8dc6503fc3ac91fdbce7882a552e.tar.gz
ports-b7d14a42d51b8dc6503fc3ac91fdbce7882a552e.zip
Notes
Diffstat (limited to 'www/p5-RTx-Calendar')
-rw-r--r--www/p5-RTx-Calendar/Makefile32
-rw-r--r--www/p5-RTx-Calendar/files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged79
-rw-r--r--www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html20
-rw-r--r--www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html52
-rw-r--r--www/p5-RTx-Calendar/pkg-plist2
5 files changed, 177 insertions, 8 deletions
diff --git a/www/p5-RTx-Calendar/Makefile b/www/p5-RTx-Calendar/Makefile
index 09a78995f9a1..6c130e285a5d 100644
--- a/www/p5-RTx-Calendar/Makefile
+++ b/www/p5-RTx-Calendar/Makefile
@@ -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>
diff --git a/www/p5-RTx-Calendar/files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged b/www/p5-RTx-Calendar/files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged
new file mode 100644
index 000000000000..a696739738e5
--- /dev/null
+++ b/www/p5-RTx-Calendar/files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged
@@ -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>
diff --git a/www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html b/www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html
new file mode 100644
index 000000000000..e953b3163eb6
--- /dev/null
+++ b/www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html
@@ -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)') &>
+
diff --git a/www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html b/www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html
new file mode 100644
index 000000000000..44702225b558
--- /dev/null
+++ b/www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html
@@ -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>
diff --git a/www/p5-RTx-Calendar/pkg-plist b/www/p5-RTx-Calendar/pkg-plist
index 675c22a05948..8e5ebc4a3076 100644
--- a/www/p5-RTx-Calendar/pkg-plist
+++ b/www/p5-RTx-Calendar/pkg-plist
@@ -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