summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--0001-Fix-for-boost-1.81.0.patch56
-rw-r--r--0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch35
-rw-r--r--0001-Use-target-name-without-directory-in-_OBJ-macro.patch23
-rw-r--r--PKGBUILD30
-rw-r--r--Remove-second-argument-to-StartStyling.patch48
6 files changed, 197 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a0d3b90f4b8c..0c5864c04ffc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = aegisub-git
pkgdesc = A general-purpose subtitle editor with ASS/SSA support
pkgver = 3.2.2.r407.6f546951b
- pkgrel = 1
- url = http://www.aegisub.org
+ pkgrel = 5
+ url = https://aegisub.org
arch = x86_64
license = GPL
license = BSD
@@ -23,16 +23,21 @@ pkgbase = aegisub-git
depends = libgl
depends = libpulse
depends = uchardet
- depends = wxgtk3
+ depends = wxwidgets-gtk3
depends = zlib
provides = aegisub
conflicts = aegisub
source = aegisub::git+https://github.com/Aegisub/Aegisub.git
source = git+https://github.com/Aegisub/assdraw.git
- source = 0001-Use-target-name-without-directory-in-_OBJ-macro.patch::https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch
+ source = 0001-Use-target-name-without-directory-in-_OBJ-macro.patch
+ source = 0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch
+ source = 0001-Fix-for-boost-1.81.0.patch
+ source = Remove-second-argument-to-StartStyling.patch
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = 12b191b104fc8fa8745fd98f4aa9d2425699f2e2e719ef2062bdf6a025a045c0
+ sha256sums = ce90cd9a9c56abcbafeb88d33280d53bee5af98cd9e15f50d6a9e49ae1edda30
+ sha256sums = c4039f693996dd20be4e8a460fffb984fd34fd810b16b9b1ca7fc4f35df2cc17
+ sha256sums = 0ae8ffafa9819b4cb49ef5e399cab549129da637058a54368519ed0603c1b24f
+ sha256sums = 42d2c03d19eb6d64b0eb26c6c591fc142f61fcc251b0efcb91377f40448d9778
pkgname = aegisub-git
-
diff --git a/0001-Fix-for-boost-1.81.0.patch b/0001-Fix-for-boost-1.81.0.patch
new file mode 100644
index 000000000000..ac264bc70676
--- /dev/null
+++ b/0001-Fix-for-boost-1.81.0.patch
@@ -0,0 +1,56 @@
+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<typename T>
+ void set_field(lua_State *L, const char *name, T value) {
+- push_value(L, value);
++ if constexpr(std::is_convertible<T, std::string>::value)
++ push_value(L, static_cast<std::string>(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<const char*>( _(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<const char*>(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<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:"),
diff --git a/0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch b/0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch
new file mode 100644
index 000000000000..2db0a77ef4df
--- /dev/null
+++ b/0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch
@@ -0,0 +1,35 @@
+From 5f235ff459e6a7ec36639894d1f45a638a9d73f3 Mon Sep 17 00:00:00 2001
+From: wangqr <wangqr@wangqr.tk>
+Date: Sun, 23 Feb 2020 00:42:45 -0500
+Subject: [PATCH] Restrict the usage of undocumented wxBitmap ctor to wxWidgets
+ > 3.1.0
+
+Fix build for wxWidgets 3.0
+---
+ src/libresrc/libresrc.cpp | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/libresrc/libresrc.cpp b/src/libresrc/libresrc.cpp
+index 79dc0f16cb..b308c69d58 100644
+--- a/src/libresrc/libresrc.cpp
++++ b/src/libresrc/libresrc.cpp
+@@ -22,9 +22,17 @@
+
+ wxBitmap libresrc_getimage(const unsigned char *buff, size_t size, double scale, int dir) {
+ wxMemoryInputStream mem(buff, size);
++#if wxCHECK_VERSION(3, 1, 0)
++ // Since wxWidgets 3.1.0, there is an undocumented third parameter in the ctor of wxBitmap from wxImage
++ // This "scale" parameter sets the logical scale factor of the created wxBitmap
+ if (dir != wxLayout_RightToLeft)
+- return wxBitmap(wxImage(mem), -1, scale);
+- return wxBitmap(wxImage(mem).Mirror(), -1, scale);
++ return wxBitmap(wxImage(mem), wxBITMAP_SCREEN_DEPTH, scale);
++ return wxBitmap(wxImage(mem).Mirror(), wxBITMAP_SCREEN_DEPTH, scale);
++#else
++ if (dir != wxLayout_RightToLeft)
++ return wxBitmap(wxImage(mem));
++ return wxBitmap(wxImage(mem).Mirror());
++#endif
+ }
+
+ wxIcon libresrc_geticon(const unsigned char *buff, size_t size) {
diff --git a/0001-Use-target-name-without-directory-in-_OBJ-macro.patch b/0001-Use-target-name-without-directory-in-_OBJ-macro.patch
new file mode 100644
index 000000000000..9188de8f8c36
--- /dev/null
+++ b/0001-Use-target-name-without-directory-in-_OBJ-macro.patch
@@ -0,0 +1,23 @@
+From 6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39 Mon Sep 17 00:00:00 2001
+From: wangqr <wangqr@wangqr.tk>
+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 516ef3c245..5c4c5d2595 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/PKGBUILD b/PKGBUILD
index 90c30b192518..e53fb4224d6f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,13 @@
+# Maintainer: arch1t3cht <arch1t3cht@gmail.com>
# Maintainer: Qirui Wang <wqr.prg@gmail.com>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
pkgname=aegisub-git
pkgver=3.2.2.r407.6f546951b
-pkgrel=1
+pkgrel=5
pkgdesc='A general-purpose subtitle editor with ASS/SSA support'
arch=(x86_64)
-url=http://www.aegisub.org
+url=https://aegisub.org
license=(
GPL
BSD
@@ -23,7 +24,7 @@ depends=(
libgl
libpulse
uchardet
- wxgtk3
+ wxwidgets-gtk3
zlib
)
makedepends=(
@@ -39,11 +40,20 @@ conflicts=(aegisub)
source=(
aegisub::git+https://github.com/Aegisub/Aegisub.git
git+https://github.com/Aegisub/assdraw.git
- 0001-Use-target-name-without-directory-in-_OBJ-macro.patch::https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch
+ # https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch
+ 0001-Use-target-name-without-directory-in-_OBJ-macro.patch
+ # https://github.com/Aegisub/Aegisub/commit/5f235ff459e6a7ec36639894d1f45a638a9d73f3.patch
+ 0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch
+ # https://gitlab.archlinux.org/archlinux/packaging/packages/aegisub/-/blob/12e1e5ee64afb7cfb5a43a998774642bc1eeede6/boost-1.81.0.patch
+ 0001-Fix-for-boost-1.81.0.patch
+ Remove-second-argument-to-StartStyling.patch
)
sha256sums=('SKIP'
'SKIP'
- '12b191b104fc8fa8745fd98f4aa9d2425699f2e2e719ef2062bdf6a025a045c0')
+ 'ce90cd9a9c56abcbafeb88d33280d53bee5af98cd9e15f50d6a9e49ae1edda30'
+ 'c4039f693996dd20be4e8a460fffb984fd34fd810b16b9b1ca7fc4f35df2cc17'
+ '0ae8ffafa9819b4cb49ef5e399cab549129da637058a54368519ed0603c1b24f'
+ '42d2c03d19eb6d64b0eb26c6c591fc142f61fcc251b0efcb91377f40448d9778')
pkgver() {
cd aegisub
@@ -64,6 +74,15 @@ prepare() {
# https://github.com/Aegisub/Aegisub/issues/171
patch -p1 -i ../0001-Use-target-name-without-directory-in-_OBJ-macro.patch
+ # Fix build with wxWidgets 3.0
+ patch -p1 -i ../0001-Restrict-the-usage-of-undocumented-wxBitmap-ctor-to-.patch
+
+ # Fix build with boost 1.81.0
+ patch -p1 -i ../0001-Fix-for-boost-1.81.0.patch
+
+ # Fix runtime warning "The second argument passed to StartStyling should be 0"
+ patch -p1 -i ../Remove-second-argument-to-StartStyling.patch
+
cp -f /usr/share/aclocal/ax_boost_{chrono,filesystem,locale,regex,system,thread}.m4 m4macros/
./autogen.sh
@@ -77,7 +96,6 @@ build() {
./configure \
--prefix=/usr \
- --with-wx-config=/usr/bin/wx-config-gtk3 \
--without-{portaudio,openal,oss} \
--disable-update-checker
make
diff --git a/Remove-second-argument-to-StartStyling.patch b/Remove-second-argument-to-StartStyling.patch
new file mode 100644
index 000000000000..4297f99aa1ed
--- /dev/null
+++ b/Remove-second-argument-to-StartStyling.patch
@@ -0,0 +1,48 @@
+diff --git a/src/dialog_fonts_collector.cpp b/src/dialog_fonts_collector.cpp
+index 78ac20ef5c..9b71afd752 100644
+--- a/src/dialog_fonts_collector.cpp
++++ b/src/dialog_fonts_collector.cpp
+@@ -400,7 +400,11 @@ void DialogFontsCollector::OnAddText(ValueEvent<color_str_pair> &event) {
+ auto const& utf8 = str.second.utf8_str();
+ collection_log->AppendTextRaw(utf8.data(), utf8.length());
+ if (str.first) {
++#if wxCHECK_VERSION (3, 1, 0)
++ collection_log->StartStyling(pos);
++#else
+ collection_log->StartStyling(pos, 31);
++#endif
+ collection_log->SetStyling(utf8.length(), str.first);
+ }
+ collection_log->GotoPos(pos + utf8.length());
+diff --git a/src/dialog_translation.cpp b/src/dialog_translation.cpp
+index c5fb4ffb85..86f12291c9 100644
+--- a/src/dialog_translation.cpp
++++ b/src/dialog_translation.cpp
+@@ -244,7 +248,11 @@ void DialogTranslation::UpdateDisplay() {
+ int initial_pos = original_text->GetLength();
+ original_text->AppendTextRaw(block->GetText().c_str());
+ if (i == cur_block) {
++#if wxCHECK_VERSION (3, 1, 0)
++ original_text->StartStyling(initial_pos);
++#else
+ original_text->StartStyling(initial_pos, 31);
++#endif
+ original_text->SetStyling(block->GetText().size(), 1);
+ }
+ }
+diff --git a/src/subs_edit_ctrl.cpp b/src/subs_edit_ctrl.cpp
+index 4618ea4097..a44c099e0a 100644
+--- a/src/subs_edit_ctrl.cpp
++++ b/src/subs_edit_ctrl.cpp
+@@ -261,7 +279,11 @@ void SubsTextEditCtrl::UpdateStyle() {
+ cursor_pos = -1;
+ UpdateCallTip();
+
++#if wxCHECK_VERSION (3, 1, 0)
++ StartStyling(0);
++#else
+ StartStyling(0,255);
++#endif
+
+ if (!OPT_GET("Subtitle/Highlight/Syntax")->GetBool()) {
+ SetStyling(line_text.size(), 0);