%global debug_package %{nil} %global gituser wangqr %global gitname Aegisub %global commit 33ff9b4083320c9ace3b1ee80a9f0b93bd07ec05 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global gitcounter 14 Name: aegisub Version: 3.3.3.git.%{gitcounter} Release: %{shortcommit}%{?dist} Summary: Tool for creating and modifying subtitles License: BSD and MIT and MPLv1.1 URL: https://github.com//%{gituser}/%{gitname} Source0: https://github.com/%{gituser}/%{gitname}/tarball/%{commit}/%{name}-%{shortcommit}.tar.gz Patch1: https://github.com/%{gituser}/%{gitname}/pull/159.patch#/configure.ac_set_top_path_as_TOP.patch Patch2: https://github.com/%{gituser}/%{gitname}/pull/164.patch#/improve_build_for_translations.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: alsa-lib-devel BuildRequires: boost-devel # To be enabled # BuildRequires: cajun-jsonapi-devel BuildRequires: ffms2-devel BuildRequires: fftw-devel BuildRequires: hunspell-devel BuildRequires: intltool BuildRequires: libappstream-glib BuildRequires: libass-devel # Used for OpenAL tests during configure # BuildRequires: libcxx-devel BuildRequires: libGL-devel BuildRequires: libICE-devel BuildRequires: libX11-devel BuildRequires: lua-devel BuildRequires: luajit-devel # BuildRequires: openal-devel BuildRequires: portaudio-devel BuildRequires: pulseaudio-libs-devel BuildRequires: uchardet-devel BuildRequires: wxGTK-devel BuildRequires: zlib-devel BuildRequires: devscripts # needed for the perl script downloading the additional documentation from wiki # for offline reading Requires: /usr/bin/perl perl(strict) perl(HTML::LinkExtor) perl(LWP) perl(File::Path) perl(utf8) perl(URI) perl(warnings) Requires: hicolor-icon-theme %description Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview. %prep %autosetup -p1 -n %{gituser}-%{gitname}-%{shortcommit} # remove-vendor-luajit-dependency.patch sed -i 's|vendor/luajit||' header.mk sed -i 's|LIBS_LUA.*|LIBS_LUA = `pkg-config --libs luajit`|' Makefile.inc.in sed -i 's|CFLAGS_LUA.*|CFLAGS_LUA = `pkg-config --cflags luajit`|' Makefile.inc.in sed -i 's|$(TOP)tools/respack.lua|#$(TOP)tools/respack.lua|' tools/Makefile sed -i 's|/env luajit|/lua|' tools/respack.lua sed -i 's|libresrc; $(BIN_LUA) $(TOP)|libresrc; $(TOP)|' src/libresrc/Makefile # %%if 0%{?fedora} <= 36 # fix running under wayland sed -i 's|^Exec=|Exec=env GDK_BACKEND=x11 |' packages/desktop/aegisub.desktop.template.in # %%endif %if 0%{?fedora} >= 39 cat > boost-1.81.0.patch << EOF diff --git a/libaegisub/include/libaegisub/lua/utils.h b/libaegisub/include/libaegisub/lua/utils.h index c5a65d6e4..f4921d582 100644 --- a/libaegisub/include/libaegisub/lua/utils.h +++ b/libaegisub/include/libaegisub/lua/utils.h @@ -87,7 +87,10 @@ int exception_wrapper(lua_State *L) { template void set_field(lua_State *L, const char *name, T value) { - push_value(L, value); + if constexpr(std::is_convertible::value) + push_value(L, static_cast(value)); + else + push_value(L, value); lua_setfield(L, -2, name); } diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp index 245689679..6d479b2c3 100644 --- a/src/auto4_lua.cpp +++ b/src/auto4_lua.cpp @@ -115,7 +115,8 @@ namespace { int get_translation(lua_State *L) { wxString str(check_wxstring(L, 1)); - push_value(L, _(str).utf8_str()); + const char* val = static_cast( _(str).utf8_str()); + push_value(L, val); return 1; } diff --git a/src/command/video.cpp b/src/command/video.cpp index fb2bcb0ba..77e3e9ca7 100644 --- a/src/command/video.cpp +++ b/src/command/video.cpp @@ -475,7 +475,7 @@ static void save_snapshot(agi::Context *c, bool raw) { // 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(wxGetHomeDir().c_str()); } } // Actual fixed (possibly relative) path, decode it diff --git a/src/dialog_attachments.cpp b/src/dialog_attachments.cpp index 38ff53027..e30339f81 100644 --- a/src/dialog_attachments.cpp +++ b/src/dialog_attachments.cpp @@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxCommandEvent &) { // 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(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:"), EOF patch -p1 < boost-1.81.0.patch %endif %build export FORCE_GIT_VERSION="3.3.3+20221115" %set_build_flags CXXFLAGS=$(echo "$CXXFLAGS -fdata-sections -ffunction-sections -Wno-deprecated-declarations -Wno-deprecated-copy" | sed -e 's| -g | |') export CXXFLAGS CFLAGS=$(echo "$CFLAGS -fdata-sections -ffunction-sections -Wno-deprecated-declarations" | sed -e 's| -g | |') export CFLAGS LDFLAGS=$(echo "$LDFLAGS -Wl,-s,--gc-sections") export LDFLAGS # export CXXFLAGS="%{optflags} -Wno-deprecated-declarations -Wno-deprecated-copy" ./autogen.sh %configure --disable-update-checker --with-player-audio=PulseAudio --without-oss %make_build %install %make_install hardening-check -v %{buildroot}%{_bindir}/%{name} desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/aegisub.appdata.xml %find_lang %{name} %files -f %{name}.lang %license LICENCE %doc docs/* %{_bindir}/%{name}* %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/metainfo/%{name}.appdata.xml %changelog * Fri Jul 15 2022 samoht0 3.3.3_git-master - Update aegisub to 3.3.3 release (git) * Sun May 01 2022 samoht0 3.3.2_git-master - Update aegisub to 3.3.2 using wangqr fork (as rpmfusion) - spec cleanup - history cleanup