mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
107 lines
2.6 KiB
Bash
107 lines
2.6 KiB
Bash
SUMMARY="A lightweight text editor written in Lua"
|
|
DESCRIPTION="Lite XL is derived from lite. It is a lightweight text editor written mostly in Lua \
|
|
It aims to provide something practical, pretty, small and fast easy to modify and extend, \
|
|
or to use without doing either.
|
|
|
|
The aim of Lite XL compared to lite is to be more user friendly, improve the quality of font \
|
|
rendering, and reduce CPU usage."
|
|
HOMEPAGE="https://lite-xl.com/"
|
|
COPYRIGHT="2022-present Lite XL Team
|
|
2020-2022 Francesco Abbate
|
|
2020 rxi
|
|
"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
# Lite-XL
|
|
SOURCE_URI="https://github.com/lite-xl/lite-xl/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="fcaffb946bc60583369cb040d533a4ac18075a6d474d49a2a5ff4bf87e2e9a10"
|
|
SOURCE_DIR="lite-xl-$portVersion"
|
|
SOURCE_FILENAME="lite-xl-$portVersion.tar.gz"
|
|
# Lua 5.4
|
|
luaver="5.4.6"
|
|
SOURCE_URI_2="https://www.lua.org/ftp/lua-$luaver.tar.gz"
|
|
CHECKSUM_SHA256_2="7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88"
|
|
SOURCE_FILENAME_2="lua-$luaver.tar.gz"
|
|
SOURCE_DIR_2="lua-$luaver"
|
|
PATCHES_2="
|
|
buildfiles.patch
|
|
lua-unicode.diff
|
|
"
|
|
# deps end
|
|
PATCHES="lite_xl-$portVersion.patch"
|
|
ADDITIONAL_FILES="lite-xl.rdef.in"
|
|
|
|
ARCHITECTURES="all ?x86_gcc2"
|
|
|
|
PROVIDES="
|
|
lite_xl = $portVersion
|
|
app:lite_xl = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
lib:libedit
|
|
lib:libfreetype
|
|
lib:libpcre2_8
|
|
lib:libreadline
|
|
lib:libsdl3
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
devel:libedit
|
|
devel:libfreetype
|
|
devel:libpcre2_8
|
|
devel:libreadline
|
|
devel:libsdl3
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc
|
|
cmd:install
|
|
cmd:meson
|
|
cmd:pkg_config
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
ln -sf $sourceDir2 $sourceDir/subprojects/lua
|
|
rm $sourceDir/subprojects/lua.wrap
|
|
|
|
meson setup --buildtype=release \
|
|
--prefix=$prefix \
|
|
--datadir=$dataDir \
|
|
--bindir=$appsDir \
|
|
--reconfigure \
|
|
build
|
|
meson compile -C build
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
mkdir -p $appsDir $dataDir $binDir $docDir
|
|
meson install --skip-subprojects -C build
|
|
install -m 0755 $binDir/lite-xl "$appsDir/Lite XL"
|
|
rm $binDir/lite-xl
|
|
rmdir $binDir
|
|
rm -rf $docDir # doc only contains the MIT license as of writing
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local APP_NAME="Lite XL"
|
|
local LONG_INFO="$SUMMARY"
|
|
local APP_SIGNATURE="application/x-vnd.lite-xl"
|
|
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/lite-xl.rdef.in > lite-xl.rdef
|
|
|
|
addResourcesToBinaries lite-xl.rdef "$appsDir/Lite XL"
|
|
|
|
addAppDeskbarSymlink "$appsDir/Lite XL"
|
|
}
|