KLines: add recipe

This commit is contained in:
Gerasim Troeglazov
2021-01-01 17:12:01 +10:00
parent 95b554b9c6
commit ac4dc404f7
3 changed files with 188 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "KLines",
long_info = "@LONG_INFO@"
};
resource app_signature "@APP_SIGNATURE@";
resource("QT:QPA_FLAGS") "Q_KILL_ON_EXIT";
resource vector_icon {
$"6E636966020500020106023DEC000000000000003E060049680048BC0000CEEE"
$"FFB300337F0400000000000002044030C34530BC3A30304030BC3A30C3454050"
$"BC3A50C34550504050C34550BC3A040A00020203123FAC000000000000003FA3"
$"FFC6FC00C6E3FF01158300040A010103023F630D0000000000003F5F80C66C2F"
$"C6613A0A00020203123FAC000000000000003FA3FF4801FF480E000115830004"
$"0A010103023F630D0000000000003F5F804849E8484F62"
};

View File

@@ -0,0 +1,129 @@
SUMMARY="A simple but highly addictive one player game"
DESCRIPTION="KThe player has to move the colored balls around the game board, \
gathering them into the lines of the same color by five. Once the line is complete \
it is removed from the board, therefore freeing precious space. In the same time \
the new balls keep arriving by three after each move, filling up the game board."
HOMEPAGE="https://github.com/KDE/klines"
COPYRIGHT="2010-2020 KDE Organisation"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/klines-$portVersion.tar.xz"
CHECKSUM_SHA256="306ed70f9cb789455223bb9d9de74020df2f2622af917d6c8f84cecc15b71479"
SOURCE_DIR="klines-$portVersion"
PATCHES="klines-$portVersion.patchset"
ADDITIONAL_FILES="klines.rdef.in"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
klines$secondaryArchSuffix = $portVersion
app:KLines$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libKF5Archive$secondaryArchSuffix
lib:libKF5Auth$secondaryArchSuffix
lib:libKF5Bookmarks$secondaryArchSuffix
lib:libKF5Codecs$secondaryArchSuffix
lib:libKF5Completion$secondaryArchSuffix
lib:libKF5ConfigCore$secondaryArchSuffix
lib:libKF5ConfigGui$secondaryArchSuffix
lib:libKF5ConfigWidgets$secondaryArchSuffix
lib:libKF5CoreAddons$secondaryArchSuffix
lib:libKF5Crash$secondaryArchSuffix
lib:libKF5DBusAddons$secondaryArchSuffix
lib:libKF5GuiAddons$secondaryArchSuffix
lib:libKF5I18n$secondaryArchSuffix
lib:libKF5IconThemes$secondaryArchSuffix
lib:libKF5ItemViews$secondaryArchSuffix
lib:libKF5KDEGames$secondaryArchSuffix
lib:libKF5TextEditor$secondaryArchSuffix
lib:libKF5TextWidgets$secondaryArchSuffix
lib:libKF5WidgetsAddons$secondaryArchSuffix
lib:libKF5WindowSystem$secondaryArchSuffix
lib:libKF5XmlGui$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5DBus$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix >= 5.77
devel:libKF5Archive$secondaryArchSuffix
devel:libKF5Auth$secondaryArchSuffix
devel:libKF5Bookmarks$secondaryArchSuffix
devel:libKF5Codecs$secondaryArchSuffix
devel:libKF5Completion$secondaryArchSuffix
devel:libKF5ConfigCore$secondaryArchSuffix
devel:libKF5ConfigWidgets$secondaryArchSuffix
devel:libKF5CoreAddons$secondaryArchSuffix
devel:libKF5Crash$secondaryArchSuffix
devel:libKF5DBusAddons$secondaryArchSuffix
devel:libKF5DocTools$secondaryArchSuffix
devel:libKF5GuiAddons$secondaryArchSuffix
devel:libKF5I18n$secondaryArchSuffix
devel:libKF5IconThemes$secondaryArchSuffix
devel:libKF5ItemModels$secondaryArchSuffix
devel:libKF5ItemViews$secondaryArchSuffix
devel:libKF5KDEGames$secondaryArchSuffix
devel:libKF5TextEditor$secondaryArchSuffix
devel:libKF5TextWidgets$secondaryArchSuffix
devel:libKF5WidgetsAddons$secondaryArchSuffix
devel:libKF5WindowSystem$secondaryArchSuffix
devel:libKF5XmlGui$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix >= 5.15
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
# disable docs generation
sed -e '/add_subdirectory(doc)/ s/^#*/#/' -i CMakeLists.txt
sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$appsDir \
-DCMAKE_INSTALL_DATADIR=$dataDir \
-DCMAKE_INSTALL_DATAROOTDIR=$dataDir \
-DSHARE_INSTALL_PREFIX=$dataDir \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
make $jobArgs
}
INSTALL()
{
cd build
make install
mv $appsDir/bin/klines $appsDir/KLines
rm -rf $appsDir/bin
local APP_SIGNATURE="application/x-vnd.kde-klines"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/klines.rdef.in > klines.rdef
addResourcesToBinaries klines.rdef $appsDir/KLines
addAppDeskbarSymlink $appsDir/KLines
}

View File

@@ -0,0 +1,32 @@
From f5ac07e0700428c95f609f59d7c8a9aae8a2026e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 1 Jan 2021 02:41:32 +1000
Subject: Disable dbus
diff --git a/main.cpp b/main.cpp
index be0a0be..d4f2e9d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -58,7 +58,10 @@ int main( int argc, char **argv )
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
-
+#ifdef __HAIKU__
+ KLinesMainWindow *window = new KLinesMainWindow;
+ window->show();
+#else
KDBusService service;
if (app.isSessionRestored())
kRestoreMainWindows<KLinesMainWindow>();
@@ -66,5 +69,6 @@ int main( int argc, char **argv )
KLinesMainWindow *window = new KLinesMainWindow;
window->show();
}
+#endif
return app.exec();
}
--
2.28.0