commit:     91ea1ee6f5e63abcf31fea6f173a8ba14f225c3e
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 13 12:18:53 2020 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 12:53:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91ea1ee6

dev-ml/ocamlweb: Bump to 1.41

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Mark Wright <gienah <AT> gentoo.org>

 dev-ml/ocamlweb/Manifest                           |  1 +
 .../files/ocamlweb-1.41-ocaml-4.08.0.patch         | 53 ++++++++++++++++++++++
 dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch    | 17 +++++++
 dev-ml/ocamlweb/metadata.xml                       |  5 +-
 dev-ml/ocamlweb/ocamlweb-1.41.ebuild               | 33 ++++++++++++++
 5 files changed, 108 insertions(+), 1 deletion(-)

diff --git a/dev-ml/ocamlweb/Manifest b/dev-ml/ocamlweb/Manifest
index ca143964703..90aa548d553 100644
--- a/dev-ml/ocamlweb/Manifest
+++ b/dev-ml/ocamlweb/Manifest
@@ -1 +1,2 @@
 DIST ocamlweb-1.39.tar.gz 141866 BLAKE2B 
14ab9c595133d34d9711da2232fdf6a89a7b134ec2537e70d6ee6ecbfdb19a8bfb6a1a7aed6207cbb1bbe1f5e7b651d33fed35d8f26129d69e29dc5995d5c342
 SHA512 
f4e2d330222378b632ace70efb7062c93002a85db6dc9a821706a76a1e1c00da4d4e82e618f162584003b821bc72d2d11508ae22474db61cc4367ed528d21d50
+DIST ocamlweb-1.41.tar.gz 141844 BLAKE2B 
b89b20bdc8b99d34069b2e32a6bd8c9684e294fba667a4b74080b34f37c6d90432c61e71e27f4f1772cda8a26891655bd99a21defa584f4a1c68ae1e0d58d454
 SHA512 
7a6403f8b0de3feeef9657e8aff10e6f1fe29edc400ce3f11c6435d6350314423fb74e192e4275a9ad47170019d6a960daf74f245539f0f3f2a6072cc7195442

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
new file mode 100644
index 00000000000..b8da9e02b03
--- /dev/null
+++ b/dev-ml/ocamlweb/files/ocamlweb-1.41-ocaml-4.08.0.patch
@@ -0,0 +1,53 @@
+From: Stephane Glondu <st...@glondu.net>
+Date: Fri, 6 Sep 2019 09:53:22 +0200
+Subject: Fix compilation with OCaml 4.08.0
+
+---
+ web.ml | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/web.ml b/web.ml
+index 7dc1470..6f9ca51 100644
+--- a/web.ml
++++ b/web.ml
+@@ -247,14 +247,16 @@ let norm_string s =
+ 
+ let alpha_string s1 s2 =
+   match what_is_first_char s1, what_is_first_char s2 with
+-    | Symbol, Symbol -> s1 < s2
+-    | Symbol, _ -> true
+-    | _, Symbol -> false
+-    | _,_ -> norm_string s1 < norm_string s2
++    | Symbol, Symbol -> compare s1 s2
++    | Symbol, _ -> -1
++    | _, Symbol -> 1
++    | _,_ -> compare (norm_string s1) (norm_string s2)
++
++let ( ++ ) c1 c2 =
++  if c1 = 0 then c2 else c1
+ 
+ let order_entry e1 e2 =
+-  (alpha_string e1.e_name e2.e_name) ||
+-  (e1.e_name = e2.e_name && e1.e_type < e2.e_type)
++  alpha_string e1.e_name e2.e_name ++ compare e1.e_type e2.e_type
+ 
+ (*s The following function collects all the index entries and sort them
+     using [alpha_string], returning a list. *)
+@@ -264,7 +266,7 @@ module Idset = Set.Make(struct type t = index_entry let 
compare = compare end)
+ let all_entries () =
+   let s = Idmap.fold (fun x _ s -> Idset.add x s) !used Idset.empty in
+   let s = Idmap.fold (fun x _ s -> Idset.add x s) !defined s in
+-  Sort.list order_entry (Idset.elements s)
++  List.sort order_entry (Idset.elements s)
+ 
+ 
+ (*s When we are in \LaTeX\ style, an index entry only consists in two lists
+@@ -324,7 +326,7 @@ let list_in_table id t =
+   try
+     let l = Whereset.elements (Idmap.find id t) in
+     let l = map_succeed_nf find_where l in
+-    let l = Sort.list (fun x x' -> snd x < snd x') l in
++    let l = List.sort (fun x x' -> compare (snd x) (snd x')) l in
+     uniquize l
+   with Not_found ->
+     []

diff --git a/dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch 
b/dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch
new file mode 100644
index 00000000000..1cb407a4a51
--- /dev/null
+++ b/dev-ml/ocamlweb/files/ocamlweb-1.41-strip.patch
@@ -0,0 +1,17 @@
+--- ocamlweb-1.41-orig/Makefile.in     2019-01-25 20:54:14.000000000 +1100
++++ ocamlweb-1.41/Makefile.in  2020-10-12 19:49:20.490860201 +1100
+@@ -61,14 +61,12 @@
+ 
+ ocamlweb: $(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
+       $(CAMLCOPT) $(OPTFLAGS) -o $@ -I +compiler-libs ocamloptcomp.cmxa 
$(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
+-      strip ocamlweb
+ 
+ ocamlweb.byte: $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
+       $(CAMLC) $(BYTEFLAGS) -o $@ $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
+ 
+ ocamlweb.static: $(CAML_CMX) $(CAMLLEX_CMX) $(CMX)
+       $(CAMLCOPT) $(OPTFLAGS) -cclib -static -o $@ $(CAML_CMX) $(CAMLLEX_CMX) 
$(CMX)
+-      strip $@
+ 
+ debug: $(CAML_CMO) $(CAMLLEX_CMO) $(CMO)
+       $(CAMLC) $(BYTEFLAGS) -o ocamlweb-debug $(CAML_CMO) $(CAMLLEX_CMO) 
$(CMO)

diff --git a/dev-ml/ocamlweb/metadata.xml b/dev-ml/ocamlweb/metadata.xml
index 6f49eba8f49..a4f6be63adb 100644
--- a/dev-ml/ocamlweb/metadata.xml
+++ b/dev-ml/ocamlweb/metadata.xml
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
-<!-- maintainer-needed -->
+       <maintainer type="person">
+               <email>gie...@gentoo.org</email>
+               <name>Mark Wright</name>
+       </maintainer>
 </pkgmetadata>

diff --git a/dev-ml/ocamlweb/ocamlweb-1.41.ebuild 
b/dev-ml/ocamlweb/ocamlweb-1.41.ebuild
new file mode 100644
index 00000000000..1024343cc3c
--- /dev/null
+++ b/dev-ml/ocamlweb/ocamlweb-1.41.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit latex-package
+
+DESCRIPTION="O'Caml literate programming tool"
+HOMEPAGE="https://www.lri.fr/~filliatr/ocamlweb/";
+SRC_URI="https://www.lri.fr/~filliatr/ftp/ocamlweb/${P}.tar.gz";
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+
+DEPEND=">=dev-lang/ocaml-4.08.0:=
+       virtual/latex-base
+       dev-texlive/texlive-latexextra
+       "
+
+PATCHES=(
+       "${FILESDIR}/${PN}-1.41-strip.patch"
+       "${FILESDIR}/${PN}-1.41-ocaml-4.08.0.patch"
+       )
+
+src_compile() {
+       emake
+}
+
+src_install() {
+       emake UPDATETEX="" prefix="${D}/usr" MANDIR="${D}/usr/share/man" 
BASETEXDIR="${D}/${TEXMF}" install
+       dodoc README CHANGES
+}

Reply via email to