Gentoo Archives: gentoo-commits

From: Mark Wright <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocamlweb/, dev-ml/ocamlweb/files/
Date: Tue, 13 Oct 2020 12:54:28
Message-Id: 1602593629.91ea1ee6f5e63abcf31fea6f173a8ba14f225c3e.gienah@gentoo
1 commit: 91ea1ee6f5e63abcf31fea6f173a8ba14f225c3e
2 Author: Mark Wright <gienah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 13 12:18:53 2020 +0000
4 Commit: Mark Wright <gienah <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 13 12:53:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91ea1ee6
7
8 dev-ml/ocamlweb: Bump to 1.41
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Mark Wright <gienah <AT> gentoo.org>
12
13 dev-ml/ocamlweb/Manifest | 1 +
14 .../files/ocamlweb-1.41-ocaml-4.08.0.patch | 53 ++++++++++++++++++++++
15 dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch | 17 +++++++
16 dev-ml/ocamlweb/metadata.xml | 5 +-
17 dev-ml/ocamlweb/ocamlweb-1.41.ebuild | 33 ++++++++++++++
18 5 files changed, 108 insertions(+), 1 deletion(-)
19
20 diff --git a/dev-ml/ocamlweb/Manifest b/dev-ml/ocamlweb/Manifest
21 index ca143964703..90aa548d553 100644
22 --- a/dev-ml/ocamlweb/Manifest
23 +++ b/dev-ml/ocamlweb/Manifest
24 @@ -1 +1,2 @@
25 DIST ocamlweb-1.39.tar.gz 141866 BLAKE2B 14ab9c595133d34d9711da2232fdf6a89a7b134ec2537e70d6ee6ecbfdb19a8bfb6a1a7aed6207cbb1bbe1f5e7b651d33fed35d8f26129d69e29dc5995d5c342 SHA512 f4e2d330222378b632ace70efb7062c93002a85db6dc9a821706a76a1e1c00da4d4e82e618f162584003b821bc72d2d11508ae22474db61cc4367ed528d21d50
26 +DIST ocamlweb-1.41.tar.gz 141844 BLAKE2B b89b20bdc8b99d34069b2e32a6bd8c9684e294fba667a4b74080b34f37c6d90432c61e71e27f4f1772cda8a26891655bd99a21defa584f4a1c68ae1e0d58d454 SHA512 7a6403f8b0de3feeef9657e8aff10e6f1fe29edc400ce3f11c6435d6350314423fb74e192e4275a9ad47170019d6a960daf74f245539f0f3f2a6072cc7195442
27
28 diff --git a/dev-ml/ocamlweb/files/ocamlweb-1.41-ocaml-4.08.0.patch b/dev-ml/ocamlweb/files/ocamlweb-1.41-ocaml-4.08.0.patch
29 new file mode 100644
30 index 00000000000..b8da9e02b03
31 --- /dev/null
32 +++ b/dev-ml/ocamlweb/files/ocamlweb-1.41-ocaml-4.08.0.patch
33 @@ -0,0 +1,53 @@
34 +From: Stephane Glondu <steph@××××××.net>
35 +Date: Fri, 6 Sep 2019 09:53:22 +0200
36 +Subject: Fix compilation with OCaml 4.08.0
37 +
38 +---
39 + web.ml | 18 ++++++++++--------
40 + 1 file changed, 10 insertions(+), 8 deletions(-)
41 +
42 +diff --git a/web.ml b/web.ml
43 +index 7dc1470..6f9ca51 100644
44 +--- a/web.ml
45 ++++ b/web.ml
46 +@@ -247,14 +247,16 @@ let norm_string s =
47 +
48 + let alpha_string s1 s2 =
49 + match what_is_first_char s1, what_is_first_char s2 with
50 +- | Symbol, Symbol -> s1 < s2
51 +- | Symbol, _ -> true
52 +- | _, Symbol -> false
53 +- | _,_ -> norm_string s1 < norm_string s2
54 ++ | Symbol, Symbol -> compare s1 s2
55 ++ | Symbol, _ -> -1
56 ++ | _, Symbol -> 1
57 ++ | _,_ -> compare (norm_string s1) (norm_string s2)
58 ++
59 ++let ( ++ ) c1 c2 =
60 ++ if c1 = 0 then c2 else c1
61 +
62 + let order_entry e1 e2 =
63 +- (alpha_string e1.e_name e2.e_name) ||
64 +- (e1.e_name = e2.e_name && e1.e_type < e2.e_type)
65 ++ alpha_string e1.e_name e2.e_name ++ compare e1.e_type e2.e_type
66 +
67 + (*s The following function collects all the index entries and sort them
68 + using [alpha_string], returning a list. *)
69 +@@ -264,7 +266,7 @@ module Idset = Set.Make(struct type t = index_entry let compare = compare end)
70 + let all_entries () =
71 + let s = Idmap.fold (fun x _ s -> Idset.add x s) !used Idset.empty in
72 + let s = Idmap.fold (fun x _ s -> Idset.add x s) !defined s in
73 +- Sort.list order_entry (Idset.elements s)
74 ++ List.sort order_entry (Idset.elements s)
75 +
76 +
77 + (*s When we are in \LaTeX\ style, an index entry only consists in two lists
78 +@@ -324,7 +326,7 @@ let list_in_table id t =
79 + try
80 + let l = Whereset.elements (Idmap.find id t) in
81 + let l = map_succeed_nf find_where l in
82 +- let l = Sort.list (fun x x' -> snd x < snd x') l in
83 ++ let l = List.sort (fun x x' -> compare (snd x) (snd x')) l in
84 + uniquize l
85 + with Not_found ->
86 + []
87
88 diff --git a/dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch b/dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch
89 new file mode 100644
90 index 00000000000..1cb407a4a51
91 --- /dev/null
92 +++ b/dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch
93 @@ -0,0 +1,17 @@
94 +--- ocamlweb-1.41-orig/Makefile.in 2019-01-25 20:54:14.000000000 +1100
95 ++++ ocamlweb-1.41/Makefile.in 2020-10-12 19:49:20.490860201 +1100
96 +@@ -61,14 +61,12 @@
97 +
98 + ocamlweb: $(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
99 + $(CAMLCOPT) $(OPTFLAGS) -o $@ -I +compiler-libs ocamloptcomp.cmxa $(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
100 +- strip ocamlweb
101 +
102 + ocamlweb.byte: $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
103 + $(CAMLC) $(BYTEFLAGS) -o $@ $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
104 +
105 + ocamlweb.static: $(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
106 + $(CAMLCOPT) $(OPTFLAGS) -cclib -static -o $@ $(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
107 +- strip $@
108 +
109 + debug: $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
110 + $(CAMLC) $(BYTEFLAGS) -o ocamlweb-debug $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
111
112 diff --git a/dev-ml/ocamlweb/metadata.xml b/dev-ml/ocamlweb/metadata.xml
113 index 6f49eba8f49..a4f6be63adb 100644
114 --- a/dev-ml/ocamlweb/metadata.xml
115 +++ b/dev-ml/ocamlweb/metadata.xml
116 @@ -1,5 +1,8 @@
117 <?xml version="1.0" encoding="UTF-8"?>
118 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
119 <pkgmetadata>
120 -<!-- maintainer-needed -->
121 + <maintainer type="person">
122 + <email>gienah@g.o</email>
123 + <name>Mark Wright</name>
124 + </maintainer>
125 </pkgmetadata>
126
127 diff --git a/dev-ml/ocamlweb/ocamlweb-1.41.ebuild b/dev-ml/ocamlweb/ocamlweb-1.41.ebuild
128 new file mode 100644
129 index 00000000000..1024343cc3c
130 --- /dev/null
131 +++ b/dev-ml/ocamlweb/ocamlweb-1.41.ebuild
132 @@ -0,0 +1,33 @@
133 +# Copyright 1999-2020 Gentoo Authors
134 +# Distributed under the terms of the GNU General Public License v2
135 +
136 +EAPI=7
137 +
138 +inherit latex-package
139 +
140 +DESCRIPTION="O'Caml literate programming tool"
141 +HOMEPAGE="https://www.lri.fr/~filliatr/ocamlweb/"
142 +SRC_URI="https://www.lri.fr/~filliatr/ftp/ocamlweb/${P}.tar.gz"
143 +
144 +LICENSE="LGPL-2"
145 +SLOT="0"
146 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
147 +
148 +DEPEND=">=dev-lang/ocaml-4.08.0:=
149 + virtual/latex-base
150 + dev-texlive/texlive-latexextra
151 + "
152 +
153 +PATCHES=(
154 + "${FILESDIR}/${PN}-1.41-strip.patch"
155 + "${FILESDIR}/${PN}-1.41-ocaml-4.08.0.patch"
156 + )
157 +
158 +src_compile() {
159 + emake
160 +}
161 +
162 +src_install() {
163 + emake UPDATETEX="" prefix="${D}/usr" MANDIR="${D}/usr/share/man" BASETEXDIR="${D}/${TEXMF}" install
164 + dodoc README CHANGES
165 +}