mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
* ne: apply workaround for the "backspace not working" issue. This changes the default keybinding for the BACKSPACE key, from "DeleteChar" to "Backspace". Also, added a bit more info on the description text. * Build using ncurses instead of the built in termcap emulation. This solves the redrawing/refresing issues when editing files with syntax-highlighting enabled. Modified the description to better match the current ne's own description text from its website (with some minor editing and clarification).
109 lines
3.3 KiB
Bash
109 lines
3.3 KiB
Bash
SUMMARY="The 'nice editor'"
|
|
DESCRIPTION="ne is easy to use for the beginner, but powerful and fully \
|
|
configurable for the wizard, and most sparing in its resource usage.
|
|
|
|
Some of ne's features:
|
|
|
|
* Three user interfaces: control keystrokes, command line, and drop-down top menus \
|
|
(accesible with ESC, or F1).
|
|
* Keystrokes and menus are completely configurable (default keybindings like CTRL+Q, \
|
|
CTRL+S, CTRL+O, etc, resemble GUI editors).
|
|
* Syntax highlighting.
|
|
* Full support for UTF-8 files, including multiple-column characters.
|
|
* 64-bit file/line length.
|
|
* Simple scripting language where scripts can be generated via an idiotproof record/play method.
|
|
* Unlimited undo/redo capability (can be disabled with a command).
|
|
* Automatic preferences system based on the extension of the file name being edited or \
|
|
regex content matching.
|
|
* Automatic completion of prefixes using words in your documents as dictionary.
|
|
* A file requester with completion features for easy file retrieval.
|
|
* Extended regular expression search and replace a la emacs and vi.
|
|
* A very compact memory model—you can easily load and modify very large files, even if they \
|
|
do not fit your core memory.
|
|
* Editing of binary files.
|
|
"
|
|
HOMEPAGE="https://ne.di.unimi.it/"
|
|
COPYRIGHT="1993-1998 Sebastiano Vigna
|
|
1999-2022 Todd M. Lewis and Sebastiano Vigna"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="2"
|
|
SOURCE_URI="https://github.com/vigna/ne/archive/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="9b8b757db22bd8cb783cf063f514143a8c325e5c321af31901e0f76e77455417"
|
|
PATCHES="ne-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandBinDir=$binDir
|
|
commandSuffix=$secondaryArchSuffix
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandBinDir=$prefix/bin
|
|
commandSuffix=
|
|
fi
|
|
|
|
PROVIDES="
|
|
ne$secondaryArchSuffix = $portVersion
|
|
cmd:ne$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libncurses$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libncurses$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:makeinfo
|
|
cmd:perl
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
# We can't use "make" on the top-level makefile, because it will then ignore
|
|
# the value of NE_GLOBAL_DIR. The low-level src/makefile on the other hand,
|
|
# makes proper use of it.
|
|
|
|
# Force the early creation of "enums.h", as otherwise building with multiple jobs
|
|
# might fail if it gets generated too late ("ne.h" can not find "enums.h").
|
|
cd src;
|
|
make CC=gcc enums.h
|
|
make $jobArgs CC=gcc LIBS=-lncurses NE_GLOBAL_DIR=$dataDir/ne
|
|
|
|
cd ..
|
|
|
|
# Adjust mentions of "~/.ne" to "~/config/settings/ne"
|
|
# not using "`finddir B_USER_SETTINGS_DIRECTORY`" here, to keep it shorter.
|
|
local USER_SETTINGS_DIR="~/config/settings"
|
|
|
|
sed -i \
|
|
-e "s|~/\.ne|$USER_SETTINGS_DIR/ne|g" \
|
|
doc/ne.texinfo
|
|
|
|
sed -i \
|
|
-e "s|~/\.ne/|$USER_SETTINGS_DIR/ne/|" \
|
|
extensions
|
|
|
|
sed -i \
|
|
-e "s|~/\.ne/|$USER_SETTINGS_DIR/ne/|g" \
|
|
macros/aspell
|
|
|
|
make docs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
mkdir -p $commandBinDir $dataDir/ne/syntax $dataDir/ne/macros $infoDir $manDir/man1 $docDir
|
|
|
|
cp -pf src/ne $commandBinDir
|
|
cp -p extensions $dataDir/ne
|
|
cp -p syntax/*.jsf $dataDir/ne/syntax
|
|
cp -p macros/* $dataDir/ne/macros
|
|
cp -p doc/ne.1 $manDir/man1
|
|
gunzip -c doc/ne.info.gz > $infoDir/ne.info
|
|
cp -pr doc/html doc/ne.txt doc/default.* README.md COPYING NEWS CHANGES $docDir
|
|
}
|