|
root / lang / ocaml-findlib
ocaml-findlib Plain Text 52 lines 1.2 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/zsh
# Build script for OCaml findlib library

set -e

cd "$SRCDIR"

export PATH="$PREFIX/bin:$PATH"

# libatomic is at /usr/lib (hammerhead BSD layout)
export LD_LIBRARY_PATH="/usr/lib:${LD_LIBRARY_PATH:-}"
export LIBRARY_PATH="/usr/lib:${LIBRARY_PATH:-}"

# Configure findlib
./configure \
    -bindir $PREFIX/bin \
    -sitelib $PREFIX/lib/ocaml \
    -mandir $PREFIX/man \
    -config $PREFIX/lib/ocaml/findlib.conf \
    -no-custom

# Hammerhead's /usr/sbin/install (SVR4) resets PATH internally and breaks.
# Override INSTALLDIR and INSTALLFILE with simple alternatives as documented
# in findlib's configure output.
sed -i 's|^INSTALLDIR = install -d|INSTALLDIR = mkdir -p|' Makefile.config
sed -i 's|^INSTALLFILE = install -c|INSTALLFILE = cp|' Makefile.config

# Build
gmake all
gmake opt

# Install to staging directory
gmake install DESTDIR="$PKGDIR"
[package]
name = "ocaml-findlib"
version = "1.9.8"
description = "OCaml library manager and ocamlfind tool"
homepage = "http://projects.camlcity.org/projects/findlib.html"
license = "MIT"

[dependencies]
build = ["ocaml"]
runtime = ["ocaml"]

[[source]]
file = "findlib-1.9.8.tar.gz"
urls = [
    "http://download.camlcity.org/download/findlib-1.9.8.tar.gz"
]
checksum = "skip"
extract = true