About five years ago, DateTime::Util::Astro became DateTime::Astro, and

DateTime::Event::SolarTerm was incorporated in it. Clean up.

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2016-03-07 17:48:14 +00:00
parent c00818c0fc
commit 24205493cc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=410535
13 changed files with 132 additions and 73 deletions

2
MOVED
View file

@ -8223,3 +8223,5 @@ devel/seed||2016-03-06|Has expired: No longer used
devel/seed3||2016-03-06|Has expired: No longer used
audio/waheela||2016-03-06|Has expired: Distfiles unavailable and no updates in 6 years
sysutils/logstash-contrib||2016-03-06|Has expired: Upstream now distributing plugins separately: see https://github.com/logstash-plugins
devel/p5-DateTime-Event-SolarTerm|devel/p5-DateTime-Astro|2016-03-07|Has been part of DateTime-Astro for a long time
devel/p5-DateTime-Util-Astro|devel/p5-DateTime-Astro|2016-03-07|Has been part of DateTime-Astro for a long time

View file

@ -2072,7 +2072,6 @@
SUBDIR += p5-DateTime-Event-NameDay
SUBDIR += p5-DateTime-Event-Random
SUBDIR += p5-DateTime-Event-Recurrence
SUBDIR += p5-DateTime-Event-SolarTerm
SUBDIR += p5-DateTime-Event-Sunrise
SUBDIR += p5-DateTime-Event-Zodiac
SUBDIR += p5-DateTime-Fiscal-Year
@ -2111,7 +2110,6 @@
SUBDIR += p5-DateTime-TimeZone
SUBDIR += p5-DateTime-TimeZone-Alias
SUBDIR += p5-DateTime-TimeZone-LMT
SUBDIR += p5-DateTime-Util-Astro
SUBDIR += p5-DateTime-Util-Calc
SUBDIR += p5-DateTimeX-Easy
SUBDIR += p5-Debug-Client

View file

@ -3,7 +3,7 @@
PORTNAME= DateTime-Event-Lunar
PORTVERSION= 0.06
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:DMAKI
@ -14,7 +14,7 @@ COMMENT= Compute Lunar Events
BUILD_DEPENDS= p5-DateTime>=0:${PORTSDIR}/devel/p5-DateTime \
p5-DateTime-Set>=0:${PORTSDIR}/devel/p5-DateTime-Set \
p5-DateTime-Util-Astro>=0.10:${PORTSDIR}/devel/p5-DateTime-Util-Astro \
p5-DateTime-Astro>=1.00:${PORTSDIR}/devel/p5-DateTime-Astro \
p5-Math-Round>=0:${PORTSDIR}/math/p5-Math-Round
RUN_DEPENDS:= ${BUILD_DEPENDS}

View file

@ -0,0 +1,14 @@
--- Makefile.PL.orig 2007-05-27 15:43:06 UTC
+++ Makefile.PL
@@ -6,8 +6,8 @@ all_from('lib/DateTime/Event/Lunar.pm');
requires 'DateTime';
requires 'DateTime::Set';
-requires 'DateTime::Util::Astro' => 0.10;
+requires 'DateTime::Astro' => 1.00;
requires 'Math::Round';
auto_install;
-WriteAll;
\ No newline at end of file
+WriteAll;

View file

@ -0,0 +1,114 @@
--- lib/DateTime/Event/Lunar.pm.orig 2007-05-27 15:50:16 UTC
+++ lib/DateTime/Event/Lunar.pm
@@ -11,7 +11,7 @@ use DateTime::Set;
use DateTime::Util::Calc qw(
min max search_next moment dt_from_moment mod binary_search
);
-use DateTime::Util::Astro::Moon qw(MEAN_SYNODIC_MONTH);
+use DateTime::Astro qw(MEAN_SYNODIC_MONTH);
use Exporter;
use Math::Round qw(round);
BEGIN {
@@ -26,7 +26,7 @@ use constant NEW_MOON => 0;
use constant FIRST_QUARTER => 90;
use constant FULL_MOON => 180;
use constant LAST_QUARTER => 270;
-use constant ZEROTH_NEW_MOON => DateTime::Util::Astro::Moon::nth_new_moon(0);
+use constant ZEROTH_NEW_MOON => DateTime::Astro::nth_new_moon(0);
sub _new
{
@@ -81,19 +81,19 @@ sub new_moon_before
my $dt = $args{datetime};
return $dt if $dt->is_infinite;
- my $phi = DateTime::Util::Astro::Moon::lunar_phase($dt);
+ my $phi = DateTime::Astro::lunar_phase($dt);
my $n = round( (moment($dt) - moment(ZEROTH_NEW_MOON)) /
MEAN_SYNODIC_MONTH - $phi / 360 );
my $nm_index = search_next(
base => $n,
check => sub {
- my $p = DateTime::Util::Astro::Moon::nth_new_moon($_[0]);
+ my $p = DateTime::Astro::nth_new_moon($_[0]);
$args{on_or_before} ? $p <= $dt : $p < $dt
},
next => sub { $_[0] - 1 }
);
- my $rv = DateTime::Util::Astro::Moon::nth_new_moon($nm_index);
+ my $rv = DateTime::Astro::nth_new_moon($nm_index);
$rv->set_time_zone($dt->time_zone);
return $rv;
}
@@ -106,18 +106,18 @@ sub new_moon_after
my $dt = $args{datetime};
return $dt if $dt->is_infinite;
- my $phi = DateTime::Util::Astro::Moon::lunar_phase($dt);
+ my $phi = DateTime::Astro::lunar_phase($dt);
my $n = round( (moment($dt) - moment(ZEROTH_NEW_MOON)) /
MEAN_SYNODIC_MONTH - $phi / 360 );
my $nm_index = search_next(
base => $n,
check => sub {
- my $p = DateTime::Util::Astro::Moon::nth_new_moon($_[0]);
+ my $p = DateTime::Astro::nth_new_moon($_[0]);
$args{on_or_after} ? $p >= $dt : $p > $dt },
next => sub { $_[0] + 1 }
);
- my $rv = DateTime::Util::Astro::Moon::nth_new_moon($nm_index);
+ my $rv = DateTime::Astro::nth_new_moon($nm_index);
$rv->set_time_zone($dt->time_zone);
return $rv;
}
@@ -136,13 +136,13 @@ sub lunar_phase_before
my $dt_moment = moment($dt);
my $tau = $dt_moment - MEAN_SYNODIC_MONTH_FRAG *
- mod(DateTime::Util::Astro::Moon::lunar_phase($dt) - $phi, 360);
+ mod(DateTime::Astro::lunar_phase($dt) - $phi, 360);
my $l = $tau - 2;
my $u = min($dt_moment, $tau + 2);
my $moment = binary_search($l, $u,
sub { abs($_[0] - $_[1]) <= LUNAR_PHASE_DELTA },
- sub { mod(DateTime::Util::Astro::Moon::lunar_phase(
+ sub { mod(DateTime::Astro::lunar_phase(
dt_from_moment($_[0])) - $phi, 360) < 180 } );
my $rv = dt_from_moment($moment);
$rv->set_time_zone($dt->time_zone);
@@ -156,20 +156,20 @@ sub lunar_phase_after
my %args = @_; # datetime => $dt, phase => $phase, on_or_after => $boolean
my($dt, $phi) = ($args{datetime}, $args{phase});
- my $current_phase = DateTime::Util::Astro::Moon::lunar_phase($dt);
+ my $current_phase = DateTime::Astro::lunar_phase($dt);
return $dt if $dt->is_infinite;
my $dt_moment = moment($dt);
my $tau =
$dt_moment + MEAN_SYNODIC_MONTH_FRAG *
- mod($phi - DateTime::Util::Astro::Moon::lunar_phase($dt), 360)
+ mod($phi - DateTime::Astro::lunar_phase($dt), 360)
;
my $l = max($dt_moment, $tau - 2);
my $u = $tau + 2;
my $rv_moment = binary_search($l, $u,
sub { abs($_[0] - $_[1]) <= LUNAR_PHASE_DELTA },
- sub { mod(DateTime::Util::Astro::Moon::lunar_phase(
+ sub { mod(DateTime::Astro::lunar_phase(
dt_from_moment($_[0])) - $phi, 360) < 180 } );
my $rv = dt_from_moment($rv_moment);
@@ -365,7 +365,6 @@ See http://www.perl.com/perl/misc/Artist
L<DateTime>
L<DateTime::Set>
L<DateTime::Span>
-L<DateTime::Util::Astro::Moon>
-L<DateTime::Util::Astro::Sun>
+L<DateTime::Astro>
=cut

View file

@ -1,27 +0,0 @@
# Created by: Masahiro Teramoto <markun@onohara.to>
# $FreeBSD$
PORTNAME= DateTime-Event-SolarTerm
PORTVERSION= 0.05
PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:DMAKI
PKGNAMEPREFIX= p5-
MAINTAINER= markun@onohara.to
COMMENT= DateTime Extension to Calculate Solar Terms
BUILD_DEPENDS= p5-DateTime>=0:${PORTSDIR}/devel/p5-DateTime \
p5-DateTime-Set>=0:${PORTSDIR}/devel/p5-DateTime-Set \
p5-DateTime-Util-Calc>=0.12:${PORTSDIR}/devel/p5-DateTime-Util-Calc \
p5-DateTime-Util-Astro>=0.11:${PORTSDIR}/devel/p5-DateTime-Util-Astro
RUN_DEPENDS= p5-DateTime>=0:${PORTSDIR}/devel/p5-DateTime \
p5-DateTime-Set>=0:${PORTSDIR}/devel/p5-DateTime-Set \
p5-DateTime-Util-Calc>=0.12:${PORTSDIR}/devel/p5-DateTime-Util-Calc \
p5-DateTime-Util-Astro>=0.11:${PORTSDIR}/devel/p5-DateTime-Util-Astro
USES= perl5
USE_PERL5= configure
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (DateTime-Event-SolarTerm-0.05.tar.gz) = 947693e327a983b68847f433e589e0ab56eb8d360548c5be4404ae82a79cff4e
SIZE (DateTime-Event-SolarTerm-0.05.tar.gz) = 24735

View file

@ -1,3 +0,0 @@
DateTime Extension to Calculate Solar Terms
WWW: http://search.cpan.org/dist/DateTime-Event-SolarTerm/

View file

@ -1,2 +0,0 @@
%%SITE_PERL%%/DateTime/Event/SolarTerm.pm
%%PERL5_MAN3%%/DateTime::Event::SolarTerm.3.gz

View file

@ -1,22 +0,0 @@
# Created by: Masahiro Teramoto <markun@onohara.to>
# $FreeBSD$
PORTNAME= DateTime-Util-Astro
PORTVERSION= 0.12000
PORTREVISION= 2
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= markun@onohara.to
COMMENT= Utilities for Astronomical Calculations
BUILD_DEPENDS= p5-Class-Data-Inheritable>=0:${PORTSDIR}/devel/p5-Class-Data-Inheritable \
p5-DateTime>=0:${PORTSDIR}/devel/p5-DateTime \
p5-DateTime-Util-Calc>=0.13:${PORTSDIR}/devel/p5-DateTime-Util-Calc
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= perl5
USE_PERL5= configure
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (DateTime-Util-Astro-0.12000.tar.gz) = af0bce802b5164a9a71ad69d18213a846f5573690ca3df959dc5669754d9086e
SIZE (DateTime-Util-Astro-0.12000.tar.gz) = 31426

View file

@ -1,3 +0,0 @@
Utilities for Astronomical Calculations
WWW: http://search.cpan.org/dist/DateTime-Util-Astro/

View file

@ -1,8 +0,0 @@
%%SITE_PERL%%/DateTime/Util/Astro/Common.pm
%%SITE_PERL%%/DateTime/Util/Astro/Moon.pm
%%SITE_PERL%%/DateTime/Util/Astro/Sun.pm
%%SITE_PERL%%/DateTime/Util/Astro.pm
%%PERL5_MAN3%%/DateTime::Util::Astro.3.gz
%%PERL5_MAN3%%/DateTime::Util::Astro::Common.3.gz
%%PERL5_MAN3%%/DateTime::Util::Astro::Moon.3.gz
%%PERL5_MAN3%%/DateTime::Util::Astro::Sun.3.gz