From 16e08294188821b10a0fcde37a3cf9661e6d3212 Mon Sep 17 00:00:00 2001
From: rubicon <5662-rubicon@users.gitlab.alpinelinux.org>
Date: Mon, 16 May 2022 15:34:09 +0800
Subject: [PATCH] testing/ocaml-uutf: move from unmaintained as depends for
 ocaml-markup

---
 testing/ocaml-uutf/APKBUILD      | 66 ++++++++++++++++++++++++++++++++
 unmaintained/ocaml-uutf/APKBUILD | 57 ---------------------------
 2 files changed, 66 insertions(+), 57 deletions(-)
 create mode 100644 testing/ocaml-uutf/APKBUILD
 delete mode 100644 unmaintained/ocaml-uutf/APKBUILD

diff --git a/testing/ocaml-uutf/APKBUILD b/testing/ocaml-uutf/APKBUILD
new file mode 100644
index 000000000000..8a4cad689421
--- /dev/null
+++ b/testing/ocaml-uutf/APKBUILD
@@ -0,0 +1,66 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer:
+pkgname=ocaml-uutf
+_pkgname=uutf
+pkgver=1.0.3
+pkgrel=0
+pkgdesc="Non-blocking streaming Unicode codec for OCaml"
+url="https://erratique.ch/software/uutf"
+arch="all !riscv64"  # limited by ocaml aport
+license="ISC"
+depends="ocaml-runtime"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="
+	ocaml
+	ocaml-compiler-libs
+	ocaml-findlib
+	ocamlbuild
+	ocaml-topkg
+	ocaml-cmdliner-dev
+	cmd:opam-installer
+	"
+options="!check"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/uutf/releases/uutf-$pkgver.tbz"
+builddir="$srcdir/$_pkgname-$pkgver"
+_ocamldir=usr/lib/ocaml
+
+# 32-bit archs
+case "$CARCH" in
+	arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+	ocaml pkg/pkg.ml build \
+		--with-cmdliner true
+}
+
+package() {
+	opam-installer -i \
+		--prefix="$pkgdir/usr" \
+		--libdir="$pkgdir/$_ocamldir" \
+		--docdir="$builddir/.omit" \
+		$_pkgname.install
+}
+
+dev() {
+	default_dev
+
+	cd "$pkgdir"
+
+	local path; for path in $(find $_ocamldir \( \
+			-name '*.cmt' -o \
+			-name '*.cmti' -o \
+			-name '*.cmx' -o \
+			-name '*.cmxa' -o \
+			-name '*.ml' -o \
+			-name '*.mli' \
+		\))
+	do
+		amove "$path"
+	done
+}
+
+sha512sums="
+50cc4486021da46fb08156e9daec0d57b4ca469b07309c508d5a9a41e9dbcf1f32dec2ed7be027326544453dcaf9c2534919395fd826dc7768efc6cc4bfcc9f8  ocaml-uutf-1.0.3.tar.bz2
+"
diff --git a/unmaintained/ocaml-uutf/APKBUILD b/unmaintained/ocaml-uutf/APKBUILD
deleted file mode 100644
index 558d118fdd1d..000000000000
--- a/unmaintained/ocaml-uutf/APKBUILD
+++ /dev/null
@@ -1,57 +0,0 @@
-# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer:
-pkgname=ocaml-uutf
-_pkgname=uutf
-pkgver=1.0.1
-pkgrel=2
-pkgdesc="Non-blocking streaming Unicode codec for OCaml"
-url="https://github.com/dbuenzli/uutf"
-arch="all !x86 !armhf !armv7 !s390x !mips !mips64"  # limited by ocaml aport
-license="ISC"
-depends="ocaml-uchar"
-depends_dev="$pkgname=$pkgver-r$pkgrel"
-makedepends="
-	ocaml
-	ocaml-compiler-libs
-	ocaml-cmdliner-dev
-	ocaml-findlib
-	ocaml-result-dev
-	ocaml-topkg-dev
-	ocaml-uchar-dev
-	ocamlbuild
-	opam
-	"
-options="!check"  # FXIME: needs ocaml-topkg-care
-subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/dbuenzli/$_pkgname/archive/v$pkgver.tar.gz"
-builddir="$srcdir/$_pkgname-$pkgver"
-
-build() {
-	cd "$builddir"
-	ocaml pkg/pkg.ml build
-}
-
-package() {
-	cd "$builddir"
-
-	opam-installer -i \
-		--prefix="$pkgdir/usr" \
-		--libdir="$pkgdir/usr/lib/ocaml" \
-		--docdir="$builddir/.omit" \
-		$_pkgname.install
-
-	# Remove annotation files.
-	rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname/*.cmt*
-}
-
-dev() {
-	local sitelib="usr/lib/ocaml/$_pkgname"
-	default_dev
-
-	cd "$pkgdir"/$sitelib
-
-	mkdir -p "$subpkgdir"/$sitelib
-	mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
-}
-
-sha512sums="803ea3306f977bbe937233b02b86f5dbd80b031e32b627be038b5caa60ed84df26efb896910025d7cc0addbff9a3d33b0ccce76fe3ebc5aaabf34f99c2637937  ocaml-uutf-1.0.1.tar.gz"
-- 
GitLab