diff options
| author | Marcin Serwin <marcin@serwin.dev> | 2025-09-21 22:24:59 +0200 |
|---|---|---|
| committer | Marcin Serwin <marcin@serwin.dev> | 2025-12-25 12:24:41 +0100 |
| commit | 5e88eb2014a61515a3ac21bfe642b0db35a095fd (patch) | |
| tree | 3a1b04073bde910db5d1cd7c78d1fe3cdedcb533 /pkgs/games | |
| parent | stuntrally: 2.7 -> 3.3 (diff) | |
| download | nixpkgs-5e88eb2014a61515a3ac21bfe642b0db35a095fd.tar.gz | |
stuntrally: move to by-name
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
Diffstat (limited to 'pkgs/games')
| -rw-r--r-- | pkgs/games/stuntrally/default.nix | 106 | ||||
| -rw-r--r-- | pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch | 38 | ||||
| -rw-r--r-- | pkgs/games/stuntrally/mygui.nix | 65 | ||||
| -rw-r--r-- | pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch | 26 | ||||
| -rw-r--r-- | pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch | 45 |
5 files changed, 0 insertions, 280 deletions
diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/games/stuntrally/default.nix deleted file mode 100644 index 4ab171a6d40f..000000000000 --- a/pkgs/games/stuntrally/default.nix +++ /dev/null @@ -1,106 +0,0 @@ -{ - lib, - fetchFromGitHub, - stdenv, - callPackage, - cmake, - boost, - SDL2, - libvorbis, - pkg-config, - enet, - bullet, - openal, - tinyxml-2, - rapidjson, - ogre-next, - ninja, - libX11, -}: - -let - mygui = callPackage ./mygui.nix { }; -in -stdenv.mkDerivation rec { - pname = "stuntrally"; - version = "3.3"; - - src = fetchFromGitHub { - owner = "stuntrally"; - repo = "stuntrally3"; - tag = version; - hash = "sha256-BJMMsJ/ONZTpvXetaaHlgm6rih9oZmtJNBXv0IM855Y="; - }; - - tracks = fetchFromGitHub { - owner = "stuntrally"; - repo = "tracks3"; - tag = version; - hash = "sha256-nvIN5hIfTfnuJdlLNlmpmYo3WQhUxYWz14OFra/55w4="; - }; - - patches = [ - ./stuntrally-use-pkg-config-for-ogre-next.patch - ./stuntrally-init-data-dirs-to-nix-paths.patch - ]; - - postPatch = '' - substituteInPlace bin/Release/plugins.cfg \ - --replace-fail "PluginFolder=." "PluginFolder=${ogre-next}/lib/OGRE/" - substituteInPlace src/vdrift/paths.cpp \ - --replace-fail "@GAME_DATA_DIR@" "$out/share/stuntrally3/data" \ - --replace-fail "@GAME_CONFIG_DIR@" "$out/share/stuntrally3/config" - ''; - - nativeBuildInputs = [ - cmake - pkg-config - ninja - ]; - - buildInputs = [ - boost - ogre-next - mygui - rapidjson - SDL2 - libvorbis - enet - bullet - openal - tinyxml-2 - libX11 - ]; - - installPhase = '' - runHook preInstall - - pushd .. - - share_dir=$out/share/stuntrally3 - mkdir -p $share_dir - cp -r config $share_dir/config - cp bin/Release/plugins.cfg $share_dir/config - cp -r data $share_dir/data - cp -r ${tracks} $share_dir/data/tracks - - mkdir -p $out/bin - cp bin/Release/{sr-editor3,sr-translator,stuntrally3} $out/bin - - popd - - runHook postInstall - ''; - - passthru = { - inherit mygui; - }; - - meta = { - description = "Stunt Rally game with Track Editor, based on VDrift and OGRE"; - homepage = "http://stuntrally.tuxfamily.org/"; - license = lib.licenses.gpl3Plus; - maintainers = with lib.maintainers; [ pSub ]; - platforms = lib.platforms.linux; - }; -} diff --git a/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch b/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch deleted file mode 100644 index e5f0fc0d3cb5..000000000000 --- a/pkgs/games/stuntrally/mygui-use-pkg-config-for-ogre-next.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake -index fcf7cc4..7239f20 100644 ---- a/CMake/Dependencies.cmake -+++ b/CMake/Dependencies.cmake -@@ -84,7 +84,10 @@ elseif(MYGUI_RENDERSYSTEM EQUAL 7) - endif() - elseif(MYGUI_RENDERSYSTEM EQUAL 8) - # Find OGRE -- find_package(OGRE_next) -+ find_package(PkgConfig REQUIRED) -+ pkg_check_modules(OGRE REQUIRED IMPORTED_TARGET GLOBAL OGRE) -+ pkg_check_modules(OGRE_HLMS REQUIRED IMPORTED_TARGET GLOBAL OGRE-Hlms) -+ set(OGRE_INCLUDE_DIR "${OGRE_INCLUDE_DIRS}") - macro_log_feature(OGRE_FOUND "ogre" "Support for the Ogre render system" "" TRUE "" "") - endif() - -diff --git a/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt b/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt -index c40cd8f..2647ae8 100644 ---- a/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt -+++ b/Platforms/Ogre2/Ogre2Platform/CMakeLists.txt -@@ -1,6 +1,6 @@ - set (PROJECTNAME MyGUI.Ogre2Platform) - --message(STATUS "Platform Ogre-next:" ${OGRE_NEXT}) -+message(STATUS "Platform Ogre-next: ${OGRE_HLMS_INCLUDE_DIRS}") - - include_directories( - include -@@ -8,8 +8,7 @@ include_directories( - ${OGRE_CONFIG_INCLUDE_DIR} - ${OGRE_INCLUDE_DIR} - ${OGRE_SOURCE_DIR} -- ${OGRE_NEXT}/Components/Hlms/Unlit/include -- ${OGRE_NEXT}/Components/Hlms/Common/include -+ ${OGRE_HLMS_INCLUDE_DIRS} - ) - - include(${PROJECTNAME}.list) diff --git a/pkgs/games/stuntrally/mygui.nix b/pkgs/games/stuntrally/mygui.nix deleted file mode 100644 index 111d3fe2266d..000000000000 --- a/pkgs/games/stuntrally/mygui.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - cmake, - pkg-config, - ninja, - boost, - freetype, - libuuid, - ois, - ogre-next, - libX11, -}: -stdenv.mkDerivation { - pname = "mygui"; - version = "0-unstable-2024-02-01"; - - __structuredAttrs = true; - strictDeps = true; - - src = fetchFromGitHub { - owner = "cryham"; - repo = "mygui-next"; - rev = "a1490ffe01d503c31a00d8277007ffcb27a4258e"; - hash = "sha256-R80rTsbmkYtrjIYqdYmbfciEM4rtEzLtsM4XfShJwns="; - }; - - patches = [ ./mygui-use-pkg-config-for-ogre-next.patch ]; - - postPatch = '' - substituteInPlace CMakeLists.txt \ - --replace-fail 'cmake_minimum_required(VERSION 2.6)' \ - 'cmake_minimum_required(VERSION 3.10)' - ''; - - nativeBuildInputs = [ - cmake - pkg-config - ninja - ]; - - buildInputs = [ - boost - freetype - libuuid - ois - ogre-next - libX11 - ]; - - cmakeFlags = [ - (lib.cmakeBool "MYGUI_BUILD_DEMOS" false) - (lib.cmakeBool "MYGUI_BUILD_TOOLS" false) - (lib.cmakeBool "MYGUI_DONT_USE_OBSOLETE" true) - (lib.cmakeFeature "MYGUI_RENDERSYSTEM" "8") - ]; - - meta = { - description = "Library for creating GUIs for games and 3D applications (Stunt Rally fork)"; - homepage = "http://mygui.info/"; - license = lib.licenses.mit; - platforms = lib.platforms.linux; - }; -} diff --git a/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch b/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch deleted file mode 100644 index f02c20842004..000000000000 --- a/pkgs/games/stuntrally/stuntrally-init-data-dirs-to-nix-paths.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/common/Main.cpp b/src/common/Main.cpp -index f63a5b8..8260bcf 100644 ---- a/src/common/Main.cpp -+++ b/src/common/Main.cpp -@@ -154,7 +154,7 @@ void MainEntryPoints::createSystems( - PATHS::UserConfigDir()+"/", - PATHS::CacheDir()+"/", - PATHS::GameConfigDir()+"/", -- String("./") ); -+ PATHS::GameConfigDir()+"/" ); - - app->mGraphicsSystem = graphicsSystem; - -diff --git a/src/vdrift/paths.cpp b/src/vdrift/paths.cpp -index 9122031..d06bb59 100755 ---- a/src/vdrift/paths.cpp -+++ b/src/vdrift/paths.cpp -@@ -145,6 +145,8 @@ void PATHS::Init(bool log_paths) - fs::path exe = execname(); // binary dir - game_bin = exe.parent_path().string(); - -+ game_data = "@GAME_DATA_DIR@"; -+ game_config = "@GAME_CONFIG_DIR@"; - - // Find game data dir and defaults config dir - char *datadir = getenv("STUNTRALLY3_DATA_ROOT"); diff --git a/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch b/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch deleted file mode 100644 index 6271caaea3f8..000000000000 --- a/pkgs/games/stuntrally/stuntrally-use-pkg-config-for-ogre-next.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/CMake/DependenciesConfig.cmake b/CMake/DependenciesConfig.cmake -index aca28ea..76f4186 100644 ---- a/CMake/DependenciesConfig.cmake -+++ b/CMake/DependenciesConfig.cmake -@@ -7,11 +7,14 @@ find_package(Bullet REQUIRED) - find_package(enet REQUIRED) - find_package(MyGUI REQUIRED) - find_package(Ogg REQUIRED) --find_package(OGRE REQUIRED) -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(OGRE REQUIRED IMPORTED_TARGET GLOBAL OGRE) -+pkg_check_modules(OGRE-Hlms REQUIRED IMPORTED_TARGET GLOBAL OGRE-Hlms) -+pkg_check_modules(OGRE-Overlay REQUIRED IMPORTED_TARGET GLOBAL OGRE-Overlay) - find_package(OpenAL REQUIRED) - find_package(RapidJSON REQUIRED) - find_package(SDL2 REQUIRED) - find_package(tinyxml2 REQUIRED) - find_package(Vorbis REQUIRED) - --include(AddMissingTargets) -\ No newline at end of file -+include(AddMissingTargets) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d84ae0c..22c367d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -175,14 +175,16 @@ foreach( EXE ${EXE_LIST} ) - endif () - - target_link_libraries( -- ${EXE} -+ ${EXE} - PRIVATE - boost::boost - Bullet::Bullet - enet::enet - MyGUI::MyGUI - Ogg::ogg -- OGRE::OGRE -+ PkgConfig::OGRE -+ PkgConfig::OGRE-Hlms -+ PkgConfig::OGRE-Overlay - OpenAL::OpenAL - rapidjson - SDL2::SDL2 |
