diff --git a/app-editors/ne/ne-3.1.1.recipe b/app-editors/ne/ne-3.1.1.recipe deleted file mode 100644 index f62c3f463..000000000 --- a/app-editors/ne/ne-3.1.1.recipe +++ /dev/null @@ -1,54 +0,0 @@ -SUMMARY="The 'nice editor'" -DESCRIPTION="ne is one of the few text editors which are \ -both easy to use for beginners and powerful enough for powerusers. \ -It supports UTF-8 and multi-column characters as well as syntax highlighting. \ -Is also has fully configurable key bindings and supports macros." -HOMEPAGE="https://ne.di.unimi.it/" -COPYRIGHT="1993-1998 Sebastiano Vigna - 1999-2010 Todd M. Lewis and Sebastiano Vigna" -LICENSE="GNU GPL v2" -REVISION="4" -SOURCE_URI="https://github.com/vigna/ne/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="a88a24153a17844bb2dfbc3c76a6fbd1d456ee0e8215d5139551cf082627596a" -PATCHES="ne-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - ne$secondaryArchSuffix = $portVersion - cmd:ne$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - cmd:aspell - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libncurses$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - makefile_engine - cmd:gcc$secondaryArchSuffix - cmd:make - cmd:makeinfo - cmd:perl - " - -BUILD() -{ - make $jobArgs CC=gcc NE_ANSI=1 NE_TERMCAP=1 NE_GLOBAL_DIR=$dataDir/ne -} - -INSTALL() -{ - mkdir -p $binDir $manDir/man1 $dataDir/ne/syntax $docDir - - cp -pf src/ne $binDir - cp -p syntax/*.jsf $dataDir/ne/syntax - cp -pr macros $dataDir/ne - cp -pr doc/html doc/ne.txt doc/default.* \ - README.md COPYING NEWS CHANGES $docDir - cp -p doc/ne.1 $manDir/man1 -} diff --git a/app-editors/ne/ne-3.3.2.recipe b/app-editors/ne/ne-3.3.2.recipe new file mode 100644 index 000000000..42e4473dc --- /dev/null +++ b/app-editors/ne/ne-3.3.2.recipe @@ -0,0 +1,96 @@ +SUMMARY="The 'nice editor'" +DESCRIPTION="ne is one of the few text editors which are \ +both easy to use for beginners and powerful enough for powerusers. \ +It supports UTF-8 and multi-column characters as well as syntax highlighting. \ +Is also has fully configurable key bindings and supports macros." +HOMEPAGE="https://ne.di.unimi.it/" +COPYRIGHT="1993-1998 Sebastiano Vigna + 1999-2022 Todd M. Lewis and Sebastiano Vigna" +LICENSE="GNU GPL v2" +REVISION="1" +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 + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + ncurses6 # for the terminfo/termcap database + " +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 NE_ANSI=1 NE_TERMCAP=1 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 + + # Provide an optional fix to the "backspace not working" issue. + cat > $dataDir/ne/fix_backspace.keys <<-EOF + # Fix Backspace vs Delete issue. Copy this file as ~/config/settings/ne/.keys + # or add the following lines to that file, if it already exists. + KEY 0x7f BackSpace + KEY 0x115 DeleteChar + EOF +} diff --git a/app-editors/ne/patches/ne-3.1.1.patchset b/app-editors/ne/patches/ne-3.1.1.patchset deleted file mode 100644 index dda76103b..000000000 --- a/app-editors/ne/patches/ne-3.1.1.patchset +++ /dev/null @@ -1,51 +0,0 @@ -From 975db08b98b3bbeb2045112a5e983a1feead3e99 Mon Sep 17 00:00:00 2001 -From: Humdinger -Date: Sun, 11 Jun 2017 09:12:18 +0200 -Subject: Adjust path to perl - - -diff --git a/src/copyright++.pl b/src/copyright++.pl -index 7d6bdd0..b756106 100755 ---- a/src/copyright++.pl -+++ b/src/copyright++.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/bin/perl -w - - use strict; - $| = 1; -diff --git a/src/info2src.pl b/src/info2src.pl -index 43778b5..75e463d 100755 ---- a/src/info2src.pl -+++ b/src/info2src.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/bin/perl -w - - use strict; - $| = 1; -diff --git a/src/request.c b/src/request.c -index 2023586..8b06433 100644 ---- a/src/request.c -+++ b/src/request.c -@@ -81,7 +81,7 @@ static bool prune; - $M names_per_page - $x NAMES_PER_LINE(p) - --#!/usr/bin/perl -w -+#!/bin/perl -w - use strict; - my ($X,$Y,$M,$N,$x,$y,$n); - use integer; # use integer math, like C macros do -diff --git a/version.pl b/version.pl -index 81d14df..1dea8b1 100755 ---- a/version.pl -+++ b/version.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/bin/perl -w - # - # Usage: $0 [VERSION=XXXXX] - # --- -2.7.0 diff --git a/app-editors/ne/patches/ne-3.3.2.patchset b/app-editors/ne/patches/ne-3.3.2.patchset new file mode 100644 index 000000000..49eff7ff6 --- /dev/null +++ b/app-editors/ne/patches/ne-3.3.2.patchset @@ -0,0 +1,28 @@ +From 9452565be9df0f5fdc8ca70569859ab2a06eb2ff Mon Sep 17 00:00:00 2001 +From: Oscar Lesta +Date: Thu, 27 Oct 2022 02:58:01 -0300 +Subject: Make PREFS_DIR be ~/config/settings/ne instead of "$HOME/.ne". + + +diff --git a/src/prefs.c b/src/prefs.c +index c02a819..38df834 100644 +--- a/src/prefs.c ++++ b/src/prefs.c +@@ -24,8 +24,12 @@ + #include + + /* These are the names of ne's autoprefs directory. */ +- +-#define PREFS_DIR ".ne" ++#ifdef __HAIKU__ ++ // This is used like this: $HOME/PREFS_DIR ++ #define PREFS_DIR "config/settings/ne" ++#else ++ #define PREFS_DIR ".ne" ++#endif + + /* This string is appended to the filename extension. It tries to + be enough strange to avoid clashes with macros. */ +-- +2.37.3 +