Files
haikuports/app-editors/ecode/ecode-0.7.2.recipe
2025-07-26 17:21:16 +00:00

106 lines
3.3 KiB
Bash

SUMMARY="Lightweight multi-platform code editor"
DESCRIPTION="ecode is a lightweight multi-platform code editor designed for modern hardware with \
a focus on responsiveness and performance. It has been developed with the hardware-accelerated \
eepp GUI, which provides the core technology for the editor. The project comes as the first \
serious project using the eepp GUI, and it's currently being developed to improve the eepp GUI \
library as part of one of its main objectives."
HOMEPAGE="https://github.com/SpartanJ/eepp"
COPYRIGHT="2024 Martín Lucas Golini"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/SpartanJ/eepp/archive/refs/tags/eepp-2.8.7.tar.gz"
CHECKSUM_SHA256="c2f03c27f6b68f15f37c055683a7a1dfa9492583d034d02c3c8801d2b31cbb25"
#SOURCE_FILENAME="eepp-2.8.7.tar.gz"
SOURCE_DIR="eepp-eepp-2.8.7"
# SOIL2
srcGitRev_2="111822e01ab3796eec1fffd9d2fbcdd3adeaf09f"
SOURCE_URI_2="https://github.com/SpartanJ/soil2/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="293e0bf4072c41ca6e71554ebd9d7241572c1637482d3e15d04d60201ce5f86e"
SOURCE_FILENAME_2="SOIL2-$srcGitRev_2.tar.gz"
SOURCE_DIR_2="SOIL2-$srcGitRev_2"
# efsw
srcGitRev_3="f4ec910175a2abcd8aaa193e7643739a1efad321"
SOURCE_URI_3="https://github.com/SpartanJ/efsw/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="dd9edab037322017d9043d055eb975e17544f4b320e47b0aa217822d15523460"
SOURCE_FILENAME_3="efsw-$srcGitRev_3.tar.gz"
SOURCE_DIR_3="efsw-$srcGitRev_3"
# premake-cmake
srcGitRev_4="8e02bb91a4d0f29d7540de7357574cf3b7c454f9"
SOURCE_URI_4="https://github.com/Jarod42/premake-cmake/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="0ca5cf35a93776a0aaae885fe0ddd327206135d84aba2aa3a90756de585b6945"
SOURCE_FILENAME_4="efsw-$srcGitRev_4.tar.gz"
SOURCE_DIR_4="premake-cmake-$srcGitRev_4"
# premake-ninja
srcGitRev_5="fe4b2f43df13695b8f28a65a6ecf1246bc853994"
SOURCE_URI_5="https://github.com/jimon/premake-ninja/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="6dfd38e34b1f5aa5be2608c1a8ac03ddcda61d26b014c0c79b6b8e522e7f4af1"
SOURCE_FILENAME_5="efsw-$srcGitRev_5.tar.gz"
SOURCE_DIR_5="premake-ninja-$srcGitRev_5"
ADDITIONAL_FILES="ecode.rdef.in"
ARCHITECTURES="!all x86_64"
PROVIDES="
ecode = $portVersion
cmd:ecode = $portVersion
"
REQUIRES="
haiku
lib:libGL
lib:libSDL2_2.0
"
BUILD_REQUIRES="
haiku_devel
devel:libGL
devel:libSDL2_2.0
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc
cmd:make
cmd:premake5
"
BUILD()
{
cp -r $sourceDir2/* src/thirdparty/SOIL2
cp -r $sourceDir3/* src/thirdparty/efsw
cp -r $sourceDir4/* premake/premake-cmake
cp -r $sourceDir5/* premake/premake-ninja
cd projects/haiku/ecode
./build.app.sh
}
INSTALL()
{
mkdir -p $appsDir/ecode
cp -rf ./projects/haiku/ecode/ecode.app/* $appsDir/ecode
rm -f $appsDir/ecode/lib/libSDL2*
rm -f $appsDir/ecode/ecode.png
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local APP_NAME="ecode"
local LONG_INFO="$SUMMARY"
local APP_SIGNATURE="application/x-vnd.ecode"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
-e "s|@APP_NAME@|$APP_NAME|" \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
$portDir/additional-files/ecode.rdef.in > ecode.rdef
addResourcesToBinaries ecode.rdef $appsDir/ecode/ecode
addAppDeskbarSymlink $appsDir/ecode/ecode ecode
}