|
root / test / ports / base / vim / build.sh
build.sh Bash 40 lines 680 B
 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
#!/bin/sh
# Build script for vim
# Vi IMproved text editor

set -e

echo "Building vim..."

cd vim-9.1.0000

# On illumos, use GNU make
MAKE=gmake
if [ "$(uname -s)" != "SunOS" ]; then
    MAKE=make
fi

# Configure with minimal features for testing
# (Full vim would have more options)
./configure \
    --prefix=/usr \
    --with-features=normal \
    --enable-multibyte \
    --disable-gui \
    --without-x \
    --disable-netbeans \
    --enable-cscope

# Build
$MAKE ${MAKEFLAGS}

# Install to DESTDIR
echo "Installing to ${DESTDIR}..."
$MAKE DESTDIR="${DESTDIR}" install

# Create vi symlink
cd "${DESTDIR}/usr/bin"
ln -sf vim vi 2>/dev/null || true

echo "Build complete!"