diff --git a/app-editors/featherpad/additional-files/featherpad.rdef.in b/app-editors/featherpad/additional-files/featherpad.rdef.in index 5d482fd5d..4841cd8e9 100644 --- a/app-editors/featherpad/additional-files/featherpad.rdef.in +++ b/app-editors/featherpad/additional-files/featherpad.rdef.in @@ -12,7 +12,7 @@ resource app_version { internal = 0, short_info = "FeatherPad", - long_info = "Lightweight Qt5 text editor" + long_info = "Lightweight Qt text editor" }; resource app_signature "application/x-vnd.featherpad"; diff --git a/app-editors/featherpad/featherpad-1.4.1.recipe b/app-editors/featherpad/featherpad-1.4.1.recipe index 510968d12..f86abd0e1 100644 --- a/app-editors/featherpad/featherpad-1.4.1.recipe +++ b/app-editors/featherpad/featherpad-1.4.1.recipe @@ -1,5 +1,5 @@ SUMMARY="A lightweight plain-text editor" -DESCRIPTION="FeatherPad is a lightweight Qt5 plain-text editor. It is independent of any desktop \ +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 @@ -22,7 +22,7 @@ environment and has: HOMEPAGE="https://github.com/tsujan/FeatherPad" COPYRIGHT="2014-2023 Pedram Pourang" LICENSE="GNU GPL v3" -REVISION="2" +REVISION="3" SOURCE_URI="https://github.com/tsujan/FeatherPad/archive/refs/tags/V$portVersion.tar.gz" CHECKSUM_SHA256="e60258388ca3039e434d7b661548113057a85443a1a288843b5ec6044b4206dc" SOURCE_FILENAME="FeatherPad-$portVersion-tar.gz" @@ -51,6 +51,7 @@ REQUIRES=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel + qt6_tools${secondaryArchSuffix}_devel devel:libGL$secondaryArchSuffix devel:libhunspell_1.7$secondaryArchSuffix devel:libQt6Core$secondaryArchSuffix @@ -61,19 +62,19 @@ BUILD_REQUIRES=" devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" - cmd:find + cmd:cmake cmd:g++$secondaryArchSuffix cmd:ld$secondaryArchSuffix + cmd:linguist6$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix - cmd:cmake " BUILD() { cmake -B build -S . \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX:PATH="$appsDir/FeatherPad" \ + -DCMAKE_INSTALL_PREFIX:PATH="$prefix" \ -DENABLE_QT5=OFF make -C build $jobArgs @@ -83,8 +84,12 @@ INSTALL() { make -C build install - mv $appsDir/FeatherPad/featherpad \ - $appsDir/FeatherPad/FeatherPad + # 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`" @@ -97,6 +102,6 @@ INSTALL() -e "s|@MINOR@|$MINOR|" \ $portDir/additional-files/featherpad.rdef.in > featherpad.rdef - addResourcesToBinaries featherpad.rdef $appsDir/FeatherPad/FeatherPad - addAppDeskbarSymlink $appsDir/FeatherPad/FeatherPad "FeatherPad" + addResourcesToBinaries featherpad.rdef $appsDir/FeatherPad + addAppDeskbarSymlink $appsDir/FeatherPad "FeatherPad" } diff --git a/app-editors/featherpad/patches/featherpad-1.4.1.patchset b/app-editors/featherpad/patches/featherpad-1.4.1.patchset index 40a0115e9..c5330abd1 100644 --- a/app-editors/featherpad/patches/featherpad-1.4.1.patchset +++ b/app-editors/featherpad/patches/featherpad-1.4.1.patchset @@ -1,4 +1,4 @@ -From 7ac8e90375736bb4085476803d37716941ec4366 Mon Sep 17 00:00:00 2001 +From e08dfe9ee4217ae0145491283dba7077c091815e Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Sun, 7 Jan 2024 11:58:04 -0700 Subject: Use system icons by default on Haiku @@ -23,3 +23,119 @@ index 9360341..3b75d68 100644 -- 2.42.1 + +From 62eace94e9bd208162d356cd10a927ae5059e90c Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Sun, 7 Jan 2024 14:42:11 -0700 +Subject: Add .recipe files to sh syntax highlighter + + +diff --git a/featherpad/syntax.cpp b/featherpad/syntax.cpp +index d69c53d..c29ac64 100644 +--- a/featherpad/syntax.cpp ++++ b/featherpad/syntax.cpp +@@ -91,7 +91,8 @@ void FPwin::setProgLang (TextEdit *textEdit) + || baseName == ".xprofile" || baseName == ".profile" + || baseName == ".bash_aliases" || baseName == ".mkshrc" + || baseName == ".zprofile" || baseName == ".zlogin" +- || baseName == ".zshrc" || baseName == ".zshenv") ++ || baseName == ".zshrc" || baseName == ".zshenv" ++ || fname.endsWith (".recipe")) + progLan = "sh"; + else if (fname.endsWith (".rb")) + progLan = "ruby"; +-- +2.42.1 + + +From 5a6fea547faf33dc0f8632176735f5044cd688d4 Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Sun, 7 Jan 2024 19:34:26 -0700 +Subject: Remove Haiku specific customizations to the data directories + +These interfere with packaging layout by putting files in the top level when using haikuporter. +We'll use the standard 'featherpad' subdirectory. + +diff --git a/featherpad/CMakeLists.txt b/featherpad/CMakeLists.txt +index 118d542..34175a6 100644 +--- a/featherpad/CMakeLists.txt ++++ b/featherpad/CMakeLists.txt +@@ -189,7 +189,7 @@ if(Qt${QT_VERSION_MAJOR}LinguistTools_FOUND) + endif() + add_executable(featherpad ${featherpad_SRCS} ${featherpad_DBUS_SRCS} ${featherpad_RESOURCES} ${EXTRA_HEADERS} ${DESKTOP_FILE} ${QM_FILES}) + if(HAIKU) +- install(FILES ${QM_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/translations") ++ install(FILES ${QM_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/data/featherpad/translations") + elseif(APPLE) + SET_SOURCE_FILES_PROPERTIES(${QM_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/translations) + elseif(UNIX OR OS2) +@@ -232,9 +232,11 @@ endif() + + # installation + if(HAIKU) +- install(TARGETS featherpad RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) +- install(FILES ${HELP_FILE} DESTINATION "${CMAKE_INSTALL_PREFIX}/data") +- install(FILES ${HELP_TR_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/data") ++ set_target_properties(featherpad PROPERTIES OUTPUT_NAME FeatherPad) ++ install(TARGETS featherpad RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/apps) ++ install(FILES ${HELP_FILE} DESTINATION "${CMAKE_INSTALL_PREFIX}/data/featherpad") ++ # also install translated help files ++ install(FILES ${HELP_TR_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/data/featherpad") + elseif(APPLE) + SET_TARGET_PROPERTIES(featherpad PROPERTIES RESOURCE ${HELP_FILE}) + SET_TARGET_PROPERTIES(featherpad PROPERTIES RESOURCE ${HELP_TR_FILES}) +diff --git a/featherpad/fpwin.cpp b/featherpad/fpwin.cpp +index fb22688..1183861 100644 +--- a/featherpad/fpwin.cpp ++++ b/featherpad/fpwin.cpp +@@ -6364,9 +6364,7 @@ void FPwin::helpDoc() + if (!langs.isEmpty()) + lang = langs.first().replace ('-', '_'); + +-#if defined (Q_OS_HAIKU) +- QString helpPath (QStringLiteral (DATADIR) + "/help_" + lang); +-#elif defined (Q_OS_MAC) ++#if defined (Q_OS_MAC) + QString helpPath (qApp->applicationDirPath() + QStringLiteral ("/../Resources/") + "/help_" + lang); + #else + QString helpPath (QStringLiteral (DATADIR) + "/featherpad/help_" + lang); +@@ -6375,9 +6373,7 @@ void FPwin::helpDoc() + if (!QFile::exists (helpPath) && !langs.isEmpty()) + { + lang = langs.first().split (QLatin1Char ('_')).first(); +-#if defined(Q_OS_HAIKU) +- helpPath = QStringLiteral (DATADIR) + "/help_" + lang; +-#elif defined(Q_OS_MAC) ++#if defined(Q_OS_MAC) + helpPath = qApp->applicationDirPath() + QStringLiteral ("/../Resources/") + "/help_" + lang; + #else + helpPath = QStringLiteral (DATADIR) + "/featherpad/help_" + lang; +@@ -6386,9 +6382,7 @@ void FPwin::helpDoc() + + if (!QFile::exists (helpPath)) + { +-#if defined(Q_OS_HAIKU) +- helpPath = QStringLiteral (DATADIR) + "/help"; +-#elif defined(Q_OS_MAC) ++#if defined(Q_OS_MAC) + helpPath = qApp->applicationDirPath() + QStringLiteral ("/../Resources/") + "/help"; + #else + helpPath = QStringLiteral (DATADIR) + "/featherpad/help"; +diff --git a/featherpad/main.cpp b/featherpad/main.cpp +index 4738abd..edb083e 100644 +--- a/featherpad/main.cpp ++++ b/featherpad/main.cpp +@@ -112,9 +112,7 @@ int main (int argc, char **argv) + } + + QTranslator FPTranslator; +-#if defined(Q_OS_HAIKU) +- if (FPTranslator.load ("featherpad_" + lang, QStringLiteral (DATADIR) + "/../translations")) +-#elif defined(Q_OS_MAC) ++#if defined(Q_OS_MAC) + if (FPTranslator.load ("featherpad_" + lang, singleton.applicationDirPath() + QStringLiteral ("/../Resources/translations/"))) + #else + if (FPTranslator.load ("featherpad_" + lang, QStringLiteral (DATADIR) + "/featherpad/translations")) +-- +2.42.1 +