summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Peukert2020-03-15 16:29:41 +0100
committerDaniel Peukert2020-03-15 16:29:41 +0100
commit9fb5b30a247edf6e24c39ac8b99d46498cd0fcec (patch)
tree5a271fb177f16294619445c47cf825cfae804ada
parent2e309414f39434ddca7ddd04ee8821b1690a48d5 (diff)
downloadaur-9fb5b30a247edf6e24c39ac8b99d46498cd0fcec.tar.gz
Added ocaml-visitors
-rw-r--r--.SRCINFO31
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD58
-rw-r--r--dune-version.diff10
5 files changed, 90 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 53fe0366e39..8e9edd02a71 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,25 @@
pkgbase = ocaml-visitors
- pkgdesc = An OCaml syntax extension for generating visitor classes.
- pkgver = 20180513
- pkgrel = 2
+ pkgdesc = An OCaml syntax extension for generating visitor classes
+ pkgver = 20200210
+ pkgrel = 1
url = https://gitlab.inria.fr/fpottier/visitors
- arch = i686
arch = x86_64
- license = LGPL
- depends = ocaml
- depends = ocaml-ppx_deriving
+ arch = i686
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = LGPL2.1
+ makedepends = cppo
+ makedepends = dune
+ depends = ocaml>=4.02.3
+ depends = ocaml-ppx_deriving>=4.4
+ depends = ocaml-ppx_tools
+ depends = ocaml-result
options = !strip
- options = !makeflags
- options = staticlibs
- source = http://gallium.inria.fr/~fpottier/visitors/visitors-20180513.tar.gz
- md5sums = 0f90d565d045c2df3769239ac1d39b76
+ source = ocaml-visitors-20200210-1.tar.gz::https://gitlab.inria.fr/fpottier/visitors/-/archive/20200210/visitors-20200210.tar.gz
+ source = dune-version.diff
+ sha256sums = b26ef1da80399af92f9da2f818c078317961daa4a68645e31160c1b0f4b8843e
+ sha256sums = ed20ebe5ade715ac0d439ad01cd6e3cfad908ef09705a069d069bae0a251f7f6
pkgname = ocaml-visitors
-
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000000..a467ee9a97a
--- /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 00000000000..82b3c183d5d
--- /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
index cf1b98b0329..939c515c9f1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,45 @@
-# Maintainer: malet <malet@invalid>
-pkgname=ocaml-visitors
-_oname=visitors
-pkgver=20180513
-pkgrel=2
-pkgdesc='An OCaml syntax extension for generating visitor classes.'
-arch=('i686' 'x86_64')
-url='https://gitlab.inria.fr/fpottier/visitors'
-license=('LGPL')
-depends=('ocaml' 'ocaml-ppx_deriving')
-options=('!strip' '!makeflags' 'staticlibs')
-source=('http://gallium.inria.fr/~fpottier/visitors/visitors-20180513.tar.gz')
-md5sums=('0f90d565d045c2df3769239ac1d39b76')
+# Maintainer: Daniel Peukert <dan.peukert@gmail.com>
+# Contributor: malet <malet@invalid>
+_projectname='visitors'
+pkgname="ocaml-$_projectname"
+pkgver='20200210'
+pkgrel='1'
+pkgdesc='An OCaml syntax extension for generating visitor classes'
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://gitlab.inria.fr/fpottier/$_projectname"
+license=('LGPL2.1')
+depends=('ocaml>=4.02.3' 'ocaml-ppx_deriving>=4.4' 'ocaml-ppx_tools' 'ocaml-result')
+makedepends=('cppo' 'dune')
+options=('!strip')
+source=(
+ "$pkgname-$pkgver-$pkgrel.tar.gz::$url/-/archive/$pkgver/$_projectname-$pkgver.tar.gz"
+ 'dune-version.diff'
+)
+sha256sums=('b26ef1da80399af92f9da2f818c078317961daa4a68645e31160c1b0f4b8843e'
+ 'ed20ebe5ade715ac0d439ad01cd6e3cfad908ef09705a069d069bae0a251f7f6')
+
+_sourcedirectory="$_projectname-$pkgver"
+
+prepare() {
+ cd "$srcdir/$_sourcedirectory/"
+ # Needed until Arch upgrades to dune>=2.0.0
+ patch --forward -p1 < '../dune-version.diff'
+}
build() {
- cd "$srcdir/$_oname-$pkgver"
- make -C src
+ cd "$srcdir/$_sourcedirectory/"
+ dune build -p "$_projectname" --verbose
}
package() {
- cd "$srcdir/$_oname-$pkgver"
- export OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)"
- install -dm 755 "$OCAMLFIND_DESTDIR"
- make -C src install
+ cd "$srcdir/$_sourcedirectory/"
+ dune build --profile 'release' --verbose @install
+ DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml'
+
+ install -dm755 "$pkgdir/usr/share/doc/$pkgname"
+ mv "$pkgdir/usr/doc/$_projectname/"* "$pkgdir/usr/share/doc/$pkgname/"
+ rm -r "$pkgdir/usr/doc/"
+
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/dune-version.diff b/dune-version.diff
new file mode 100644
index 00000000000..e02860cf93b
--- /dev/null
+++ b/dune-version.diff
@@ -0,0 +1,10 @@
+diff --git a/dune-project b/dune-project
+index 9efd891..c99bd5e 100644
+--- a/dune-project
++++ b/dune-project
+@@ -1,4 +1,4 @@
+-(lang dune 2.0)
++(lang dune 1.11)
+ (name visitors)
+ (version 20200210)
+ (package