summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Peukert2023-08-10 21:01:58 +0200
committerDaniel Peukert2023-08-10 21:01:58 +0200
commit7b23865ed952506e1a2a92659910c5581a876f02 (patch)
treecd6857f12b5e906bdb2483f3ea28bc1946afe4bc
downloadaur-7b23865ed952506e1a2a92659910c5581a876f02.tar.gz
Add ocaml-markup, ocaml-reactiveData, ocaml-tyxml
-rw-r--r--.SRCINFO22
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD46
-rw-r--r--ocaml5-compatibility.diff56
5 files changed, 146 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8e34d27e4e3f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = ocaml-tyxml
+ pkgdesc = A library for building correct HTML and SVG documents for OCaml
+ pkgver = 4.5.0
+ pkgrel = 1
+ url = https://github.com/ocsigen/tyxml
+ arch = x86_64
+ arch = aarch64
+ license = custom:LGPL2.1 with linking exception
+ makedepends = dune>=2.0.0
+ depends = ocaml>=4.04.0
+ depends = ocaml-markup>=0.7.2
+ depends = ocaml-ppxlib
+ depends = ocaml-re>=1.5.0
+ depends = ocaml-seq
+ depends = ocaml-uutf>=1.0.0
+ options = !strip
+ source = ocaml-tyxml-4.5.0.tar.gz::https://github.com/ocsigen/tyxml/archive/4.5.0.tar.gz
+ source = ocaml5-compatibility.diff
+ sha512sums = 44591c4c32cb7e9425c1ca257624f12d6301709d33522672e13d28a6397da7e6b4eac0780e384763f26d5bc0e935a042d8224c22ea29a16d924f03a3c5b5a714
+ sha512sums = 0a635e8d4fb3a4ffdafb51dc4e91151a32ea72b98664f2832be89d1922ba00e3c9fa0da4d23340a3d46571fa61758c22f540f9fc07eff27c24d14f86b68ea878
+
+pkgname = ocaml-tyxml
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..a467ee9a97a6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+tab_width = 4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..82b3c183d5d4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+# from https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+*.tar
+*.tar.*
+*.rpm
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+*/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4ffd904f0a2d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Daniel Peukert <daniel@peukert.cc>
+_projectname='tyxml'
+pkgname="ocaml-$_projectname"
+pkgver='4.5.0'
+pkgrel='1'
+pkgdesc='A library for building correct HTML and SVG documents for OCaml'
+arch=('x86_64' 'aarch64')
+url="https://github.com/ocsigen/$_projectname"
+license=('custom:LGPL2.1 with linking exception')
+depends=('ocaml>=4.04.0' 'ocaml-markup>=0.7.2' 'ocaml-ppxlib' 'ocaml-re>=1.5.0' 'ocaml-seq' 'ocaml-uutf>=1.0.0')
+makedepends=('dune>=2.0.0')
+options=('!strip')
+source=(
+ "$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
+ 'ocaml5-compatibility.diff'
+)
+sha512sums=('44591c4c32cb7e9425c1ca257624f12d6301709d33522672e13d28a6397da7e6b4eac0780e384763f26d5bc0e935a042d8224c22ea29a16d924f03a3c5b5a714'
+ '0a635e8d4fb3a4ffdafb51dc4e91151a32ea72b98664f2832be89d1922ba00e3c9fa0da4d23340a3d46571fa61758c22f540f9fc07eff27c24d14f86b68ea878')
+
+_sourcedirectory="$_projectname-$pkgver"
+
+prepare() {
+ cd "$srcdir/$_sourcedirectory/"
+
+ # Fix ocaml 5 compatibility (based on https://github.com/ocsigen/tyxml/commit/2f2faf3bc2fb0be5a9c0bd2f2f440a98dde73f80)
+ patch --forward -p1 < '../ocaml5-compatibility.diff'
+}
+
+build() {
+ cd "$srcdir/$_sourcedirectory/"
+ dune build --release --verbose
+}
+
+package() {
+ cd "$srcdir/$_sourcedirectory/"
+ DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose
+
+ for _folder in "$pkgdir/usr/share/doc/"*; do
+ mv "$_folder" "$pkgdir/usr/share/doc/ocaml-$(basename "$_folder")"
+ done
+
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# CHECK_DISABLED_CIRCULAR_DEP
diff --git a/ocaml5-compatibility.diff b/ocaml5-compatibility.diff
new file mode 100644
index 000000000000..05ed3ae9cbac
--- /dev/null
+++ b/ocaml5-compatibility.diff
@@ -0,0 +1,56 @@
+diff --git a/jsx/tyxml_jsx.ml b/jsx/tyxml_jsx.ml
+index 1b47b989..9b80f468 100644
+--- a/jsx/tyxml_jsx.ml
++++ b/jsx/tyxml_jsx.ml
+@@ -9,16 +9,6 @@ let is_jsx e =
+ in
+ List.exists f e.pexp_attributes
+
+-(* When dropping support for 4.02, this module can simply be deleted. *)
+-module String = struct
+- include String
+- let lowercase_ascii = String.lowercase [@ocaml.warning "-3"]
+-end
+-module Char = struct
+- include Char
+- let lowercase_ascii = Char.lowercase [@ocaml.warning "-3"]
+-end
+-
+ let lowercase_lead s =
+ String.mapi (fun i c -> if i = 0 then Char.lowercase_ascii c else c) s
+
+diff --git a/ppx/tyxml_ppx.ml b/ppx/tyxml_ppx.ml
+index a5ff80d1..5319c123 100644
+--- a/ppx/tyxml_ppx.ml
++++ b/ppx/tyxml_ppx.ml
+@@ -19,12 +19,6 @@
+
+ open Tyxml_syntax
+
+-(* When dropping support for 4.02, this module can simply be deleted. *)
+-module String = struct
+- include String
+- let capitalize_ascii = String.capitalize [@ocaml.warning "-3"]
+-end
+-
+ open Ppxlib.Asttypes
+ open Ppxlib.Parsetree
+
+diff --git a/syntax/name_convention.ml b/syntax/name_convention.ml
+index 3dd3abd3..419d5911 100644
+--- a/syntax/name_convention.ml
++++ b/syntax/name_convention.ml
+@@ -4,13 +4,6 @@
+ see <http://www.w3.org/TR/html51/syntax.html#syntax>
+ *)
+
+-(* When dropping support for 4.02, this module can simply be deleted. *)
+-module Char = struct
+- include Char
+- let lowercase_ascii = Char.lowercase [@ocaml.warning "-3"]
+- let uppercase_ascii = Char.uppercase [@ocaml.warning "-3"]
+-end
+-
+ (* In the ocaml parser:
+ let identchar = ['A'-'Z' 'a'-'z' '_' '\'' '0'-'9']
+ *)