performous: 1.1 -> 1.2.0

This commit is contained in:
Weijia Wang 2023-01-16 20:51:47 +01:00
parent 09091c7521
commit 1b89ef3acc
4 changed files with 60 additions and 89 deletions

View file

@ -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;
};
}

View file

@ -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)
-

View file

@ -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*)>(

View file

@ -35056,9 +35056,7 @@ with pkgs;
pentobi = libsForQt5.callPackage ../games/pentobi { };
performous = callPackage ../games/performous {
boost = boost166;
};
performous = callPackage ../games/performous { };
pinball = callPackage ../games/pinball { };