mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
161 lines
4.2 KiB
Bash
161 lines
4.2 KiB
Bash
SUMMARY="A highly configurable text editor"
|
|
DESCRIPTION="Vim is a highly configurable text editor built to enable \
|
|
efficient text editing. It is an improved version of the vi editor \
|
|
distributed with most UNIX systems.
|
|
|
|
Vim is often called a \"programmer's editor,\" and so useful for programming \
|
|
that many consider it an entire IDE. It's not just for programmers, though. \
|
|
Vim is perfect for all kinds of text editing, from composing email to editing \
|
|
configuration files.
|
|
Despite this, Vim can be configured to work in a very simple (Notepad-like) \
|
|
way, called evim or Easy Vim."
|
|
HOMEPAGE="https://www.vim.org/"
|
|
COPYRIGHT="1991-2020 Bram Moleenar et al."
|
|
LICENSE="Vim"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/vim/vim/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="2528387233967e7e8cdcd28eedca290959b48d7cb471fd1aa6ea5edfc51f279c"
|
|
SOURCE_FILENAME="vim-$portVersion.tar.gz"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
vim = $portVersion
|
|
cmd:ex$commandSuffix = $portVersion
|
|
cmd:gview$commandSuffix = $portVersion
|
|
cmd:gvim$commandSuffix = $portVersion
|
|
cmd:gvimdiff$commandSuffix = $portVersion
|
|
cmd:rgview$commandSuffix = $portVersion
|
|
cmd:rgvim$commandSuffix = $portVersion
|
|
cmd:rview$commandSuffix = $portVersion
|
|
cmd:rvim$commandSuffix = $portVersion
|
|
cmd:vi$commandSuffix = $portVersion
|
|
cmd:view$commandSuffix = $portVersion
|
|
cmd:vim$commandSuffix = $portVersion compat >= 8.1
|
|
cmd:vimdiff$commandSuffix = $portVersion
|
|
cmd:vimtutor$commandSuffix = $portVersion
|
|
cmd:xxd$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libncurses$secondaryArchSuffix >= 6
|
|
"
|
|
|
|
if [ $effectiveTargetArchitecture != "x86_gcc2" ] ; then
|
|
REQUIRES+="
|
|
lib:libssp$secondaryArchSuffix
|
|
"
|
|
fi
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libintl$secondaryArchSuffix
|
|
# devel:liblua$secondaryArchSuffix
|
|
devel:libncurses$secondaryArchSuffix >= 6
|
|
devel:libtclstub8.5
|
|
"
|
|
|
|
if [ $effectiveTargetArchitecture != "x86_gcc2" ] ; then
|
|
BUILD_REQUIRES+="
|
|
devel:libruby$secondaryArchSuffix
|
|
"
|
|
fi
|
|
|
|
BUILD_PREREQUIRES="
|
|
cmd:autoconf
|
|
cmd:find
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:gettext
|
|
cmd:grep
|
|
cmd:make
|
|
# cmd:perl
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python3
|
|
cmd:ruby
|
|
cmd:sed
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
|
|
# Global ----------------------------------------
|
|
|
|
cd src
|
|
autoconf
|
|
|
|
export CFLAGS="\
|
|
`pkg-config --cflags python3` \
|
|
-fPIC"
|
|
|
|
# CLI -------------------------------------------
|
|
|
|
# Clean objects from possible previous run to avoid mixup of GUI/CLI objects
|
|
rm objects/*.o || true
|
|
|
|
runConfigure --omit-dirs binDir ./configure \
|
|
--bindir="$commandBinDir" \
|
|
--disable-gui \
|
|
--with-features=huge \
|
|
--enable-cscope \
|
|
--enable-pythoninterp=dynamic \
|
|
--enable-rubyinterp=dynamic \
|
|
--enable-tclinterp=dynamic \
|
|
--with-compiledby=Haikuports \
|
|
--disable-terminal # FIXME: 'exit' command does not work
|
|
# --enable-luainterp=dynamic
|
|
# --enable-python3interp=dynamic currently broken
|
|
# --enable-perlinterp=dynamic not dynamic yet
|
|
|
|
make $jobArgs
|
|
cp vim vim.con # preserve gui-less executable
|
|
rm objects/*.o
|
|
|
|
# GUI -------------------------------------------
|
|
|
|
MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
sed -i "s|@MAJOR@|$MAJOR|" os_haiku.rdef
|
|
sed -i "s|@MIDDLE@|$MIDDLE|" os_haiku.rdef
|
|
sed -i "s|@MINOR@|$MINOR|" os_haiku.rdef
|
|
|
|
runConfigure --omit-dirs binDir ./configure \
|
|
--bindir="$commandBinDir" \
|
|
--with-features=huge \
|
|
--enable-cscope \
|
|
--enable-pythoninterp=dynamic \
|
|
--enable-rubyinterp=dynamic \
|
|
--enable-tclinterp==dynamic \
|
|
--with-compiledby=Haikuports \
|
|
--disable-terminal # FIXME: Builds, but does not display anything
|
|
# --enable-luainterp=dynamic
|
|
# --enable-python3interp=dynamic currently broken
|
|
# --enable-perlinterp=dynamic not dynamic yet
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
ln -s vim $commandBinDir/vi
|
|
addAppDeskbarSymlink $commandBinDir/gvim Vim
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd src
|
|
make check
|
|
}
|