Files
haikuports/app-editors/featherpad/featherpad-1.5.1.recipe
2024-05-08 08:29:00 +02:00

106 lines
3.4 KiB
Bash

SUMMARY="A lightweight plain-text editor"
DESCRIPTION="FeatherPad is a lightweight Qt text editor. It is independent of any desktop \
environment and has:
* Drag-and-drop support, including tab detachment and attachment
* X11 virtual desktop awareness (using tabs on current desktop but opening a new window on another)
* An optionally permanent search-bar with a different search entry for each tab
* Instant highlighting of found matches when searching
* A docked window for text replacement
* Support for showing line numbers and jumping to a specific line
* Optional selection highlighting
* Automatic detection of text encoding as far as possible and optional saving with encoding
* Syntax highlighting for common programming languages
* Ability to open URLs with appropriate applications
* Session management
* Side-pane mode
* Auto-saving
* Spell checking with Hunspell
* Printing
* Text zooming
* Appropriate but non-interrupting prompts"
HOMEPAGE="https://github.com/tsujan/FeatherPad"
COPYRIGHT="2014-2023 Pedram Pourang"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/tsujan/FeatherPad/archive/refs/tags/V$portVersion.tar.gz"
CHECKSUM_SHA256="2826b3dc26877284d7bb5b62430e99b4fbcf45862af89549e4b4e9f40b16c3c5"
SOURCE_FILENAME="FeatherPad-$portVersion-tar.gz"
SOURCE_DIR="FeatherPad-$portVersion"
PATCHES="featherpad-$portVersion.patchset"
ADDITIONAL_FILES="featherpad.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
featherpad$secondaryArchSuffix = $portVersion
app:FeatherPad$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libhunspell_1.7$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6PrintSupport$secondaryArchSuffix
lib:libQt6Svg$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
qt6_tools${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libhunspell_1.7$secondaryArchSuffix
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Gui$secondaryArchSuffix
devel:libQt6PrintSupport$secondaryArchSuffix
devel:libQt6Svg$secondaryArchSuffix
devel:libQt6Widgets$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:linguist6$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
cmake -B build -S . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$prefix
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# FIXME we should provide cmd:featherpad and cmd:fpad but symlinks cause separate settings
# directories to be created when the app launches
#mkdir -pv $prefix/bin
#ln -sfv $appsDir/FeatherPad $prefix/bin/featherpad
#ln -sfv $appsDir/FeatherPad $prefix/bin/fpad
local APP_SIGNATURE="application/x-vnd.featherpad"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/featherpad.rdef.in > featherpad.rdef
addResourcesToBinaries featherpad.rdef $appsDir/FeatherPad
addAppDeskbarSymlink $appsDir/FeatherPad "FeatherPad"
}