mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 16:31:40 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # Contributor: rubicon <rubicon@mailo.com>
 | |
| # Maintainer:
 | |
| pkgname=ocaml-charinfo_width
 | |
| _pkgname=charInfo_width
 | |
| pkgver=1.1.0
 | |
| pkgrel=1
 | |
| pkgdesc="Determine column width for a character in OCaml"
 | |
| url="https://github.com/kandu/charinfo_width/"
 | |
| arch="all !riscv64"  # limited by ocaml aport
 | |
| license="MIT"
 | |
| depends="ocaml-runtime ocaml-camomile ocaml-result"
 | |
| depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-camomile-dev ocaml-result-dev"
 | |
| makedepends="$depends_dev dune ocaml"
 | |
| options="!check"  # needs ppx_expect
 | |
| subpackages="$pkgname-dev"
 | |
| source="$pkgname-$pkgver.tar.gz::https://github.com/kandu/charInfo_width/archive/$pkgver.tar.gz"
 | |
| builddir="$srcdir/$_pkgname-$pkgver"
 | |
| _ocamldir=usr/lib/ocaml
 | |
| 
 | |
| # 32-bit archs
 | |
| case "$CARCH" in
 | |
| 	arm*|x86) options="$options textrels" ;;
 | |
| esac
 | |
| 
 | |
| build() {
 | |
| 	dune build --release --verbose
 | |
| }
 | |
| 
 | |
| check() {
 | |
| 	dune runtest --verbose
 | |
| }
 | |
| 
 | |
| package() {
 | |
| 	dune install \
 | |
| 		--destdir="$pkgdir" \
 | |
| 		--docdir=/.omit
 | |
| 	rm -Rf "$pkgdir"/.omit
 | |
| }
 | |
| 
 | |
| 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="
 | |
| c8dac9eb6f520213de69b23433e2f0d6a21578c70ae69fb682065e707363968959395a6ddc6c88893e08372a138287318634b52a8b4fb70ac988b4ad4a18b140  ocaml-charinfo_width-1.1.0.tar.gz
 | |
| "
 |