Bug 160976 - [maintainer] www/p5-RTx-Calendar -- drop rt36, add rt40
Summary: [maintainer] www/p5-RTx-Calendar -- drop rt36, add rt40
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florian Smeets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-24 16:40 UTC by Matthew Seaman
Modified: 2011-10-18 17:10 UTC (History)
0 users

See Also:


Attachments
p5-RTx-Calendar.diff (17.16 KB, patch)
2011-09-24 16:40 UTC, Matthew Seaman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Seaman 2011-09-24 16:40:05 UTC
This is dependent on ports/160901 being committed

Drop support for RT version 3.6.x (www/rt36 port expires as of 2011-09-30)

Add support for RT version 4.0.2

   * Patches for 4.0.x compatibility obtained from
     https://github.com/bestpractical/rtx-calendar

Add license

Pet portlint

Files removed:

    pkg-plist.rt36

Files renamed

   pkg-plist.rt38 to pkg-plist
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-09-24 16:40:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

perl@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Matthew Seaman 2011-09-24 17:11:01 UTC
On 24/09/2011 16:39, Matthew Seaman wrote:
> Files removed:
> 
>     pkg-plist.rt36
> 
> Files renamed
> 
>    pkg-plist.rt38 to pkg-plist
> 


Oops -- forgot to mention

Files added

    files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged
    files/patch-html_Prefs_Calendar.html
    files/patch-html_Search_Calendar.html

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


Comment 3 Matthew Seaman 2011-09-26 22:40:16 UTC
Updated patch accouting for dougb@'s commits earlier today

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/p5-RTx-Calendar/Makefile,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile
--- Makefile	26 Sep 2011 20:01:01 -0000	1.12
+++ Makefile	26 Sep 2011 21:19:46 -0000
@@ -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 @@
 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>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/www/p5-RTx-Calendar/pkg-plist,v
retrieving revision 1.3
diff -u -u -r1.3 pkg-plist
--- pkg-plist	26 Sep 2011 20:01:01 -0000	1.3
+++ pkg-plist	26 Sep 2011 21:19:46 -0000
@@ -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 @@
 @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
Index: files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged
===================================================================
RCS file: files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged
diff -N files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged	26 Sep 2011 21:19:46 -0000
@@ -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>
Index: files/patch-html_Prefs_Calendar.html
===================================================================
RCS file: files/patch-html_Prefs_Calendar.html
diff -N files/patch-html_Prefs_Calendar.html
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-html_Prefs_Calendar.html	26 Sep 2011 21:19:46 -0000
@@ -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)') &>
+ 
Index: files/patch-html_Search_Calendar.html
===================================================================
RCS file: files/patch-html_Search_Calendar.html
diff -N files/patch-html_Search_Calendar.html
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-html_Search_Calendar.html	26 Sep 2011 21:19:46 -0000
@@ -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>

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW
Comment 4 Florian Smeets freebsd_committer freebsd_triage 2011-10-18 09:59:05 UTC
Responsible Changed
From-To: perl->flo

I'll take it.
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-10-18 17:02:53 UTC
flo         2011-10-18 16:02:33 UTC

  FreeBSD ports repository

  Modified files:
    www/p5-RTx-Calendar  Makefile pkg-plist 
  Added files:
    www/p5-RTx-Calendar/files 
                              patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged 
                              patch-html_Prefs_Calendar.html 
                              patch-html_Search_Calendar.html 
  Log:
  - 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)
  
  Revision  Changes    Path
  1.13      +24 -8     ports/www/p5-RTx-Calendar/Makefile
  1.1       +79 -0     ports/www/p5-RTx-Calendar/files/patch-html_Callbacks_RTx-Calendar_Elements_Tabs_Privileged (new)
  1.1       +20 -0     ports/www/p5-RTx-Calendar/files/patch-html_Prefs_Calendar.html (new)
  1.1       +52 -0     ports/www/p5-RTx-Calendar/files/patch-html_Search_Calendar.html (new)
  1.4       +2 -0      ports/www/p5-RTx-Calendar/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Florian Smeets freebsd_committer freebsd_triage 2011-10-18 17:05:28 UTC
State Changed
From-To: open->closed

Committed. Thanks!