Package Details: ocaml-sedlex 2.2-1

Git Clone URL: https://aur.archlinux.org/ocaml-sedlex.git (read-only, click to copy)
Package Base: ocaml-sedlex
Description: Unicode-friendly OCaml lexer generator
Upstream URL: https://github.com/ocaml-community/sedlex
Licenses: MIT
Submitter: mgrabovsky
Maintainer: mgrabovsky
Last Packager: mgrabovsky
Votes: 0
Popularity: 0.000000
First Submitted: 2016-08-17 17:05
Last Updated: 2020-07-06 17:52

Latest Comments

mgrabovsky commented on 2020-07-06 17:56

Thanks, mate.

dpeukert commented on 2020-07-06 15:41

Hey, I've noticed this package no longer builds, so here's a fix (also contains an update to 2.2):

diff --git a/.SRCINFO b/.SRCINFO
index 9d6b7f2..07ac923 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,23 @@
-# Generated by mksrcinfo v8
-# Sun Apr 26 10:57:54 UTC 2020
 pkgbase = ocaml-sedlex
    pkgdesc = Unicode-friendly OCaml lexer generator
-   pkgver = 2.1
-   pkgrel = 3
+   pkgver = 2.2
+   pkgrel = 1
    url = https://github.com/ocaml-community/sedlex
    arch = i686
    arch = x86_64
    license = MIT
-   depends = ocaml
+   makedepends = dune>=1.8.0
+   depends = ocaml>=4.02.3
    depends = ocaml-gen
-   depends = ocaml-ppx_tools
+   depends = ocaml-migrate-parsetree
+   depends = ocaml-ppx_tools_versioned>=5.2.3
+   depends = ocaml-uchar
    options = !strip
    options = !makeflags
-   source = https://github.com/alainfrisch/sedlex/archive/v2.1.tar.gz
-   sha256sums = 7b4a66a74419a88a841370d7162243f834e0842c3ce984f2b0090f5f11ab1699
+   source = https://github.com/alainfrisch/sedlex/archive/v2.2.tar.gz
+   source = fix-pervasives.diff
+   sha256sums = de5459c98568cd1e2b96e8af61e428015d7f6650a1c0ec362d538d0874730841
+   sha256sums = 39dcebebc8946c4cd192bd2662167b59f6e492e7394973bbea7ef23560e26f9d

 pkgname = ocaml-sedlex

diff --git a/PKGBUILD b/PKGBUILD
index 212ace1..984255d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,41 @@
 # Maintainer: Matej Grabovsky <matej.grabovsky at gmail>
 pkgname=ocaml-sedlex
-pkgver=2.1
-pkgrel=3
+pkgver=2.2
+pkgrel=1
 pkgdesc='Unicode-friendly OCaml lexer generator'
 license=('MIT')
 arch=('i686' 'x86_64')
 url='https://github.com/ocaml-community/sedlex'
-depends=('ocaml' 'ocaml-gen' 'ocaml-ppx_tools')
-source=("https://github.com/alainfrisch/sedlex/archive/v${pkgver}.tar.gz")
+depends=('ocaml>=4.02.3' 'ocaml-gen' 'ocaml-migrate-parsetree' 'ocaml-ppx_tools_versioned>=5.2.3' 'ocaml-uchar')
+makedepends=('dune>=1.8.0')
+source=("https://github.com/alainfrisch/sedlex/archive/v${pkgver}.tar.gz"
+        'fix-pervasives.diff')
 options=(!strip !makeflags)
-sha256sums=('7b4a66a74419a88a841370d7162243f834e0842c3ce984f2b0090f5f11ab1699')
+sha256sums=('de5459c98568cd1e2b96e8af61e428015d7f6650a1c0ec362d538d0874730841'
+            '39dcebebc8946c4cd192bd2662167b59f6e492e7394973bbea7ef23560e26f9d')
+
+prepare() {
+    cd "$srcdir/${pkgname/ocaml-/}-$pkgver"
+
+    patch --forward -p1 < "$srcdir/fix-pervasives.diff"
+}

 build() {
     cd "$srcdir/${pkgname/ocaml-/}-$pkgver"

-    make all
-    make opt
+    make build
 }

-package() {
+check() {
     cd "$srcdir/${pkgname/ocaml-/}-$pkgver"

-    export DESTDIR="$pkgdir$(ocamlfind printconf destdir)"
-    export OCAMLFIND_DESTDIR="$DESTDIR"
-    mkdir -p "$DESTDIR"
+    make test
+}
+
+package() {
+    cd "$srcdir/${pkgname/ocaml-/}-$pkgver"

-    make install
+    DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml' --release
     install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

diff --git a/fix-pervasives.diff b/fix-pervasives.diff
new file mode 100644
index 0000000..df0c6cc
--- /dev/null
+++ b/fix-pervasives.diff
@@ -0,0 +1,21 @@
+diff --git a/src/generator/gen_unicode.ml.inc b/src/generator/gen_unicode.ml.inc
+index 44106a1..78415fc 100644
+--- a/src/generator/gen_unicode.ml.inc
++++ b/src/generator/gen_unicode.ml.inc
+@@ -77,14 +77,14 @@ let split list n =
+
+ let print_elements ch hashtbl =
+   let cats =
+-    List.sort_uniq Pervasives.compare
++    List.sort_uniq compare
+       (Hashtbl.fold (fun cat _ l -> cat::l) hashtbl [])
+   in
+   let len = List.length cats in
+   List.iter (fun c ->
+     let entries =
+       List.map (fun (b,e) -> Printf.sprintf "0x%x, 0x%x" b e)
+-        (List.sort_uniq Pervasives.compare
++        (List.sort_uniq compare
+           (Hashtbl.find_all hashtbl c))
+     in
+     let entries =

dpeukert commented on 2020-04-10 01:27

Can you fix the typo in the checksum field? Thanks

robertfoster commented on 2019-12-07 12:24

Please remove the <Paste> typo from sha256 field. Thanks man !

J5lx commented on 2018-07-02 13:29

ocaml-findlib is missing from makedepends.