mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
# Contributor: Jon Ong <jonongjs@rottenmage.com>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Anil Madhavapeddy <anil@recoil.org>
|
|
pkgname=ocaml-camlp4
|
|
_pkgname=camlp4
|
|
# NOTE: camlp4 version must match ocaml version!
|
|
pkgver=4.06.1
|
|
_pkgver="${pkgver%.*}+${pkgver##*.}"
|
|
_ocamlver=${pkgver%.*}
|
|
pkgrel=1
|
|
pkgdesc="Caml preprocessor and pretty-printer"
|
|
url="https://github.com/ocaml/camlp4/releases"
|
|
arch="all !x86 !armhf !s390x" # ocaml not avail on excluded platforms
|
|
license="LGPL-2.0-or-later-WITH-linking-exception"
|
|
depends="ocaml-runtime=~$_ocamlver ocaml-ocamlbuild"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
makedepends="ocaml=~$_ocamlver ocaml-compiler-libs=~$_ocamlver
|
|
ocaml-ocamlbuild-dev ocamlbuild"
|
|
replaces="camlp4" # for backward compatibility
|
|
provides="camlp4=$pkgver-r$pkgrel" # for backward compatibility
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$_pkgver.tar.gz::https://github.com/ocaml/$_pkgname/archive/$_pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-${_pkgver/+/-}"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
./configure
|
|
make -j1 all camlp4/META
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
|
|
make BINDIR="$pkgdir/usr/bin" \
|
|
LIBDIR="$pkgdir/usr/lib/ocaml" \
|
|
PKGDIR="$pkgdir/usr/lib/ocaml" \
|
|
install install-META
|
|
}
|
|
|
|
dev() {
|
|
default_dev
|
|
replaces="camlp4" # for backward compatibility
|
|
local sitelib="usr/lib/ocaml/$_pkgname"
|
|
|
|
cd "$pkgdir"
|
|
|
|
mkdir -p "$subpkgdir"/usr
|
|
mv usr/bin "$subpkgdir"/usr/
|
|
|
|
local path
|
|
for path in $(find $sitelib/ -name '*.cmx' -o -name '*.cmxa'); do
|
|
mkdir -p "$subpkgdir"/${path%/*}
|
|
mv "$path" "$subpkgdir"/${path%/*}/
|
|
done
|
|
rmdir "$subpkgdir"/$sitelib 2>/dev/null || true
|
|
}
|
|
|
|
sha512sums="32be92c4e64a985a3d2880e2201351961a4b7138a8be6e3f17e9b8e038a1660d13596f29fe0249c8c4183cd8cd06277cebc58f42609c8d2028032e893490fe43 ocaml-camlp4-4.06+1.tar.gz"
|