mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
turbo: new recipe. (#10136)
With thanks to @coolcoder613eb and @jackburton79 :-)
This commit is contained in:
60
app-editors/turbo/patches/turbo-2024.02.05~git.patchset
Normal file
60
app-editors/turbo/patches/turbo-2024.02.05~git.patchset
Normal file
@@ -0,0 +1,60 @@
|
||||
From a94d03a4e130747c6cd72f6017fe4ba76342db4a Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Sat, 24 Feb 2024 21:18:58 -0300
|
||||
Subject: Fix build on 32-bits.
|
||||
|
||||
Thanks to @jackburton79 for his patch to x11-libs/scintilla.
|
||||
|
||||
diff --git a/source/scintilla/src/CellBuffer.cxx b/source/scintilla/src/CellBuffer.cxx
|
||||
index 877a2c4..3812668 100644
|
||||
--- a/source/scintilla/src/CellBuffer.cxx
|
||||
+++ b/source/scintilla/src/CellBuffer.cxx
|
||||
@@ -153,6 +153,10 @@ class LineVector : public ILineVector {
|
||||
| (startsUTF16.Active() ? SC_LINECHARACTERINDEX_UTF16 : 0);
|
||||
}
|
||||
|
||||
+ static constexpr POS* pos_cast(const Sci::Position* pos) noexcept {
|
||||
+ return (POS*)(pos);
|
||||
+ }
|
||||
+
|
||||
public:
|
||||
LineVector() : starts(256), perLine(nullptr), activeIndices(0) {
|
||||
}
|
||||
@@ -197,7 +201,7 @@ public:
|
||||
void InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) override {
|
||||
const POS lineAsPos = static_cast<POS>(line);
|
||||
if constexpr (sizeof(Sci::Position) == sizeof(POS)) {
|
||||
- starts.InsertPartitions(lineAsPos, positions, lines);
|
||||
+ starts.InsertPartitions(lineAsPos, pos_cast(positions), lines);
|
||||
} else {
|
||||
starts.InsertPartitionsWithCast(lineAsPos, positions, lines);
|
||||
}
|
||||
--
|
||||
2.43.2
|
||||
|
||||
|
||||
From d0c42b6e0031dea7493a652d7390d2b4d033eb66 Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Sat, 24 Feb 2024 22:36:49 -0300
|
||||
Subject: Fix "RunStyles<>"-related "undefined references" linking errors.
|
||||
|
||||
Thanks to @coolcoder613eb for the fix! :-)
|
||||
|
||||
diff --git a/source/scintilla/src/RunStyles.cxx b/source/scintilla/src/RunStyles.cxx
|
||||
index 2bcf208..29c1213 100644
|
||||
--- a/source/scintilla/src/RunStyles.cxx
|
||||
+++ b/source/scintilla/src/RunStyles.cxx
|
||||
@@ -309,6 +309,10 @@ void RunStyles<DISTANCE, STYLE>::Check() const {
|
||||
|
||||
template class Scintilla::RunStyles<int, int>;
|
||||
template class Scintilla::RunStyles<int, char>;
|
||||
+#if defined(__i386__)
|
||||
+template class Scintilla::RunStyles<long, int>;
|
||||
+template class Scintilla::RunStyles<long, char>;
|
||||
+#endif
|
||||
#if (PTRDIFF_MAX != INT_MAX) || PLAT_HAIKU
|
||||
template class Scintilla::RunStyles<ptrdiff_t, int>;
|
||||
template class Scintilla::RunStyles<ptrdiff_t, char>;
|
||||
--
|
||||
2.43.2
|
||||
|
||||
75
app-editors/turbo/turbo-2024.02.05~git.recipe
Normal file
75
app-editors/turbo/turbo-2024.02.05~git.recipe
Normal file
@@ -0,0 +1,75 @@
|
||||
SUMMARY="An experimental text editor based on Scintilla and Turbo Vision"
|
||||
DESCRIPTION="Turbo is an experimental text editor for the terminal, based on the Scintilla code \
|
||||
editing component by Neil Hodgson and the Turbo Vision application framework.
|
||||
|
||||
It was created to demonstrate new features in Turbo Vision. In particular, it has served as \
|
||||
testing ground for Turbo Vision's Unicode capabilities.
|
||||
|
||||
As a text editor, Turbo aims at being intuitive and easy to use. Usability and productivity are \
|
||||
its two other major objectives, although it has not got that far yet. And only for being a \
|
||||
Turbo Vision application, it offers a vintage look and feel."
|
||||
HOMEPAGE="https://github.com/magiblot/turbo/"
|
||||
COPYRIGHT="2020 magiblot1"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
srcGitRev="3251358bb06e277309b9ae678f1c88c315c7f856"
|
||||
SOURCE_URI="https://github.com/magiblot/turbo/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="e14ae3bcecb0b9b8eace06298b59d8f35cbfbf4513431bfd1cfc2edd666b6fdf"
|
||||
SOURCE_DIR="turbo-$srcGitRev"
|
||||
PATCHES="turbo-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandBinDir=$prefix/bin
|
||||
commandSuffix=
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
turbo$secondaryArchSuffix = $portVersion
|
||||
cmd:turbo$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libtvision$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libtvision$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DTURBO_OPTIMIZE_BUILD=NO \
|
||||
-DTURBO_USE_SYSTEM_TVISION=YES
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# This ends up installing also the included libturbo-core.a, headers, etc.
|
||||
# cmake --install build --strip
|
||||
|
||||
# Do a manual installation instead:
|
||||
mkdir $commandBinDir
|
||||
cp -a build/turbo $commandBinDir
|
||||
strip $commandBinDir/turbo
|
||||
|
||||
mkdir -p $manDir/man1
|
||||
cp -a doc/turbo.1 $manDir/man1
|
||||
}
|
||||
Reference in New Issue
Block a user