This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplan.sh
80 lines (72 loc) · 2 KB
/
plan.sh
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
69
70
71
72
73
74
75
76
77
78
79
80
pkg_name=vim
pkg_origin=core
pkg_version=8.2.2825
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_description="\
Vim is a highly configurable text editor built to make creating and changing \
any kind of text very efficient. It is included as "vi" with most UNIX \
systems and with Apple OS X.\
"
pkg_upstream_url="http://www.vim.org/"
pkg_license=("Vim")
pkg_source="http://github.com/${pkg_name}/${pkg_name}/archive/v${pkg_version}.tar.gz"
pkg_shasum="c75acdac8b80e664666663d3429efe1eb25be7f13db0bd3697a2d2a78dd1bb66"
pkg_deps=(
core/acl
core/attr
core/glibc
core/ncurses
)
pkg_build_deps=(
core/coreutils
core/diffutils
core/patch
core/make
core/gcc
core/sed
core/autoconf
)
pkg_bin_dirs=(bin)
do_prepare() {
pushd src > /dev/null
autoconf
popd > /dev/null
export CPPFLAGS="$CPPFLAGS $CFLAGS -O2"
build_line "Setting CPPFLAGS=$CPPFLAGS"
}
do_build() {
./configure \
--prefix="${pkg_prefix}" \
--with-compiledby="Habitat, vim release ${pkg_version}" \
--with-features=huge \
--enable-acl \
--with-x=no \
--disable-gui \
--enable-multibyte
make
}
do_install() {
do_default_install
# Add a `vi` which symlinks to `vim`
ln -sv vim "${pkg_prefix}/bin/vi"
# Install license file
install -Dm644 runtime/doc/uganda.txt "${pkg_prefix}/share/licenses/license.txt"
}
# ----------------------------------------------------------------------------
# **NOTICE:** What follows are implementation details required for building a
# first-pass, "stage1" toolchain and environment. It is only used when running
# in a "stage1" Studio and can be safely ignored by almost everyone. Having
# said that, it performs a vital bootstrapping process and cannot be removed or
# significantly altered. Thank you!
# ----------------------------------------------------------------------------
if [[ "$STUDIO_TYPE" = "stage1" ]]; then
pkg_build_deps=(
core/gcc
core/coreutils
core/sed
core/diffutils
core/make
core/patch
core/autoconf
)
fi