]> git.pld-linux.org Git - packages/performous.git/commitdiff
- up to 1.3.0
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 20 Oct 2023 09:08:03 +0000 (11:08 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 20 Oct 2023 09:08:03 +0000 (11:08 +0200)
ced-no-forced-cxx11.patch [new file with mode: 0644]
find-ced.patch [new file with mode: 0644]
opencv-const.patch [deleted file]
performous-boost.patch [deleted file]
performous-pango1.44.patch [deleted file]
performous.spec

diff --git a/ced-no-forced-cxx11.patch b/ced-no-forced-cxx11.patch
new file mode 100644 (file)
index 0000000..8f95cf9
--- /dev/null
@@ -0,0 +1,25 @@
+--- performous-1.3.0/compact_enc_det/CMakeLists.txt~   2023-10-20 09:53:57.000000000 +0200
++++ performous-1.3.0/compact_enc_det/CMakeLists.txt    2023-10-20 10:16:13.557473026 +0200
+@@ -28,22 +28,6 @@
+ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
+-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing")
+-elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-c++11-narrowing")
+-elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+-  if (NOT BUILD_SHARED_LIBS)
+-    foreach(flag_var
+-            CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+-            CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+-      if(${flag_var} MATCHES "/MD")
+-        string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+-      endif(${flag_var} MATCHES "/MD")
+-    endforeach(flag_var)
+-  endif()
+-endif()
+-
+ set(EXTRA_TARGET_LINK_LIBRARIES)
+ if(WIN32)
diff --git a/find-ced.patch b/find-ced.patch
new file mode 100644 (file)
index 0000000..2913ed9
--- /dev/null
@@ -0,0 +1,13 @@
+--- performous-1.3.0/cmake/Modules/FindCed.cmake.orig  2023-08-21 21:48:26.000000000 +0200
++++ performous-1.3.0/cmake/Modules/FindCed.cmake       2023-10-20 10:23:51.966127665 +0200
+@@ -2,10 +2,4 @@
+ set(Ced_GIT_VERSION "master")
+-libfetch_git_pkg(Ced
+-      REPOSITORY ${SELF_BUILT_GIT_BASE}/compact_enc_det.git
+-      #https://github.com/google/compact_enc_det.git
+-      REFERENCE  ${Ced_GIT_VERSION}
+-      FIND_PATH  compact_enc_det/compact_enc_det.h
+-)
+ message(STATUS "Found Google CED ${Ced_VERSION}")
diff --git a/opencv-const.patch b/opencv-const.patch
deleted file mode 100644 (file)
index 990f8aa..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From ddb052609d182745cfad5abc22cc50230f83e47b Mon Sep 17 00:00:00 2001
-From: Arjan Spieard <arjan.spieard@gmail.com>
-Date: Tue, 8 Jan 2019 18:02:23 +0100
-Subject: [PATCH] Use correct namespace for opencv constants
-
----
- game/webcam.cc | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/game/webcam.cc b/game/webcam.cc
-index b01c169d3..b224b70d2 100644
---- a/game/webcam.cc
-+++ b/game/webcam.cc
-@@ -33,21 +33,21 @@ Webcam::Webcam(int cam_id):
-                       throw std::runtime_error("Could not initialize webcam capturing!");
-       }
-       // Try to get at least VGA resolution
--      if (m_capture->get(CV_CAP_PROP_FRAME_WIDTH) < 640
--        || m_capture->get(CV_CAP_PROP_FRAME_HEIGHT) < 480) {
--              m_capture->set(CV_CAP_PROP_FRAME_WIDTH, 640);
--              m_capture->set(CV_CAP_PROP_FRAME_HEIGHT, 480);
-+      if (m_capture->get(cv::CAP_PROP_FRAME_WIDTH) < 640
-+        || m_capture->get(cv::CAP_PROP_FRAME_HEIGHT) < 480) {
-+              m_capture->set(cv::CAP_PROP_FRAME_WIDTH, 640);
-+              m_capture->set(cv::CAP_PROP_FRAME_HEIGHT, 480);
-       }
-       // Print actual values
-       std::cout << "Webcam frame properties: "
--        << m_capture->get(CV_CAP_PROP_FRAME_WIDTH) << "x"
--        << m_capture->get(CV_CAP_PROP_FRAME_HEIGHT) << std::endl;
-+        << m_capture->get(cv::CAP_PROP_FRAME_WIDTH) << "x"
-+        << m_capture->get(cv::CAP_PROP_FRAME_HEIGHT) << std::endl;
-       // Initialize the video writer
-       #ifdef SAVE_WEBCAM_VIDEO
--      float fps = m_capture->get(CV_CAP_PROP_FPS);
--      int framew = m_capture->get(CV_CAP_PROP_FRAME_WIDTH);
--      int frameh = m_capture->get(CV_CAP_PROP_FRAME_HEIGHT);
-+      float fps = m_capture->get(cv::CAP_PROP_FPS);
-+      int framew = m_capture->get(cv::CAP_PROP_FRAME_WIDTH);
-+      int frameh = m_capture->get(cv::CAP_PROP_FRAME_HEIGHT);
-       int codec = CV_FOURCC('P','I','M','1'); // MPEG-1
-       std::string out_file = (getHomeDir() / "performous-webcam_out.mpg").string();
-       m_writer.reset(new cv::VideoWriter(out_file.c_str(), codec, fps > 0 ? fps : 30.0f, cvSize(framew,frameh)));
diff --git a/performous-boost.patch b/performous-boost.patch
deleted file mode 100644 (file)
index 49693ae..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
---- performous-1.1/game/backgrounds.hh.orig    2016-01-23 11:40:01.000000000 +0100
-+++ performous-1.1/game/backgrounds.hh 2019-05-08 16:01:24.991915179 +0200
-@@ -3,6 +3,7 @@
- //#include "animvalue.hh"
- #include "fs.hh"
- //#include "song.hh"
-+#include <boost/noncopyable.hpp>
- #include <boost/shared_ptr.hpp>
- #include <boost/scoped_ptr.hpp>
- #include <boost/thread/mutex.hpp>
---- performous-1.1/game/audio.cc.orig  2019-05-08 17:34:23.030331012 +0200
-+++ performous-1.1/game/audio.cc       2019-05-08 17:34:26.247165898 +0200
-@@ -77,7 +77,7 @@
-       static ptime getTime() { return microsec_clock::universal_time(); }
-       // Conversion helpers
-       static double getSeconds(time_duration t) { return 1e-6 * t.total_microseconds(); }
--      static time_duration getDuration(double seconds) { return microseconds(1e6 * seconds); }
-+      static time_duration getDuration(double seconds) { return microseconds(static_cast<long>(1e6 * seconds)); }
-       mutable boost::mutex m_mutex;
-       ptime m_baseTime; ///< A reference time (corresponds to m_basePos)
-@@ -149,7 +149,7 @@
-       int64_t m_pos; ///< Current sample position
-       bool m_preview;
-       AudioClock m_clock;
--      time_duration durationOf(int64_t samples) const { return microseconds(1e6 * samples / srate / 2.0); }
-+      time_duration durationOf(int64_t samples) const { return microseconds(static_cast<long>(1e6 * samples / srate / 2.0)); }
- public:
-       bool suppressCenterChannel;
-       double fadeLevel;
---- performous-1.1/game/songs.hh.orig  2016-01-23 11:40:01.000000000 +0100
-+++ performous-1.1/game/songs.hh       2019-05-08 17:34:44.194771102 +0200
-@@ -2,6 +2,7 @@
- #include "animvalue.hh"
- #include "fs.hh"
-+#include <boost/noncopyable.hpp>
- #include <boost/shared_ptr.hpp>
- #include <boost/scoped_ptr.hpp>
- #include <boost/thread/mutex.hpp>
---- performous-1.1/game/svg.cc.orig    2016-01-23 11:40:01.000000000 +0100
-+++ performous-1.1/game/svg.cc 2019-05-08 17:49:07.689926184 +0200
-@@ -4,6 +4,7 @@
- #include "configuration.hh"
- #include "../common/image.hh"
-+#include <boost/shared_ptr.hpp>
- #include <librsvg/rsvg.h>
- #include <iostream>
---- performous-1.1/game/surface.cc.orig        2016-01-23 11:40:01.000000000 +0100
-+++ performous-1.1/game/surface.cc     2020-07-31 21:42:13.921188533 +0200
-@@ -135,7 +135,7 @@
-       bitmap.resize(1, 1);
-       target->load(bitmap);
-       // Ask the loader to retrieve the image
--      ldr->push(target, Job(name, boost::bind(&T::load, target, _1)));
-+      ldr->push(target, Job(name, boost::bind(&T::load, target, boost::placeholders::_1)));
- }
- Surface::Surface(fs::path const& filename) { loader(this, filename); }
diff --git a/performous-pango1.44.patch b/performous-pango1.44.patch
deleted file mode 100644 (file)
index 4b4c8ea..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
---- performous-1.1/game/CMakeLists.txt.orig    2016-01-23 11:40:01.000000000 +0100
-+++ performous-1.1/game/CMakeLists.txt 2019-10-11 20:39:21.212719974 +0200
-@@ -79,6 +79,24 @@
-       add_definitions(${${lib}_DEFINITIONS})
- endforeach(lib)
-+#
-+# harfbuzz
-+#
-+PKG_CHECK_MODULES(PC_HARFBUZZ REQUIRED harfbuzz)
-+SET(HARFBUZZ_DEFINITIONS ${PC_HARFBUZZ_CXXFLAGS_OTHER})
-+FIND_PATH(
-+        HARFBUZZ_INCLUDE_DIR hb.h
-+        HINTS ${PC_HARFBUZZ_INCLUDEDIR} ${PC_HARFBUZZ_INCLUDE_DIRS}
-+        PATH_SUFFIXES harfbuzz)
-+
-+FIND_LIBRARY(
-+        HARFBUZZ_LIBRARY NAMES harfbuzz
-+        HINTS ${PC_HARFBUZZ_LIBDIR} ${PC_HARFBUZZ_LIBRARY_DIRS})
-+
-+include_directories(${HARFBUZZ_INCLUDE_DIR})
-+list(APPEND LIBS ${HARFBUZZ_LIBRARY})
-+
-+
- find_package(Gettext)
- if(Gettext_FOUND)
-       include_directories(${Gettext_INCLUDE_DIRS})
index 6a81f55ddcc3c0e431d57796f70bfef54020ebe3..8e19d7841e5308a2a692db9b60ae5dea78785690 100644 (file)
@@ -1,19 +1,21 @@
 Summary:       Performous - The All-in-One Music Game
 Summary(pl.UTF-8):     Performous - wiele gier muzycznych w jednej
 Name:          performous
-Version:       1.1
-Release:       10
+Version:       1.3.0
+Release:       1
 License:       GPL v2+
 Group:         Applications/Sound
 #Source0Download: https://github.com/performous/performous/releases
-Source0:       https://github.com/performous/performous/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: cf31d0973cd88b3cd626d312d6d3f5b2
-Patch0:                %{name}-boost.patch
-Patch1:                %{name}-pango1.44.patch
-Patch2:                opencv-const.patch
+Source0:       https://github.com/performous/performous/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 1579905ea88e09611e90b737e9417895
+Source1:       compact_enc_det.tar.xz
+# Source1-md5: c4af58e784fe054b787254acf5c1af12
+Patch0:                ced-no-forced-cxx11.patch
+Patch1:                find-ced.patch
 URL:           http://performous.org/
 BuildRequires: ImageMagick-c++-devel
 BuildRequires: SDL2-devel >= 2
+BuildRequires: aubio-devel
 BuildRequires: boost-devel >= 1.36
 BuildRequires: cmake >= 2.8
 # avformat avresample swscale
@@ -31,6 +33,7 @@ BuildRequires:        libsigc++-devel
 BuildRequires: libstdc++-devel >= 6:4.6
 BuildRequires: libxml2-devel >= 2.0
 BuildRequires: libxml++2-devel >= 2.6
+BuildRequires: nlohmann-json-devel >= 3.10.5
 BuildRequires: opencv-devel
 BuildRequires: pango-devel >= 1:1.12
 BuildRequires: pkgconfig
@@ -38,7 +41,7 @@ BuildRequires:        portaudio-devel
 BuildRequires: portmidi-devel
 BuildRequires: rpmbuild(macros) >= 1.605
 BuildRequires: zlib-devel
-Suggests:      %{name}-tools = %{version}-%{release}
+Obsoletes:     %{name}-tools < 1.3.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -54,32 +57,34 @@ UltraStar, Frets on Fire i StepManii. Mikrofony i kontrolery z gier
 SingStar, Guitar Hero i Rock Band oraz maty do tańca są automatycznie
 wykrywane.
 
-%package tools
-Summary:       Performous tools
-Summary(pl.UTF-8):     Narzędzia do programu Performous
-Group:         Applications/Sound
-
-%description tools
-Several utilities for converting data files for Performous.
-
-%description tools -l pl.UTF-8
-Zestaw narzędzi do konwersji danych dla programu Performous.
-
 %prep
-%setup -q
+%setup -q -a1
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
+cd compact_enc_det
 install -d build
 cd build
 %cmake .. \
+       -DBUILD_SHARED_LIBS=OFF
+%{__make} ced
+cp -p lib/libced.a ../compact_enc_det
+cd ../..
+
+SRC=$(pwd)
+install -d build/game
+cd build
+%cmake .. \
+       -DCMAKE_INSTALL_MANDIR=%{_mandir}/man6 \
        -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
-       -DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags} -std=gnu++11" \
+       -DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags}" \
        -DCMAKE_DEBUG_FLAGS_RELEASE="%{debugcflags}" \
        -DMagick_LIBRARY="$(echo %{_libdir}/libMagickCore-*.so)" \
-       -DMagick++_LIBRARY="$(echo %{_libdir}/libMagick++-*.so)"
+       -DMagick++_LIBRARY="$(echo %{_libdir}/libMagick++-*.so)" \
+       -DSELF_BUILT_CED=NEVER \
+       -DCed_INCLUDE_DIRS="$SRC/compact_enc_det" \
+       -DCed_LIBRARIES="-L$SRC/compact_enc_det/compact_enc_det $SRC/compact_enc_det/compact_enc_det/libced.a"
 
 %{__make}
 
@@ -90,8 +95,6 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man1
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-cp -p docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-
 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{zh,zh_CN}
 
 %find_lang %{name} --all-name
@@ -101,17 +104,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc README.txt docs/{Authors,instruments}.txt
+%doc README.md docs/{Authors,instruments}.txt
 %attr(755,root,root) %{_bindir}/performous
 %{_datadir}/games/%{name}
 %{_mandir}/man6/performous.6*
 %{_desktopdir}/performous.desktop
 %{_pixmapsdir}/performous.svg
-
-%files tools
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/gh_*_decrypt
-%attr(755,root,root) %{_bindir}/itg_pck
-%attr(755,root,root) %{_bindir}/ss_*
-%{_mandir}/man1/gh_*_decrypt.1*
-%{_mandir}/man1/ss_*.1*
This page took 0.098802 seconds and 4 git commands to generate.