-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·68 lines (62 loc) · 1.57 KB
/
build.sh
File metadata and controls
executable file
·68 lines (62 loc) · 1.57 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
set -xe
_SC_DIR="$(dirname "$0")"
_PREFIX=/usr/local
_SCRATCH_DIR="$(cd "$_SC_DIR/.."; pwd)"
_EXTRA_ARGS=--disable-install-rdoc
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
--prefix=*)
_PREFIX="${1#*=}"
;;
--scratch-path=*)
_SCRATCH_DIR="${1#*=}"
;;
--version=*)
_VERSION="${1#*=}"
;;
--with-openssl=*)
_OPENSSL="${1#*=}"
;;
--without-openssl)
_OPENSSL=0
;;
--with-readline=*)
_READLINE="${1#*=}"
;;
--without-readline)
_READLINE=0
;;
--with-gdbm=*)
_GDBM="${1#*=}"
;;
--with-universal)
_UNIVERSAL=1
_EXTRA_ARGS="$_EXTRA_ARGS --with-arch=i386,x86_64"
;;
--enable-rpath)
_RPATH=1
_EXTRA_ARGS="$_EXTRA_ARGS $1"
;;
--extra-opts=*)
_EXTRA_ARGS="$_EXTRA_ARGS ${1#*=}"
;;
--unit-test)
_NO_TESTS=0
;;
*)
echo "Usage: $0 [--version=] [--prefix=$_PREFIX] [--with-openssl=|--without-openssl]"
echo " [--with-readline=|--without-readline] [--with-gdbm=] [--unit-test]"
exit
;;
esac
shift
done
# Build dependencies
"$_SC_DIR/_build_openssl.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_UNIVERSAL" "$_RPATH" "$_OPENSSL"
"$_SC_DIR/_build_libyaml.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_UNIVERSAL" "$_RPATH" '' "$_NO_TESTS"
"$_SC_DIR/_build_readline.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_UNIVERSAL" "$_RPATH" "$_READLINE"
[[ -z "$_GDBM" ]] || \
"$_SC_DIR/_build_gdbm.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_UNIVERSAL" "$_RPATH" "$_GDBM" "$_NO_TESTS"
"$_SC_DIR/_build_ruby.sh" "$_PREFIX" "$_SCRATCH_DIR" "$_VERSION" "$_EXTRA_ARGS" "$_NO_TESTS"