Sync from SUSE:SLFO:Main perl-Date-Calc revision 9d673c6935d534890c4395e84ee8e49f

This commit is contained in:
Adrian Schröter 2024-05-03 18:02:44 +02:00
commit 4da6a36a97
6 changed files with 308 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
Date-Calc-6.4.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

20
cpanspec.yml Normal file
View File

@ -0,0 +1,20 @@
---
description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
patches:
fix2038.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: -
#./Build build flags=%{?_smp_mflags} --myflag

34
fix2038.patch Normal file
View File

@ -0,0 +1,34 @@
Date: 2023-03-17
Author: Bernhard M. Wiedemann
Fix year2038 issue
https://rt.cpan.org/Public/Bug/Display.html?id=102495
Index: Date-Calc-6.4/lib/Date/Calc/PP.pm
===================================================================
--- Date-Calc-6.4.orig/lib/Date/Calc/PP.pm
+++ Date-Calc-6.4/lib/Date/Calc/PP.pm
@@ -2057,21 +2057,13 @@ sub DateCalc_mktime
{
return 0 if
(
- ($year < 1970) or ($year > 2038) or
+ ($year < 1970) or
($month < 1) or ($month > 12) or
($day < 1) or ($day > 31) or
($hour < 0) or ($hour > 23) or
($min < 0) or ($min > 59) or
($sec < 0) or ($sec > 59)
);
- return 0 if
- (
- ($year == 2038) and ( ($month > 1) or
- ( ($month == 1) and ( ($day > 19) or
- ( ($day == 19) and ( ($hour > 3) or
- ( ($hour == 3) and ( ($min > 14) or
- ( ($min == 14) and ($sec > 7) ) )))))))
- );
}
$year -= 1900;
$month--;

160
perl-Date-Calc.changes Normal file
View File

@ -0,0 +1,160 @@
-------------------------------------------------------------------
Fri Mar 17 07:14:06 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add fix2038.patch to handle dates beyond year 2038
-------------------------------------------------------------------
Thu Apr 16 19:56:35 UTC 2015 - coolo@suse.com
- updated to 6.4
see /usr/share/doc/packages/perl-Date-Calc/CHANGES.txt
- remove upstream Date-Calc-6.3.diff
-------------------------------------------------------------------
Sun Jan 4 13:16:20 UTC 2015 - coolo@suse.com
- Date::Calc's parse logic puts 3.1.64 into 2064 if it's closer to
$NOW than 1964, which is the case since 1.1.2015
updated Date-Calc-6.3.diff for
https://rt.cpan.org/Public/Bug/Display.html?id=101232
-------------------------------------------------------------------
Mon Apr 15 11:02:18 UTC 2013 - idonmez@suse.com
- Add Source URL, see https://en.opensuse.org/SourceUrls
-------------------------------------------------------------------
Wed Feb 27 06:46:33 UTC 2013 - coolo@suse.com
- update license to new format
-------------------------------------------------------------------
Fri Nov 18 11:09:21 UTC 2011 - coolo@suse.com
- use original .tar.gz
-------------------------------------------------------------------
Wed Dec 1 09:44:31 UTC 2010 - coolo@novell.com
- switch to perl_requires macro
-------------------------------------------------------------------
Mon Nov 29 18:29:41 UTC 2010 - coolo@novell.com
- remove /var/adm/perl-modules
-------------------------------------------------------------------
Fri Feb 26 16:02:59 CET 2010 - anicka@suse.cz
- update to 6.3
* The language can now be set individually for each function
in "Date::Calc" that requires it (through a new optional
parameter; the default continues to be a global setting
for backward compatibility); the affected functions are:
"Decode_Month()", "Decode_Day_of_Week()", "Compressed_to_Text()",
"Date_to_Text()", "Date_to_Text_Long()", "Calendar()",
"Month_to_Text()", "Day_of_Week_to_Text()", "Day_of_Week_Abbreviation()",
"Decode_Date_EU()", "Decode_Date_US()", "Decode_Date_EU2()",
"Decode_Date_US2()", "Parse_Date()".
* BEWARE that the interface of "DateCalc.c" has changed!
* Module "Date::Calc::Object" has been changed similarly
* Module "Date::Calendar::Year" has also been adapted accordingly
* bugfixes
-------------------------------------------------------------------
Sun Jan 10 15:43:32 CET 2010 - jengelh@medozas.de
- enable parallel build
-------------------------------------------------------------------
Mon Aug 3 16:11:05 CEST 2009 - anicka@suse.cz
- update to 5.6
* Made the module MacOS X compatible
* Made some tiny changes to the documentation
-------------------------------------------------------------------
Wed Jan 25 21:39:37 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Aug 1 16:32:18 CEST 2005 - cthiel@suse.de
- added perl-Carp-Clan to neededforbuild
-------------------------------------------------------------------
Mon Aug 1 14:02:27 CEST 2005 - cthiel@suse.de
- update to version 5.4
-------------------------------------------------------------------
Sun Jan 11 11:17:13 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Fri Aug 22 14:29:02 CEST 2003 - mjancar@suse.cz
- require the perl version we build with
-------------------------------------------------------------------
Tue Jul 15 14:44:06 CEST 2003 - mjancar@suse.cz
- adapt to perl-5.8.1
- use %perl_process_packlist
-------------------------------------------------------------------
Mon May 26 15:17:14 CEST 2003 - mjancar@suse.cz
- remove Carp::Clan conflicting with perl-Bit-Vector
-------------------------------------------------------------------
Thu May 22 18:30:58 CEST 2003 - mjancar@suse.cz
- use $RPM_OPT_FLAGS
- use #!/usr/bin/perl instead of #!perl in examples
- package omited man page
- dont package MANIFEST
-------------------------------------------------------------------
Tue May 20 12:39:01 CEST 2003 - mjancar@suse.cz
- remove unpackaged files
-------------------------------------------------------------------
Thu Dec 19 18:41:38 CET 2002 - prehak@suse.cz
- updated to version 5.3
- added doc files, adjusted their permissions
-------------------------------------------------------------------
Tue Jul 2 17:40:06 MEST 2002 - mls@suse.de
- remove race in .packlist generation
-------------------------------------------------------------------
Tue Jan 22 14:21:24 CET 2002 - rvasice@suse.cz
- update to version 5.0
- actualize filelist
- use macros %{perl_sitearch}, %{perl_archlib}, %{_prefix}
- added make test
-------------------------------------------------------------------
Mon Nov 6 18:38:01 CET 2000 - grimmer@suse.de
- renamed from perl_dc to perl-Date-Calc
- update to Version 4.3
- spec file cleanups (macros, BuildRoot)
-------------------------------------------------------------------
Fri Jan 21 13:25:02 CET 2000 - ro@suse.de
- fixed filelist
-------------------------------------------------------------------
Thu Oct 28 15:21:57 CEST 1999 - tmg@suse.de
- created package (Date-Calc-4.2)

68
perl-Date-Calc.spec Normal file
View File

@ -0,0 +1,68 @@
#
# spec file for package perl-Date-Calc
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-Date-Calc
Version: 6.4
Release: 0
%define cpan_name Date-Calc
Summary: Gregorian calendar date calculations
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Date-Calc/
Source0: http://www.cpan.org/authors/id/S/ST/STBEY/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
Patch0: fix2038.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Bit::Vector) >= 7.4
BuildRequires: perl(Carp::Clan) >= 6.04
Requires: perl(Bit::Vector) >= 7.4
Requires: perl(Carp::Clan) >= 6.04
Recommends: perl(Date::Calc::XS) >= 6.4
%{perl_requires}
%description
* *
'use Date::Calc qw( Days_in_Year Days_in_Month ... );'
* *
%prep
%setup -q -n %{cpan_name}-%{version}
%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc CHANGES.txt CREDITS.txt README.txt
%changelog