Skip to content

Commit f09e6ee

Browse files
ocaml-csv: update to 2.4 (#11531)
1 parent e8717c7 commit f09e6ee

4 files changed

Lines changed: 219 additions & 52 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
--- ocaml-csv-2.4/csv-lwt.opam.orig 2019-12-09 04:56:42.000000000 -0700
2+
+++ ocaml-csv-2.4/csv-lwt.opam 2023-06-23 13:58:41.384729667 -0600
3+
@@ -17,7 +17,6 @@ depends: [
4+
"ocaml" {>= "4.03.0"}
5+
"csv"
6+
"dune"
7+
- "base-bytes"
8+
"base-unix"
9+
"lwt"
10+
]
11+
--- ocaml-csv-2.4/csv.opam.orig 2019-12-09 04:56:42.000000000 -0700
12+
+++ ocaml-csv-2.4/csv.opam 2023-06-23 13:58:23.352993247 -0600
13+
@@ -16,7 +16,6 @@ build: [
14+
depends: [
15+
"ocaml" {>= "4.03.0"}
16+
"dune"
17+
- "base-bytes"
18+
"base-unix"
19+
]
20+
synopsis: "A pure OCaml library to read and write CSV files"
21+
--- ocaml-csv-2.4/csvtool.opam.orig 2019-12-09 04:56:42.000000000 -0700
22+
+++ ocaml-csv-2.4/csvtool.opam 2023-06-23 13:58:58.456480116 -0600
23+
@@ -16,7 +16,6 @@ build: [
24+
depends: [
25+
"ocaml" {>= "4.03.0"}
26+
"dune"
27+
- "base-bytes"
28+
"base-unix"
29+
"csv" {= version}
30+
"uutf"
31+
--- ocaml-csv-2.4/lwt/dune.orig 2019-12-09 04:56:42.000000000 -0700
32+
+++ ocaml-csv-2.4/lwt/dune 2023-06-23 13:59:23.192117476 -0600
33+
@@ -3,7 +3,7 @@
34+
(public_name csv-lwt)
35+
(modules Csv_lwt Csv_utils)
36+
(flags :standard -safe-string)
37+
- (libraries bytes lwt lwt.unix csv)
38+
+ (libraries lwt lwt.unix csv)
39+
(synopsis "A pure OCaml library to read and write CSV files (LWT version)."))
40+
41+
(rule
42+
--- ocaml-csv-2.4/src/dune.orig 2019-12-09 04:56:42.000000000 -0700
43+
+++ ocaml-csv-2.4/src/dune 2023-06-23 14:00:03.303529442 -0600
44+
@@ -3,7 +3,6 @@
45+
(public_name csv)
46+
(modules Csv Csv_utils Csv_row)
47+
(flags :standard -safe-string)
48+
- (libraries bytes)
49+
(synopsis "A pure OCaml library to read and write CSV files."))
50+
51+
(rule
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Signatures": {
3-
"csv-1.7.tar.gz": "cf59cc44204dd91854537d1fbfe4e23dd8a9ef962c2ee18cc759106d9d703a7b"
3+
"ocaml-csv-2.4.tar.gz": "14b1173d2a64053e06571cbe4a86fa4be4b48ea190d1f0c389ce34fd9800c665"
44
}
55
}
6+

SPECS-EXTENDED/ocaml-csv/ocaml-csv.spec

Lines changed: 164 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
%global srcname csv
2+
13
Vendor: Microsoft Corporation
24
Distribution: Azure Linux
3-
Name: ocaml-csv
4-
Version: 1.7
5-
Release: 17%{?dist}
5+
Name: ocaml-%{srcname}
6+
Version: 2.4
7+
Release: 23%{?dist}
68
Summary: OCaml library for reading and writing CSV files
7-
License: LGPLv2+
9+
License: LGPL-2.1-only WITH OCaml-LGPL-linking-exception
810

911
URL: https://github.com/Chris00/ocaml-csv/
10-
Source0: https://github.com/Chris00/ocaml-csv/files/1394287/csv-1.7.tar.gz
12+
Source0: https://github.com/Chris00/ocaml-csv/archive/%{version}/%{name}-%{version}.tar.gz
13+
Patch0: %{name}-bytes.patch
1114

12-
BuildRequires: ocaml >= 4.00.1
13-
BuildRequires: ocaml-ocamlbuild
14-
BuildRequires: ocaml-ocamldoc
15-
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
16-
BuildRequires: ocaml-extlib-devel >= 1.5.3-2
17-
BuildRequires: gawk
15+
BuildRequires: ocaml >= 4.03.0
16+
BuildRequires: ocaml-dune
17+
BuildRequires: ocaml-uutf-devel
18+
BuildRequires: ocaml-lwt-devel
1819

1920

2021
%description
@@ -28,65 +29,179 @@ handling CSV files from shell scripts.
2829

2930
%package devel
3031
Summary: Development files for %{name}
31-
Requires: %{name} = %{version}-%{release}
32+
Requires: %{name}%{?_isa} = %{version}-%{release}
3233

3334

3435
%description devel
3536
The %{name}-devel package contains libraries and signature files for
3637
developing applications that use %{name}.
3738

3839

40+
%package lwt
41+
Summary: LWT bindings for %{name}
42+
Requires: %{name}%{?_isa} = %{version}-%{release}
43+
44+
45+
%description lwt
46+
The %{name}-lwt package contains LWT bindings for %{name}.
47+
48+
49+
%package lwt-devel
50+
Summary: LWT development files for %{name}
51+
Requires: %{name}-lwt%{?_isa} = %{version}-%{release}
52+
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
53+
Requires: ocaml-lwt-devel%{?_isa}
54+
55+
56+
%description lwt-devel
57+
The %{name}-devel package contains libraries and signature files for
58+
developing applications that use LWT with %{name}.
59+
60+
3961
%prep
40-
%setup -q -n csv-%{version}
62+
%autosetup -p1
4163

4264

4365
%build
44-
ocaml setup.ml -configure --prefix %{_prefix} --destdir $RPM_BUILD_ROOT --disable-tests
45-
ocaml setup.ml -build
66+
# _smp_mflags breaks the build for some reason.
67+
# https://github.com/Chris00/ocaml-csv/issues/34
68+
%dune_build -j1
4669

4770

4871
%install
49-
export DESTDIR=$RPM_BUILD_ROOT
50-
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
51-
mkdir -p $OCAMLFIND_DESTDIR
52-
53-
ocaml setup.ml -install
54-
55-
%ifarch %{ocaml_native_compiler}
56-
mkdir -p $DESTDIR%{_bindir}
57-
install -m 0755 csvtool.native $DESTDIR%{_bindir}/csvtool
58-
%endif
59-
60-
61-
%files
62-
%doc LICENSE.txt
63-
%{_libdir}/ocaml/csv
64-
%ifarch %{ocaml_native_compiler}
65-
%exclude %{_libdir}/ocaml/csv/*.a
66-
%exclude %{_libdir}/ocaml/csv/*.cmxa
67-
%exclude %{_libdir}/ocaml/csv/*.cmx
68-
%endif
69-
%exclude %{_libdir}/ocaml/csv/*.mli
72+
%dune_install -s
73+
74+
# Remove the csvtool META file and opam project
75+
rm -r %{buildroot}%{ocamldir}/csvtool
76+
77+
78+
%files -f .ofiles-csv
79+
%license LICENSE.md
7080
%{_bindir}/csvtool
7181

7282

73-
%files devel
74-
%doc AUTHORS.txt LICENSE.txt README.txt
75-
%ifarch %{ocaml_native_compiler}
76-
%{_libdir}/ocaml/csv/*.a
77-
%{_libdir}/ocaml/csv/*.cmxa
78-
%{_libdir}/ocaml/csv/*.cmx
79-
%endif
80-
%{_libdir}/ocaml/csv/*.mli
83+
%files devel -f .ofiles-csv-devel
84+
%doc CHANGES.md README.md
85+
86+
87+
%files lwt -f .ofiles-csv-lwt
88+
89+
90+
%files lwt-devel -f .ofiles-csv-lwt-devel
8191

8292

8393
%changelog
84-
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7-17
85-
- Switching to using full number for the 'Release' tag.
86-
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
94+
* Thu Dec 19 2024 Durga Jagadeesh Palli <v-dpalli@microsoft.com> - 2.4-23
95+
- Initial Azure Linux import from Fedora 41 (license: MIT)
96+
- License verified
97+
98+
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-22
99+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
100+
101+
* Wed Jun 19 2024 Richard W.M. Jones <rjones@redhat.com> - 2.4-21
102+
- OCaml 5.2.0 ppc64le fix
103+
104+
* Wed May 29 2024 Richard W.M. Jones <rjones@redhat.com> - 2.4-20
105+
- OCaml 5.2.0 for Fedora 41
106+
107+
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-19
108+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
109+
110+
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-18
111+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
112+
113+
* Mon Dec 18 2023 Richard W.M. Jones <rjones@redhat.com> - 2.4-17
114+
- Bump release and rebuild
115+
116+
* Mon Dec 18 2023 Richard W.M. Jones <rjones@redhat.com> - 2.4-16
117+
- OCaml 5.1.1 + s390x code gen fix for Fedora 40
118+
119+
* Tue Dec 12 2023 Richard W.M. Jones <rjones@redhat.com> - 2.4-15
120+
- OCaml 5.1.1 rebuild for Fedora 40
121+
122+
* Thu Oct 05 2023 Richard W.M. Jones <rjones@redhat.com> - 2.4-14
123+
- OCaml 5.1 rebuild for Fedora 40
124+
125+
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-13
126+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
127+
128+
* Wed Jul 12 2023 Richard W.M. Jones <rjones@redhat.com> - 2.4-12
129+
- OCaml 5.0 rebuild for Fedora 39
130+
131+
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 2.4-11
132+
- OCaml 5.0.0 rebuild
133+
- Patch out references to the bytes library
134+
135+
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 2.4-10
136+
- Rebuild OCaml packages for F38
137+
138+
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-9
139+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
140+
141+
* Thu Aug 18 2022 Jerry James <loganjerry@gmail.com> - 2.4-8
142+
- Bump and rebuild
143+
144+
* Mon Aug 8 2022 Jerry James <loganjerry@gmail.com> - 2.4-7
145+
- Rebuild for ocaml-lwt 5.6.1
146+
- Change license from LGPLv2+ to LGPL-2.1-only WITH OCaml-LGPL-linking-exception
147+
- Trim BuildRequires
148+
- Use new OCaml macros
149+
150+
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-6
151+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
152+
153+
* Sat Jun 18 2022 Richard W.M. Jones <rjones@redhat.com> - 2.4-5
154+
- OCaml 4.14.0 rebuild
155+
156+
* Fri Feb 04 2022 Richard W.M. Jones <rjones@redhat.com> - 2.4-4
157+
- OCaml 4.13.1 rebuild to remove package notes
158+
159+
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-3
160+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
161+
162+
* Tue Jan 04 2022 Richard W.M. Jones <rjones@redhat.com> - 2.4-2
163+
- Build and rebuild for new ocaml-lwt (RHBZ#2036637)
164+
165+
* Thu Oct 07 2021 Richard W.M. Jones <rjones@redhat.com> - 2.4-1
166+
- New upstream version 2.4
167+
- Add LWT bindings in new lwt/lwt-devel subpackages
168+
169+
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7-28
170+
- OCaml 4.13.1 build
171+
172+
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-27
173+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
174+
175+
* Mon Mar 1 15:56:23 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1.7-26
176+
- OCaml 4.12.0 build
177+
178+
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-25
179+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
180+
181+
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-24
182+
- OCaml 4.11.1 rebuild
183+
184+
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-23
185+
- OCaml 4.11.0 rebuild
186+
187+
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-22
188+
- Second attempt - Rebuilt for
189+
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
190+
191+
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-21
192+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
193+
194+
* Sat May 30 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-20
195+
- Rebuild for updated ocaml-extlib (RHBZ#1837823).
196+
197+
* Mon May 04 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-19
198+
- OCaml 4.11.0+dev2-2020-04-22 rebuild
199+
200+
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-18
201+
- OCaml 4.11.0 pre-release attempt 2
87202

88-
* Fri Feb 28 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-16.1
89-
- OCaml 4.10.0 final (Fedora 32).
203+
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-17
204+
- Update all OCaml dependencies for RPM 4.16.
90205

91206
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7-16
92207
- OCaml 4.10.0 final.

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14692,8 +14692,8 @@
1469214692
"type": "other",
1469314693
"other": {
1469414694
"name": "ocaml-csv",
14695-
"version": "1.7",
14696-
"downloadUrl": "https://github.com/Chris00/ocaml-csv/files/1394287/csv-1.7.tar.gz"
14695+
"version": "2.4",
14696+
"downloadUrl": "https://github.com/Chris00/ocaml-csv/archive/2.4/ocaml-csv-2.4.tar.gz"
1469714697
}
1469814698
}
1469914699
},

0 commit comments

Comments
 (0)