commit 79f7e7cd00b24ae790d889896709e958cc818a8e
Author: Jan Rękorajski <[email protected]>
Date:   Sun Dec 22 22:30:33 2024 +0100

    - up to 3.4.0

 aegisub.spec     | 69 +++++++++++++++++++-------------------------------
 boost-1.87.patch | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 boost181.patch   | 65 ------------------------------------------------
 make-4.3.patch   | 23 -----------------
 no-tests.patch   | 10 ++++++++
 5 files changed, 112 insertions(+), 131 deletions(-)
---
diff --git a/aegisub.spec b/aegisub.spec
index 3884e80..5ec1c53 100644
--- a/aegisub.spec
+++ b/aegisub.spec
@@ -1,35 +1,28 @@
 # TODO
 # - unvendor vendor/luabins
-# - unvendor vendor/luajit
 # - unvendor vendor/universalchardet
 # - our cxxflags
 
 # Conditional build:
 %bcond_without ffms2   # build ffms2 A/V provider
 
-%define                snap    85f711f
-%define                gitrev  85f711fccc75f01fd44f25537b8777df10c4b3d1
-
 Summary:       Subtitle editor
 Summary(pl.UTF-8):     Edytor napisów
 Name:          aegisub
-Version:       3.2.2
-Release:       23
+Version:       3.4.0
+Release:       1
 License:       BSD
 Group:         X11/Applications
 #Source0Download: https://aegisub.org/downloads/
-#Source0:      
https://github.com/Aegisub/Aegisub/releases/download/v%{version}/%{name}-%{version}.tar.xz
-Source0:       
https://github.com/Aegisub/Aegisub/archive/%{snap}/%{name}-%{version}-%{snap}.tar.gz
-# Source0-md5: ecb9b5441ead4135c9b1baec0abdec49
-Patch0:                make-4.3.patch
-Patch1:                boost181.patch
+Source0:       
https://github.com/TypesettingTools/Aegisub/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 850643f17021294aa14891a3fb200888
+Patch0:                no-tests.patch
+Patch1:                boost-1.87.patch
 URL:           https://aegisub.org/
 # AC_AGI_COMPILE tries to run test program which tries to open device and most 
likely fails
 #BuildRequires:        OpenAL-devel >= 0.0.8
 BuildRequires: OpenGL-devel
 BuildRequires: alsa-lib-devel
-BuildRequires: autoconf >= 2.57
-BuildRequires: automake
 BuildRequires: boost-devel >= 1.50.0
 %{?with_ffms2:BuildRequires:   ffms2-devel >= 2.16}
 BuildRequires: fftw3-devel >= 3.3
@@ -37,18 +30,24 @@ BuildRequires:      fontconfig-devel >= 1:2.4
 # pkgconfig(freetype2) >= 9.7.0
 BuildRequires: freetype-devel >= 1:2.1.9
 BuildRequires: gettext-tools >= 0.18.1
+BuildRequires: gmock-devel
+BuildRequires: gtest-devel
 BuildRequires: hunspell-devel >= 1.2.0
 BuildRequires: intltool
 BuildRequires: libass-devel >= 0.9.7
 BuildRequires: libicu-devel >= 4.8.1.1
 BuildRequires: libstdc++-devel
 BuildRequires: lua51-devel
+BuildRequires: luajit-devel
+BuildRequires: meson
+BuildRequires: ninja
 BuildRequires: pkgconfig >= 1:0.20
 BuildRequires: portaudio-devel >= 19
 BuildRequires: pulseaudio-devel >= 0.5
 BuildRequires: sed >= 4.0
 BuildRequires: tar >= 1:1.22
 BuildRequires: uchardet-devel
+BuildRequires: wxGTK3-unicode-devel >= 3.0.0
 BuildRequires: wxGTK3-unicode-gl-devel >= 3.0.0
 BuildRequires: wxWidgets-devel >= 3.0.0
 BuildRequires: xz
@@ -90,46 +89,31 @@ napisach, poza samym powiązaniem z czasem. Celem Aegisubs 
jest łatwa
 obsługa tych zaawansowanych funkcji.
 
 %prep
-%setup -q -n Aegisub-%{gitrev}
-%patch0 -p1
-%patch1 -p1
+%setup -q -n Aegisub-%{version}
+%patch -P 0 -p1
+%patch -P 1 -p1
+
+%build
+ln -sf %{_bindir}/wx-gtk3-unicode-config ./wx-config
+export PATH=".:$PATH"
+%meson build \
+       -Denable_update_checker=false \
+       -Dsystem_luajit=true
 
 cat <<'EOF' >build/git_version.h
-#define BUILD_GIT_VERSION_NUMBER 9010
-#define BUILD_GIT_VERSION_STRING "3.2.2.6f546951b"
+#define BUILD_GIT_VERSION_NUMBER 9366
+#define BUILD_GIT_VERSION_STRING "9366-v3.4.0-b0fc74109"
 #define TAGGED_RELEASE 0
 #define INSTALLER_VERSION "0.0.0"
 #define RESOURCE_BASE_VERSION 0, 0, 0
 EOF
 
-%{__mv} vendor{,.keep}
-mkdir vendor
-%{__mv} vendor.keep/{luabins,luajit} vendor
-
-%build
-%{__gettextize}
-# po/Makefile is custom file, don't generate it
-%{__sed} -i 's,po/Makefile\.in,,' configure.ac
-%{__aclocal} -I m4macros
-%{__autoconf}
-%{__autoheader}
-export C
-%configure \
-       --disable-compiler-flags \
-       --disable-update-checker \
-       --with-boost-libdir=%{_libdir} \
-       %{__with_without ffms2} \
-       --without-oss \
-       --with-player-audio=PulseAudio \
-       --with-wx-config=wx-gtk3-unicode-config
-
-%{__make}
+%ninja_build -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build
 
 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fr_FR,fr}
 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{pt_PT,pt}
@@ -156,5 +140,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/aegisub
 %{_datadir}/%{name}
 %{_desktopdir}/aegisub.desktop
-%{_datadir}/metainfo/aegisub.appdata.xml
 %{_iconsdir}/hicolor/*/apps/aegisub.*
diff --git a/boost-1.87.patch b/boost-1.87.patch
new file mode 100644
index 0000000..67bbed9
--- /dev/null
+++ b/boost-1.87.patch
@@ -0,0 +1,76 @@
+From e89ace7d26081c6227c06f18da1bc0421126042c Mon Sep 17 00:00:00 2001
+From: 0tkl <[email protected]>
+Date: Sun, 22 Dec 2024 17:08:15 +0800
+Subject: [PATCH] Replace some deprecated facilities from Boost.Asio
+
+---
+ libaegisub/common/dispatch.cpp | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/libaegisub/common/dispatch.cpp b/libaegisub/common/dispatch.cpp
+index 424d60e555..ebb9fc769c 100644
+--- a/libaegisub/common/dispatch.cpp
++++ b/libaegisub/common/dispatch.cpp
+@@ -19,14 +19,15 @@
+ #include "libaegisub/util.h"
+ 
+ #include <atomic>
+-#include <boost/asio/io_service.hpp>
++#include <boost/asio/executor_work_guard.hpp>
++#include <boost/asio/io_context.hpp>
+ #include <boost/asio/strand.hpp>
+ #include <condition_variable>
+ #include <mutex>
+ #include <thread>
+ 
+ namespace {
+-      boost::asio::io_service *service;
++      boost::asio::io_context *service;
+       std::function<void (agi::dispatch::Thunk)> invoke_main;
+       std::atomic<uint_fast32_t> threads_running;
+ 
+@@ -38,28 +39,28 @@ namespace {
+ 
+       class BackgroundQueue final : public agi::dispatch::Queue {
+               void DoInvoke(agi::dispatch::Thunk&& thunk) override {
+-                      service->post(thunk);
++                      boost::asio::post(*service, std::move(thunk));
+               }
+       };
+ 
+       class SerialQueue final : public agi::dispatch::Queue {
+-              boost::asio::io_service::strand strand;
++              boost::asio::io_context::strand strand;
+ 
+               void DoInvoke(agi::dispatch::Thunk&& thunk) override {
+-                      strand.post(thunk);
++                      boost::asio::post(strand, std::move(thunk));
+               }
+       public:
+               SerialQueue() : strand(*service) { }
+       };
+ 
+       struct IOServiceThreadPool {
+-              boost::asio::io_service io_service;
+-              std::unique_ptr<boost::asio::io_service::work> work;
++              boost::asio::io_context io_context;
++              
boost::asio::executor_work_guard<boost::asio::io_context::executor_type> 
work_guard;
+               std::vector<std::thread> threads;
+ 
+-              IOServiceThreadPool() : work(new 
boost::asio::io_service::work(io_service)) { }
++              IOServiceThreadPool() : 
work_guard(boost::asio::make_work_guard(io_context)) { }
+               ~IOServiceThreadPool() {
+-                      work.reset();
++                      work_guard.reset();
+ #ifndef _WIN32
+                       for (auto& thread : threads) thread.join();
+ #else
+@@ -76,7 +77,7 @@ namespace agi::dispatch {
+ 
+ void Init(std::function<void (Thunk)>&& invoke_main) {
+       static IOServiceThreadPool thread_pool;
+-      ::service = &thread_pool.io_service;
++      ::service = &thread_pool.io_context;
+       ::invoke_main = invoke_main;
+ 
+       thread_pool.threads.reserve(std::max<unsigned>(4, 
std::thread::hardware_concurrency()));
diff --git a/boost181.patch b/boost181.patch
deleted file mode 100644
index a62c965..0000000
--- a/boost181.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Index: Aegisub-3.3.2/src/command/video.cpp
-===================================================================
---- Aegisub-3.3.2.orig/src/command/video.cpp
-+++ Aegisub-3.3.2/src/command/video.cpp
-@@ -475,7 +475,7 @@ static void save_snapshot(agi::Context *
-               // If where ever that is isn't defined, we can't save there
-               if ((basepath == "\\") || (basepath == "/")) {
-                       // So save to the current user's home dir instead
--                      basepath = wxGetHomeDir().c_str();
-+                      basepath = static_cast<const char 
*>(wxGetHomeDir().c_str());
-               }
-       }
-       // Actual fixed (possibly relative) path, decode it
-Index: Aegisub-3.3.2/src/dialog_attachments.cpp
-===================================================================
---- Aegisub-3.3.2.orig/src/dialog_attachments.cpp
-+++ Aegisub-3.3.2/src/dialog_attachments.cpp
-@@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxComm
- 
-       // Multiple or single?
-       if (listView->GetNextSelected(i) != -1)
--              path = wxDirSelector(_("Select the path to save the files 
to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str();
-+              path = static_cast<const char*>(wxDirSelector(_("Select the 
path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector 
Destination")->GetString())).c_str());
-       else {
-               path = SaveFileSelector(
-                       _("Select the path to save the file to:"),
-Index: Aegisub-3.3.2/libaegisub/include/libaegisub/lua/utils.h
-===================================================================
---- Aegisub-3.3.2.orig/libaegisub/include/libaegisub/lua/utils.h
-+++ Aegisub-3.3.2/libaegisub/include/libaegisub/lua/utils.h
-@@ -27,6 +27,7 @@
- #include <boost/exception/detail/attribute_noreturn.hpp>
- #define BOOST_NORETURN BOOST_ATTRIBUTE_NORETURN
- #endif
-+#include <boost/flyweight.hpp>
- 
- namespace agi { namespace lua {
- // Exception type for errors where the error details are on the lua stack
-@@ -91,6 +92,13 @@ void set_field(lua_State *L, const char
-       lua_setfield(L, -2, name);
- }
- 
-+template<>
-+inline void set_field(lua_State *L, const char *name,
-+             boost::flyweights::flyweight<std::string> value) {
-+      push_value(L, value.get());
-+      lua_setfield(L, -2, name);
-+}
-+
- template<int (*func)(lua_State *L)>
- void set_field(lua_State *L, const char *name) {
-       push_value(L, exception_wrapper<func>);
-Index: Aegisub-3.3.2/src/auto4_lua.cpp
-===================================================================
---- Aegisub-3.3.2.orig/src/auto4_lua.cpp
-+++ Aegisub-3.3.2/src/auto4_lua.cpp
-@@ -119,7 +119,7 @@ namespace {
-       int get_translation(lua_State *L)
-       {
-               wxString str(check_wxstring(L, 1));
--              push_value(L, _(str).utf8_str());
-+              push_value(L, static_cast<const char *>(_(str).utf8_str()));
-               return 1;
-       }
- 
diff --git a/make-4.3.patch b/make-4.3.patch
deleted file mode 100644
index 6edb8c3..0000000
--- a/make-4.3.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From f4cc905c69ca69c68cb95674cefce4abc37ce046 Mon Sep 17 00:00:00 2001
-From: wangqr <[email protected]>
-Date: Mon, 17 Feb 2020 14:42:07 +0800
-Subject: [PATCH] Use target name without directory in $*_OBJ macro
-
-Fix Aegisub/Aegisub#171
----
- Makefile.target | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.target b/Makefile.target
-index 516ef3c24..5c4c5d259 100644
---- a/Makefile.target
-+++ b/Makefile.target
-@@ -112,7 +112,7 @@ POST_FLAGS = $($@_FLAGS) -c -o $@ $<
- # Libraries contain all object files they depend on (but they may depend on 
other files)
- # Not using libtool on OS X because it has an unsilenceable warning about a
- # compatibility issue with BSD 4.3 (wtf)
--lib%.a: $$($$*_OBJ)
-+lib%.a: $$($$(*F)_OBJ)
-       @$(BIN_MKDIR_P) $(dir $@)
-       $(BIN_AR) cru $@ $(filter %.o,$^)
-       $(BIN_RANLIB) $@
diff --git a/no-tests.patch b/no-tests.patch
new file mode 100644
index 0000000..89d52c8
--- /dev/null
+++ b/no-tests.patch
@@ -0,0 +1,10 @@
+--- Aegisub-3.4.0/meson.build~ 2024-12-19 00:06:50.000000000 +0100
++++ Aegisub-3.4.0/meson.build  2024-12-22 21:30:24.836666180 +0100
+@@ -382,7 +382,6 @@
+ subdir('packages')
+ subdir('po')
+ subdir('src')
+-subdir('tests')
+ 
+ aegisub_cpp_pch = ['src/include/agi_pre.h']
+ aegisub_c_pch = ['src/include/agi_pre_c.h']
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/aegisub.git/commitdiff/79f7e7cd00b24ae790d889896709e958cc818a8e

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to