mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
Dust Racing 2D: Add recipe (#10302)
* dustrac: Add recipe * dustrac: improve installation layout, add rdef files, minor recipe adjustments --------- Co-authored-by: Julius Enriquez <win8linux@github.com> Co-authored-by: Chris Roberts <cpr420@gmail.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
resource app_flags B_EXCLUSIVE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "DustRacing2D-Editor",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
15
games-sports/dustrac/additional-files/DustRacing2D.rdef.in
Normal file
15
games-sports/dustrac/additional-files/DustRacing2D.rdef.in
Normal file
@@ -0,0 +1,15 @@
|
||||
resource app_flags B_EXCLUSIVE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "DustRacing2D",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
121
games-sports/dustrac/dustrac-2.1.1.recipe
Normal file
121
games-sports/dustrac/dustrac-2.1.1.recipe
Normal file
@@ -0,0 +1,121 @@
|
||||
SUMMARY="An open-source, tile-based 2D racing game with a level editor"
|
||||
DESCRIPTION="Dust Racing 2D (dustrac) is an open source, tile-based 2D racing game developed by \
|
||||
Jussi Lind and contributors.
|
||||
|
||||
The purpose of the game is to race against challenging computer players on different race tracks. \
|
||||
Finishing in TOP-6 will unlock a new race track. Only a small portion of the race track is visible \
|
||||
on the scrolling screen.
|
||||
|
||||
There's also an option for a split-screen two player game, introduced in 0.12.0. Dust Racing 2D \
|
||||
comes with a Qt-based level editor that makes creating new race tracks easy."
|
||||
HOMEPAGE="http://juzzlin.github.io/DustRacing2D"
|
||||
COPYRIGHT="2023 Jussi Lind and contributors"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/juzzlin/DustRacing2D/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="e028a49ad427fb0527b2bf05dad72404cc2d20883da1d330cb1319246bdc423a"
|
||||
SOURCE_FILENAME="dustrac-v$portVersion.tar.gz"
|
||||
SOURCE_DIR="DustRacing2D-$portVersion"
|
||||
PATCHES="dustrac-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
DustRacing2D.rdef.in
|
||||
DustRacing2D-Editor.rdef.in
|
||||
"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
dustrac$secondaryArchSuffix = $portVersion
|
||||
app:DustRacing2D = $portVersion
|
||||
app:DustRacing2D_Editor = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libGLU$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libopenal$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Designer$secondaryArchSuffix
|
||||
lib:libQt5DesignerComponents$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Help$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5Svg$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libGLU$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libopenal$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Help$secondaryArchSuffix
|
||||
devel:libQt5Designer$secondaryArchSuffix
|
||||
devel:libQt5DesignerComponents$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
devel:libQt5Svg$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:lrelease$secondaryArchSuffix >= 5
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DBIN_PATH=$appsDir/DustRacing2D \
|
||||
-DDATA_PATH=$dataDir/DustRacing2D \
|
||||
-DDOC_PATH=$docDir \
|
||||
-DReleaseBuild=ON
|
||||
cmake --build build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cmake --install build
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.dustracing2d"
|
||||
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/DustRacing2D.rdef.in > $sourceDir/DustRacing2D.rdef
|
||||
|
||||
APP_SIGNATURE="application/x-vnd.dustracing2d-editor"
|
||||
LONG_INFO="Level editor for the DustRacing2D game."
|
||||
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/DustRacing2D-Editor.rdef.in > $sourceDir/DustRacing2D-Editor.rdef
|
||||
|
||||
addResourcesToBinaries $sourceDir/DustRacing2D.rdef $appsDir/DustRacing2D/DustRacing2D
|
||||
addResourcesToBinaries $sourceDir/DustRacing2D-Editor.rdef $appsDir/DustRacing2D/DustRacing2D-Editor
|
||||
|
||||
addAppDeskbarSymlink $appsDir/DustRacing2D/DustRacing2D "Dust Racing 2D"
|
||||
addAppDeskbarSymlink $appsDir/DustRacing2D/DustRacing2D-Editor "Dust Racing 2D Editor"
|
||||
}
|
||||
69
games-sports/dustrac/patches/dustrac-2.1.1.patchset
Normal file
69
games-sports/dustrac/patches/dustrac-2.1.1.patchset
Normal file
@@ -0,0 +1,69 @@
|
||||
From b188c42b213698486d2d6c34dfe7d2169633714f Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sun, 7 Apr 2024 13:07:29 -0600
|
||||
Subject: disable installing extra files on Haiku
|
||||
|
||||
|
||||
diff --git a/InstallLinux.cmake b/InstallLinux.cmake
|
||||
index 3c4806f..6a20760 100644
|
||||
--- a/InstallLinux.cmake
|
||||
+++ b/InstallLinux.cmake
|
||||
@@ -90,15 +90,17 @@ function(setup_install_targets BIN_PATH DATA_PATH DOC_PATH)
|
||||
endif()
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/data/translations DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.qm")
|
||||
|
||||
- # Install .desktop files
|
||||
- install(FILES ${CMAKE_BINARY_DIR}/dustrac-game.desktop DESTINATION share/applications)
|
||||
- install(FILES ${CMAKE_BINARY_DIR}/dustrac-editor.desktop DESTINATION share/applications)
|
||||
+ if (NOT HAIKU)
|
||||
+ # Install .desktop files
|
||||
+ install(FILES ${CMAKE_BINARY_DIR}/dustrac-game.desktop DESTINATION share/applications)
|
||||
+ install(FILES ${CMAKE_BINARY_DIR}/dustrac-editor.desktop DESTINATION share/applications)
|
||||
|
||||
- # Install app store meta data
|
||||
- install(FILES src/dustrac.appdata.xml DESTINATION share/metainfo)
|
||||
+ # Install app store meta data
|
||||
+ install(FILES src/dustrac.appdata.xml DESTINATION share/metainfo)
|
||||
|
||||
- # Install icons
|
||||
- install(FILES data/icons/dustrac-game.png DESTINATION share/icons/hicolor/64x64/apps)
|
||||
- install(FILES data/icons/dustrac-editor.png DESTINATION share/icons/hicolor/64x64/apps)
|
||||
+ # Install icons
|
||||
+ install(FILES data/icons/dustrac-game.png DESTINATION share/icons/hicolor/64x64/apps)
|
||||
+ install(FILES data/icons/dustrac-editor.png DESTINATION share/icons/hicolor/64x64/apps)
|
||||
+ endif()
|
||||
|
||||
endfunction()
|
||||
--
|
||||
2.43.2
|
||||
|
||||
|
||||
From d152ce667ff0feb43193afce94deb7b5bc298617 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sun, 7 Apr 2024 13:42:26 -0600
|
||||
Subject: adjust executable names on Haiku
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ef09505..6c1b53a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -122,8 +122,13 @@ elseif(MSVC)
|
||||
add_definitions(-DNOMINMAX)
|
||||
endif()
|
||||
|
||||
-set(GAME_BINARY_NAME "dustrac-game")
|
||||
-set(EDITOR_BINARY_NAME "dustrac-editor")
|
||||
+if (HAIKU)
|
||||
+ set(GAME_BINARY_NAME "DustRacing2D")
|
||||
+ set(EDITOR_BINARY_NAME "DustRacing2D-Editor")
|
||||
+else()
|
||||
+ set(GAME_BINARY_NAME "dustrac-game")
|
||||
+ set(EDITOR_BINARY_NAME "dustrac-editor")
|
||||
+endif()
|
||||
|
||||
add_definitions(-DVERSION="${VERSION}")
|
||||
|
||||
--
|
||||
2.43.2
|
||||
|
||||
Reference in New Issue
Block a user