summary refs log tree commit diff
path: root/pkgs/games/performous
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-16 20:51:47 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-16 20:51:47 +0100
commit1b89ef3acc73d8698171aac0e253d2d6eeac94b0 (patch)
treeb554e36f009d0995325c7cba5a71cf1768edd179 /pkgs/games/performous
parent09091c7521e559542d0a720a9cccb363875d62e6 (diff)
downloadnixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.tar
nixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.tar.gz
nixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.tar.bz2
nixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.tar.lz
nixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.tar.xz
nixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.tar.zst
nixpkgs-1b89ef3acc73d8698171aac0e253d2d6eeac94b0.zip
performous: 1.1 -> 1.2.0
Diffstat (limited to 'pkgs/games/performous')
-rw-r--r--pkgs/games/performous/default.nix37
-rw-r--r--pkgs/games/performous/performous-cmake.patch93
-rw-r--r--pkgs/games/performous/performous-fftw.patch15
3 files changed, 59 insertions, 86 deletions
diff --git a/pkgs/games/performous/default.nix b/pkgs/games/performous/default.nix
index 10ce4dd06fc..7a58cc8e600 100644
--- a/pkgs/games/performous/default.nix
+++ b/pkgs/games/performous/default.nix
@@ -2,12 +2,16 @@
 , stdenv
 , fetchFromGitHub
 , SDL2
+, aubio
 , boost
 , cmake
 , ffmpeg
 , gettext
+, git
 , glew
 , glibmm
+, glm
+, icu
 , libepoxy
 , librsvg
 , libxmlxx
@@ -18,16 +22,31 @@
 
 stdenv.mkDerivation rec {
   pname = "performous";
-  version = "1.1";
+  version = "1.2.0";
 
   src = fetchFromGitHub {
-    owner = "performous";
-    repo = "performous";
-    rev = version;
-    hash = "sha256-neTHfug2RkcH/ZvAMCJv++IhygGU0L5Ls/jQYjLEQCI=";
+    owner = pname;
+    repo = pname;
+    rev = "refs/tags/${version}";
+    hash = "sha256-ueTSirov/lj4/IzaMqHitbOqx8qqUpsTghcb9DUnNEg=";
   };
 
-  patches = [ ./performous-cmake.patch ];
+  cedSrc = fetchFromGitHub {
+    owner = pname;
+    repo = "compact_enc_det";
+    rev = "9ca1351fe0b1e85992a407b0fc54a63e9b3adc6e";
+    hash = "sha256-ztfeblR4YnB5+lb+rwOQJjogl+C9vtPH9IVnYO7oxec=";
+  };
+
+  patches = [
+    ./performous-cmake.patch
+    ./performous-fftw.patch
+  ];
+
+  postPatch = ''
+    mkdir ced-src
+    cp -R ${cedSrc}/* ced-src
+  '';
 
   nativeBuildInputs = [
     cmake
@@ -37,10 +56,13 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     SDL2
+    aubio
     boost
     ffmpeg
     glew
     glibmm
+    glm
+    icu
     libepoxy
     librsvg
     libxmlxx
@@ -49,9 +71,10 @@ stdenv.mkDerivation rec {
   ];
 
   meta = with lib; {
-    homepage = "http://performous.org/";
     description = "Karaoke, band and dancing game";
+    homepage = "https://performous.org/";
     license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ wegank ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/games/performous/performous-cmake.patch b/pkgs/games/performous/performous-cmake.patch
index 59d2cc9a927..5c1a4c91012 100644
--- a/pkgs/games/performous/performous-cmake.patch
+++ b/pkgs/games/performous/performous-cmake.patch
@@ -1,86 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48af2a89..43786c31 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 2.8)
-+cmake_minimum_required(VERSION 3.6)
- project(Performous CXX C)
+@@ -75,15 +75,7 @@ else()
+ 	message(STATUS "Localization disabled: Gettext tools (msgfmt) missing")
+ endif()
  
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
---- a/cmake/Modules/FindPango.cmake
-+++ b/cmake/Modules/FindPango.cmake
-@@ -2,31 +2,10 @@
- # Once done, this will define
- #
- #  Pango_FOUND - system has Pango
--#  Pango_INCLUDE_DIRS - the Pango include directories
- #  Pango_LIBRARIES - link these to use Pango
- 
- include(LibFindMacros)
- 
--# Dependencies
--libfind_package(Pango Freetype)
--libfind_package(Pango Glib)
--libfind_package(Pango GObject)
--
--# Use pkg-config to get hints about paths
--libfind_pkg_check_modules(Pango_PKGCONF pango)
--
--# Include dir
--find_path(Pango_INCLUDE_DIR
--  NAMES pango/pango.h
--  HINTS ${Pango_PKGCONF_INCLUDE_DIRS}
--  PATH_SUFFIXES pango-1.0
+-include(FetchContent)
+-FetchContent_Declare(ced-sources
+-  GIT_REPOSITORY https://github.com/performous/compact_enc_det.git
+-  #https://github.com/google/compact_enc_det.git
+-  GIT_TAG        master
+-  SOURCE_DIR ced-src
 -)
 -
--# Finally the library itself
--find_library(Pango_LIBRARY
--  NAMES pango-1.0
--  HINTS ${Pango_PKGCONF_LIBRARY_DIRS}
--)
--
-+libfind_pkg_check_modules(Pango_PKGCONF IMPORTED_TARGET pango)
-+set(Pango_LIBRARY PkgConfig::Pango_PKGCONF)
- libfind_process(Pango)
--
---- a/cmake/Modules/FindPangoCairo.cmake
-+++ b/cmake/Modules/FindPangoCairo.cmake
-@@ -1,35 +1,11 @@
- # - Try to find PangoCairo
- # Once done, this will define
- #
--#  PangoCairo_FOUND - system has Pango
--#  PangoCairo_INCLUDE_DIRS - the Pango include directories
--#  PangoCairo_LIBRARIES - link these to use Pango
-+#  PangoCairo_FOUND - system has PangoCairo
-+#  PangoCairo_LIBRARIES - link these to use PangoCairo
+-FetchContent_MakeAvailable(ced-sources)
++add_subdirectory(ced-src)
  
- include(LibFindMacros)
+ option(USE_SELF_BUILT_AUBIO "Use custom aubio local build instead of using system lib (if available)" FALSE)
  
--# Dependencies
--libfind_package(PangoCairo Pango)
--libfind_package(PangoCairo Cairo)
--
--# Use pkg-config to get hints about paths
--libfind_pkg_check_modules(PangoCairo_PKGCONF pangocairo)
--
--# Include dir
--find_path(PangoCairo_INCLUDE_DIR
--  NAMES pango/pangocairo.h
--  HINTS ${PangoCairo_PKGCONF_INCLUDE_DIRS}
--  PATH_SUFFIXES pango-1.0
--)
--
--# Finally the library itself
--find_library(PangoCairo_LIBRARY
--  NAMES pangocairo-1.0
--  HINTS ${PangoCairo_PKGCONF_LIBRARY_DIRS}
--)
--
--# Set the include dir variables and the libraries and let libfind_process do the rest.
--# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
--set(PangoCairo_PROCESS_INCLUDES PangoCairo_INCLUDE_DIR Pango_INCLUDE_DIR Cairo_INCLUDE_DIR)
--set(PangoCairo_PROCESS_LIBS PangoCairo_LIBRARY Pango_LIBRARY Cairo_LIBRARY)
-+libfind_pkg_check_modules(PangoCairo_PKGCONF IMPORTED_TARGET pangocairo)
-+set(PangoCairo_LIBRARY PkgConfig::PangoCairo_PKGCONF)
- libfind_process(PangoCairo)
--
diff --git a/pkgs/games/performous/performous-fftw.patch b/pkgs/games/performous/performous-fftw.patch
new file mode 100644
index 00000000000..f24808ae80d
--- /dev/null
+++ b/pkgs/games/performous/performous-fftw.patch
@@ -0,0 +1,15 @@
+diff --git a/game/audio.cc b/game/audio.cc
+index da810488..d7f3d072 100644
+--- a/game/audio.cc
++++ b/game/audio.cc
+@@ -121,8 +121,8 @@ Music::Music(Audio::Files const& files, unsigned int sr, bool preview): srate(sr
+ 	suppressCenterChannel = config["audio/suppress_center_channel"].b();
+ }
+ 
+-unsigned Audio::aubio_win_size = 1536;
+-unsigned Audio::aubio_hop_size = 768;
++unsigned Audio::aubio_win_size = 2048;
++unsigned Audio::aubio_hop_size = 1024;
+ 
+ std::unique_ptr<aubio_tempo_t, void(*)(aubio_tempo_t*)> Audio::aubioTempo =
+ 					std::unique_ptr<aubio_tempo_t, void(*)(aubio_tempo_t*)>(