Aegisub: update to 3.3.2, switch to a maintained fork
We use https://github.com/wangqr/Aegisub/pull/121 to allow building from a tarball and avoid cloning from git. Fix #31637
This commit is contained in:
parent
7d13eaf933
commit
b2912ac1b5
|
@ -0,0 +1,56 @@
|
|||
From dee94396eee4b67eafae7f00e540cb284769473d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
|
||||
Date: Wed, 15 Sep 2021 23:54:10 -0300
|
||||
Subject: [PATCH] Allow CMake builds from tarball.
|
||||
|
||||
Add environment variable that can be passed to build/version.sh to force
|
||||
a git version if it can't use git to determine one.
|
||||
|
||||
Since we are here, also fix:
|
||||
|
||||
- use of 'return' in a script, should be 'exit'
|
||||
- wrong grep command to match numerical version with 3 digits
|
||||
---
|
||||
build/version.sh | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/build/version.sh b/build/version.sh
|
||||
index 8cea0a3f3..d505341e4 100755
|
||||
--- a/build/version.sh
|
||||
+++ b/build/version.sh
|
||||
@@ -10,13 +10,13 @@ if ! test -d "${srcdir}/.git"; then
|
||||
done < "${version_h_path}"
|
||||
if test x$BUILD_GIT_VERSION_NUMBER != x -a x$BUILD_GIT_VERSION_STRING != x; then
|
||||
export VERSION_SOURCE="from cached git_version.h"
|
||||
- return 0
|
||||
+ exit 0
|
||||
else
|
||||
echo "invalid git_version.h"
|
||||
exit 2
|
||||
fi
|
||||
- else
|
||||
- echo "git repo not found and no cached git_version.h"
|
||||
+ elif [ -z "$FORCE_GIT_VERSION" ]; then
|
||||
+ echo "git repo not found and no cached git_version.h - use FORCE_GIT_VERSION to override"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
@@ -25,13 +25,13 @@ last_svn_revision=6962
|
||||
last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"
|
||||
|
||||
git_revision=$(expr $last_svn_revision + $(git log --pretty=oneline $last_svn_hash..HEAD 2>/dev/null | wc -l))
|
||||
-git_version_str=$(git describe --exact-match 2> /dev/null)
|
||||
+git_version_str=${FORCE_GIT_VERSION:-$(git describe --exact-match 2> /dev/null)}
|
||||
installer_version='0.0.0'
|
||||
resource_version='0, 0, 0'
|
||||
if test x$git_version_str != x; then
|
||||
git_version_str="${git_version_str##v}"
|
||||
tagged_release=1
|
||||
- if [ $(echo $git_version_str | grep '\d\.\d\.\d') ]; then
|
||||
+ if [ $(echo $git_version_str | grep '[0-9].[0-9].[0-9]') ]; then
|
||||
installer_version=$git_version_str
|
||||
resource_version=$(echo $git_version_str | sed 's/\./, /g')
|
||||
fi
|
||||
--
|
||||
2.33.0
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From d8336d2fed73c72d1227b343d6acfb991bc1651b Mon Sep 17 00:00:00 2001
|
||||
From: Jan Beich <jbeich@FreeBSD.org>
|
||||
Date: Mon, 9 Jul 2018 20:15:29 +0000
|
||||
Subject: [PATCH] Keep using std::distance after Boost 1.68
|
||||
|
||||
src/search_replace_engine.cpp:256:14: error: call to
|
||||
'distance' is ambiguous
|
||||
count += distance(
|
||||
^~~~~~~~
|
||||
/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter =
|
||||
boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
|
||||
distance(_InputIter __first, _InputIter __last)
|
||||
^
|
||||
/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator =
|
||||
boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
|
||||
distance(SinglePassIterator first, SinglePassIterator last)
|
||||
^
|
||||
---
|
||||
src/search_replace_engine.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git src/search_replace_engine.cpp src/search_replace_engine.cpp
|
||||
index 594c21e5e..14c71680d 100644
|
||||
--- a/src/search_replace_engine.cpp
|
||||
+++ b/src/search_replace_engine.cpp
|
||||
@@ -253,7 +253,7 @@ bool SearchReplaceEngine::ReplaceAll() {
|
||||
if (MatchState ms = matches(&diag, 0)) {
|
||||
auto& diag_field = diag.*get_dialogue_field(settings.field);
|
||||
std::string const& text = diag_field.get();
|
||||
- count += distance(
|
||||
+ count += std::distance(
|
||||
boost::u32regex_iterator<std::string::const_iterator>(begin(text), end(text), *ms.re),
|
||||
boost::u32regex_iterator<std::string::const_iterator>());
|
||||
diag_field = u32regex_replace(text, *ms.re, settings.replace_with);
|
|
@ -1,66 +0,0 @@
|
|||
From bb1f66a01f6e4661ab9c6610c5c2eee67bd0bd61 Mon Sep 17 00:00:00 2001
|
||||
From: wangqr <wangqr@wangqr.tk>
|
||||
Date: Thu, 15 Nov 2018 12:42:53 -0500
|
||||
Subject: [PATCH] Bump boost version to 1.69.0.beta1
|
||||
|
||||
Fix Aegisub/Aegisub#93
|
||||
---
|
||||
src/colour_button.cpp | 2 +-
|
||||
src/subtitles_provider_libass.cpp | 2 +-
|
||||
src/video_frame.cpp | 2 +-
|
||||
src/video_provider_dummy.cpp | 2 +-
|
||||
vendor/boost | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/colour_button.cpp b/src/colour_button.cpp
|
||||
index c0b1c5d58..48a87856c 100644
|
||||
--- a/src/colour_button.cpp
|
||||
+++ b/src/colour_button.cpp
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "dialogs.h"
|
||||
|
||||
-#include <boost/gil/gil_all.hpp>
|
||||
+#include <boost/gil.hpp>
|
||||
|
||||
AGI_DEFINE_EVENT(EVT_COLOR, agi::Color);
|
||||
|
||||
diff --git a/src/subtitles_provider_libass.cpp b/src/subtitles_provider_libass.cpp
|
||||
index efb5cb481..fb62e3334 100644
|
||||
--- a/src/subtitles_provider_libass.cpp
|
||||
+++ b/src/subtitles_provider_libass.cpp
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <libaegisub/util.h>
|
||||
|
||||
#include <atomic>
|
||||
-#include <boost/gil/gil_all.hpp>
|
||||
+#include <boost/gil.hpp>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
diff --git a/src/video_frame.cpp b/src/video_frame.cpp
|
||||
index 610005879..c51f929ac 100644
|
||||
--- a/src/video_frame.cpp
|
||||
+++ b/src/video_frame.cpp
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "video_frame.h"
|
||||
|
||||
-#include <boost/gil/gil_all.hpp>
|
||||
+#include <boost/gil.hpp>
|
||||
#include <wx/image.h>
|
||||
|
||||
namespace {
|
||||
diff --git a/src/video_provider_dummy.cpp b/src/video_provider_dummy.cpp
|
||||
index b68b206b7..eca5ac261 100644
|
||||
--- a/src/video_provider_dummy.cpp
|
||||
+++ b/src/video_provider_dummy.cpp
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <libaegisub/format.h>
|
||||
-#include <boost/gil/gil_all.hpp>
|
||||
+#include <boost/gil.hpp>
|
||||
|
||||
DummyVideoProvider::DummyVideoProvider(double fps, int frames, int width, int height, agi::Color colour, bool pattern)
|
||||
: framecount(frames)
|
|
@ -1,87 +0,0 @@
|
|||
Source: @pullmoll
|
||||
Upstream: no
|
||||
Reason: ffms2 no longer provides color space enum values; use the ffmpeg ones
|
||||
|
||||
--- a/src/ffmpegsource_common.cpp 2014-12-08 01:07:09.000000000 +0100
|
||||
+++ b/src/ffmpegsource_common.cpp 2021-01-18 21:12:42.209582337 +0100
|
||||
@@ -98,7 +98,6 @@
|
||||
ps->SetProgress(Current, Total);
|
||||
return ps->IsCancelled();
|
||||
};
|
||||
- Index = FFMS_DoIndexing(Indexer, Trackmask, FFMS_TRACKMASK_NONE,
|
||||
- nullptr, nullptr, IndexEH, callback, ps, &ErrInfo);
|
||||
+ Index = FFMS_DoIndexing2(Indexer, FFMS_IEH_ABORT, &ErrInfo);
|
||||
});
|
||||
|
||||
--- a/src/video_provider_ffmpegsource.cpp 2014-12-08 01:07:09.000000000 +0100
|
||||
+++ b/src/video_provider_ffmpegsource.cpp 2021-01-18 21:07:47.205800051 +0100
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <libaegisub/fs.h>
|
||||
#include <libaegisub/make_unique.h>
|
||||
+#include <libavutil/pixfmt.h>
|
||||
|
||||
namespace {
|
||||
/// @class FFmpegSourceVideoProvider
|
||||
@@ -78,7 +79,7 @@
|
||||
if (matrix == RealColorSpace)
|
||||
FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), nullptr);
|
||||
else if (matrix == "TV.601")
|
||||
- FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr);
|
||||
+ FFMS_SetInputFormatV(VideoSource, AVCOL_SPC_BT470BG, CR, FFMS_GetPixFmt(""), nullptr);
|
||||
else
|
||||
return;
|
||||
ColorSpace = matrix;
|
||||
@@ -103,16 +104,16 @@
|
||||
std::string str = cr == FFMS_CR_JPEG ? "PC" : "TV";
|
||||
|
||||
switch (cs) {
|
||||
- case FFMS_CS_RGB:
|
||||
+ case AVCOL_SPC_RGB:
|
||||
return "None";
|
||||
- case FFMS_CS_BT709:
|
||||
+ case AVCOL_SPC_BT709:
|
||||
return str + ".709";
|
||||
- case FFMS_CS_FCC:
|
||||
+ case AVCOL_SPC_FCC:
|
||||
return str + ".FCC";
|
||||
- case FFMS_CS_BT470BG:
|
||||
- case FFMS_CS_SMPTE170M:
|
||||
+ case AVCOL_SPC_BT470BG:
|
||||
+ case AVCOL_SPC_SMPTE170M:
|
||||
return str + ".601";
|
||||
- case FFMS_CS_SMPTE240M:
|
||||
+ case AVCOL_SPC_SMPTE240M:
|
||||
return str + ".240M";
|
||||
default:
|
||||
throw VideoOpenError("Unknown video color space");
|
||||
@@ -208,8 +209,6 @@
|
||||
|
||||
// set thread count
|
||||
int Threads = OPT_GET("Provider/Video/FFmpegSource/Decoding Threads")->GetInt();
|
||||
- if (FFMS_GetVersion() < ((2 << 24) | (17 << 16) | (2 << 8) | 1) && FFMS_GetSourceType(Index) == FFMS_SOURCE_LAVF)
|
||||
- Threads = 1;
|
||||
|
||||
// set seekmode
|
||||
// TODO: give this its own option?
|
||||
@@ -240,15 +239,15 @@
|
||||
CS = TempFrame->ColorSpace;
|
||||
CR = TempFrame->ColorRange;
|
||||
|
||||
- if (CS == FFMS_CS_UNSPECIFIED)
|
||||
- CS = Width > 1024 || Height >= 600 ? FFMS_CS_BT709 : FFMS_CS_BT470BG;
|
||||
+ if (CS == AVCOL_SPC_UNSPECIFIED)
|
||||
+ CS = Width > 1024 || Height >= 600 ? AVCOL_SPC_BT709 : AVCOL_SPC_BT470BG;
|
||||
RealColorSpace = ColorSpace = colormatrix_description(CS, CR);
|
||||
|
||||
#if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0)
|
||||
- if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) {
|
||||
- if (FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), &ErrInfo))
|
||||
+ if (CS != AVCOL_SPC_RGB && CS != AVCOL_SPC_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) {
|
||||
+ if (FFMS_SetInputFormatV(VideoSource, AVCOL_SPC_BT470BG, CR, FFMS_GetPixFmt(""), &ErrInfo))
|
||||
throw VideoOpenError(std::string("Failed to set input format: ") + ErrInfo.Buffer);
|
||||
- ColorSpace = colormatrix_description(FFMS_CS_BT470BG, CR);
|
||||
+ ColorSpace = colormatrix_description(AVCOL_SPC_BT470BG, CR);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
Upstream: Yes
|
||||
Author: sidneys <sidneys.github.io@outlook.com>
|
||||
Reason: fix build w/ ICU >= 60
|
||||
--- a/libaegisub/common/character_count.cpp
|
||||
+++ b/libaegisub/common/character_count.cpp
|
||||
@@ -36,7 +36,7 @@ icu::BreakIterator& get_break_iterator(const char *ptr, size_t len) {
|
||||
static std::once_flag token;
|
||||
std::call_once(token, [&] {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
- bi.reset(BreakIterator::createCharacterInstance(Locale::getDefault(), status));
|
||||
+ bi.reset(icu::BreakIterator::createCharacterInstance(icu::Locale::getDefault(), status));
|
||||
if (U_FAILURE(status)) throw agi::InternalError("Failed to create character iterator");
|
||||
});
|
||||
|
||||
@@ -58,7 +58,7 @@ size_t count_in_range(Iterator begin, Iterator end, int mask) {
|
||||
|
||||
size_t count = 0;
|
||||
auto pos = character_bi.first();
|
||||
- for (auto end = character_bi.next(); end != BreakIterator::DONE; pos = end, end = character_bi.next()) {
|
||||
+ for (auto end = character_bi.next(); end != icu::BreakIterator::DONE; pos = end, end = character_bi.next()) {
|
||||
if (!mask)
|
||||
++count;
|
||||
else {
|
||||
@@ -143,7 +143,7 @@ size_t IndexOfCharacter(std::string const& str, size_t n) {
|
||||
auto& bi = get_break_iterator(&str[0], str.size());
|
||||
|
||||
for (auto pos = bi.first(), end = bi.next(); ; --n, pos = end, end = bi.next()) {
|
||||
- if (end == BreakIterator::DONE)
|
||||
+ if (end == icu::BreakIterator::DONE)
|
||||
return str.size();
|
||||
if (n == 0)
|
||||
return pos;
|
||||
--- a/src/utils.cpp
|
||||
+++ b/src/utils.cpp
|
||||
@@ -270,9 +270,9 @@ agi::fs::path SaveFileSelector(wxString const& message, std::string const& optio
|
||||
}
|
||||
|
||||
wxString LocalizedLanguageName(wxString const& lang) {
|
||||
- Locale iculoc(lang.c_str());
|
||||
+ icu::Locale iculoc(lang.c_str());
|
||||
if (!iculoc.isBogus()) {
|
||||
- UnicodeString ustr;
|
||||
+ icu::UnicodeString ustr;
|
||||
iculoc.getDisplayName(iculoc, ustr);
|
||||
#ifdef _MSC_VER
|
||||
return wxString(ustr.getBuffer());
|
||||
--- a/src/utils.cpp
|
||||
+++ b/src/utils.cpp
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <map>
|
||||
#include <unicode/locid.h>
|
||||
+#include <unicode/unistr.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
--- a/configure.ac 2021-01-18 20:39:16.546501531 +0100
|
||||
+++ b/configure.ac 2021-01-18 20:57:43.667587518 +0100
|
||||
@@ -142,7 +142,8 @@
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -std=gnu99 -pipe -g"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -pipe -g"
|
||||
AC_CXX_FLAG([-std=c++11])
|
||||
- AC_CXX_FLAG([-Wno-c++11-narrowing])
|
||||
+ AC_CXX_FLAG([-Wno-narrowing])
|
||||
+ AC_CXX_FLAG([-Wno-deprecated-copy])
|
||||
AC_C_FLAG([-Wno-unused-local-typedefs])
|
||||
AC_CXX_FLAG([-Wno-unused-local-typedefs])
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
--- a/Makefile.inc.in
|
||||
+++ b/Makefile.inc.in
|
||||
@@ -8,6 +8,7 @@ HAVE_OSS = @with_oss@
|
||||
HAVE_PORTAUDIO = @with_portaudio@
|
||||
HAVE_FFMS2 = @with_ffms2@
|
||||
HAVE_LIBPULSE = @with_libpulse@
|
||||
+HAVE_LIBATOMIC = @with_libatomic@
|
||||
|
||||
##############
|
||||
# BUILD OUTPUT
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -376,6 +376,9 @@ AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 supp
|
||||
AGI_OPT_PKG(fftw3, [build without fftw support [auto]], [Enable fftw support])
|
||||
AGI_OPT_PKG(hunspell, [build without hunspell spell-checking [auto]], [Enable Hunspell support])
|
||||
|
||||
+AC_ARG_WITH([libatomic], AS_HELP_STRING([--with-libatomic],[Use libatomic. [no]]))
|
||||
+AC_SUBST(with_libatomic)
|
||||
+
|
||||
######################################################
|
||||
# Debugging support
|
||||
######################################################
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -179,6 +179,10 @@ src_LIBS += $(LIBS_HUNSPELL)
|
||||
src_OBJ += $(d)spellchecker_hunspell.o
|
||||
endif
|
||||
|
||||
+ifeq (yes, $(HAVE_LIBATOMIC))
|
||||
+src_LIBS += -latomic
|
||||
+endif
|
||||
+
|
||||
#####################
|
||||
# SOURCE-LEVEL CFLAGS
|
||||
#####################
|
|
@ -1,190 +0,0 @@
|
|||
Subject: Fix luajit 2.1 FTBFS
|
||||
Origin: Upstream
|
||||
Forwarded: Not-needed
|
||||
Last-Update:
|
||||
Bug: 873327
|
||||
Acked-by: Gunnar Wolf <gwolf@debian.org>
|
||||
Applied-upstream: yes
|
||||
|
||||
Index: libaegisub/lua/modules/lpeg.c
|
||||
===================================================================
|
||||
--- a/libaegisub/lua/modules/lpeg.c
|
||||
+++ b/libaegisub/lua/modules/lpeg.c
|
||||
@@ -2334,7 +2334,7 @@ static int matchl (lua_State *L) {
|
||||
}
|
||||
|
||||
|
||||
-static struct luaL_reg pattreg[] = {
|
||||
+static struct luaL_Reg pattreg[] = {
|
||||
{"match", matchl},
|
||||
{"print", printpat_l},
|
||||
{"locale", locale_l},
|
||||
@@ -2360,7 +2360,7 @@ static struct luaL_reg pattreg[] = {
|
||||
};
|
||||
|
||||
|
||||
-static struct luaL_reg metapattreg[] = {
|
||||
+static struct luaL_Reg metapattreg[] = {
|
||||
{"__add", union_l},
|
||||
{"__pow", star_l},
|
||||
{"__sub", diff_l},
|
||||
Index: vendor/luabins/AUTHORS
|
||||
===================================================================
|
||||
--- a/vendor/luabins/AUTHORS
|
||||
+++ b/vendor/luabins/AUTHORS
|
||||
@@ -2,3 +2,4 @@ Luabins authors:
|
||||
----------------
|
||||
|
||||
Alexander Gladysh <agladysh@gmail.com>
|
||||
+hanxi <hanxi@gmail.com>
|
||||
Index: vendor/luabins/README.md
|
||||
===================================================================
|
||||
--- a/vendor/luabins/README.md
|
||||
+++ b/vendor/luabins/README.md
|
||||
@@ -4,6 +4,8 @@ luabins — Lua Binary Serialization Lib
|
||||
Allows to save tuples of primitive Lua types into binary chunks
|
||||
and to load saved data back.
|
||||
|
||||
+NB: You may be better off with luatexts: https://github.com/agladysh/luatexts.
|
||||
+
|
||||
On serialization
|
||||
----------------
|
||||
|
||||
Index: vendor/luabins/src/luabins.c
|
||||
===================================================================
|
||||
--- a/vendor/luabins/src/luabins.c
|
||||
+++ b/vendor/luabins/src/luabins.c
|
||||
@@ -54,7 +54,7 @@ static int l_load(lua_State * L)
|
||||
}
|
||||
|
||||
/* luabins Lua module API */
|
||||
-static const struct luaL_reg R[] =
|
||||
+static const struct luaL_Reg R[] =
|
||||
{
|
||||
{ "save", l_save },
|
||||
{ "load", l_load },
|
||||
Index: vendor/luabins/src/luaheaders.h
|
||||
===================================================================
|
||||
--- a/vendor/luabins/src/luaheaders.h
|
||||
+++ b/vendor/luabins/src/luaheaders.h
|
||||
@@ -7,6 +7,16 @@ extern "C" {
|
||||
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
+
|
||||
+#if !defined LUA_VERSION_NUM
|
||||
+#define luaL_Reg luaL_reg
|
||||
+#endif
|
||||
+
|
||||
+#if LUA_VERSION_NUM > 501
|
||||
+#define luaL_register(L,n,R) (luaL_newlib(L,R))
|
||||
+#define lua_objlen(L,i) lua_rawlen(L, (i))
|
||||
+#endif
|
||||
+
|
||||
#if defined (__cplusplus) && !defined (LUABINS_LUABUILTASCPP)
|
||||
}
|
||||
#endif
|
||||
Index: vendor/luabins/src/luainternals.h
|
||||
===================================================================
|
||||
--- a/vendor/luabins/src/luainternals.h
|
||||
+++ b/vendor/luabins/src/luainternals.h
|
||||
@@ -7,6 +7,24 @@
|
||||
#ifndef LUABINS_LUAINTERNALS_H_INCLUDED_
|
||||
#define LUABINS_LUAINTERNALS_H_INCLUDED_
|
||||
|
||||
+#ifndef LUAI_BITSINT
|
||||
+/*
|
||||
+* LUAI_BITSINT defines the number of bits in an int.
|
||||
+* CHANGE here if Lua cannot automatically detect the number of bits of
|
||||
+* your machine. Probably you do not need to change this.
|
||||
+*
|
||||
+* avoid overflows in comparison */
|
||||
+#if INT_MAX-20 < 32760
|
||||
+#define LUAI_BITSINT 16
|
||||
+#elif INT_MAX > 2147483640L
|
||||
+/* int has at least 32 bits */
|
||||
+#define LUAI_BITSINT 32
|
||||
+#else
|
||||
+#error "you must define LUA_BITSINT with number of bits in an integer"
|
||||
+#endif
|
||||
+
|
||||
+#endif // ifndef LUAI_BITSINT
|
||||
+
|
||||
/*
|
||||
* BEGIN COPY-PASTE FROM Lua 5.1.4 luaconf.h
|
||||
* WARNING: If your Lua config differs, fix this!
|
||||
@@ -38,7 +56,6 @@ int luaO_log2 (unsigned int x);
|
||||
/*
|
||||
** max size of array part is 2^MAXBITS
|
||||
*/
|
||||
-#define LUAI_BITSINT 32
|
||||
#if LUAI_BITSINT > 26
|
||||
#define MAXBITS 26
|
||||
#else
|
||||
Index: vendor/luabins/src/lualess.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/vendor/luabins/src/lualess.c
|
||||
@@ -0,0 +1,32 @@
|
||||
+/*
|
||||
+* lualess.h
|
||||
+* Lua-related definitions for lua-less builds (based on Lua manual)
|
||||
+* See copyright notice in luabins.h
|
||||
+*/
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+/*
|
||||
+* lua_Alloc-compatible allocator to use in Lua-less applications
|
||||
+* with lbs_SaveBuffer. Based on sample code from Lua 5.1 manual.
|
||||
+*/
|
||||
+void * lbs_simplealloc(
|
||||
+ void * ud,
|
||||
+ void * ptr,
|
||||
+ size_t osize,
|
||||
+ size_t nsize
|
||||
+ )
|
||||
+{
|
||||
+ (void) ud;
|
||||
+ (void) osize; /* not used */
|
||||
+
|
||||
+ if (nsize == 0)
|
||||
+ {
|
||||
+ free(ptr);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return realloc(ptr, nsize);
|
||||
+ }
|
||||
+}
|
||||
Index: vendor/luabins/test/test.lua
|
||||
===================================================================
|
||||
--- a/vendor/luabins/test/test.lua
|
||||
+++ b/vendor/luabins/test/test.lua
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
package.cpath = "./?.so;"..package.cpath
|
||||
|
||||
+local pack = pack or table.pack
|
||||
+local unpack = unpack or table.unpack
|
||||
local randomseed = 1235134892
|
||||
--local randomseed = os.time()
|
||||
|
||||
@@ -145,6 +147,7 @@ end
|
||||
-- Test helper functions
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
+luabins = require 'luabins'
|
||||
local luabins_local = require 'luabins'
|
||||
assert(luabins_local == luabins)
|
||||
|
||||
@@ -281,7 +284,7 @@ check_fail_save(
|
||||
"can't save: unsupported type detected",
|
||||
coroutine.create(function() end)
|
||||
)
|
||||
-check_fail_save("can't save: unsupported type detected", newproxy())
|
||||
+check_fail_save("can't save: unsupported type detected", function()end)
|
||||
|
||||
print("---> basic table tests")
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
From f4cc905c69ca69c68cb95674cefce4abc37ce046 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 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) $@
|
|
@ -1,68 +0,0 @@
|
|||
Subject: vendor/luajit is removed in the Debian package
|
||||
Author: Sebastian Reichel <sre@debian.org>
|
||||
Forwarded: not-needed
|
||||
Last-Update: 2014-08-06
|
||||
Upstream: Yes
|
||||
Reason: Use system luajit
|
||||
|
||||
--- a/header.mk
|
||||
+++ b/header.mk
|
||||
@@ -13,7 +13,6 @@
|
||||
tests \
|
||||
tools \
|
||||
vendor/luabins \
|
||||
- vendor/luajit \
|
||||
vendor/universalchardet
|
||||
|
||||
subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
|
||||
--- a/Makefile.inc.in
|
||||
+++ b/Makefile.inc.in
|
||||
@@ -78,7 +78,7 @@
|
||||
CFLAGS_ICU = @ICU_I18N_CFLAGS@
|
||||
CFLAGS_LIBASS = @LIBASS_CFLAGS@
|
||||
CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
|
||||
-CFLAGS_LUA = -I$(TOP)vendor/luajit/include
|
||||
+CFLAGS_LUA = @LUAJIT_CFLAGS@
|
||||
CFLAGS_OPENAL = @OPENAL_CFLAGS@
|
||||
CFLAGS_OSS = @OSS_CFLAGS@
|
||||
CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
|
||||
@@ -96,7 +96,7 @@
|
||||
LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
|
||||
LIBS_LIBASS = @LIBASS_LIBS@
|
||||
LIBS_LIBPULSE = @LIBPULSE_LIBS@
|
||||
-LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
|
||||
+LIBS_LUA = @LUAJIT_LIBS@
|
||||
LIBS_OPENAL = @OPENAL_LIBS@
|
||||
LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
|
||||
LIBS_PTHREAD = @PTHREAD_LIBS@
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -12,6 +12,4 @@
|
||||
|
||||
PROGRAM += $(d)repack-thes-dict
|
||||
|
||||
-$(TOP)tools/respack.lua: $(TOP)vendor/luajit/src/host/minilua
|
||||
-
|
||||
include $(TOP)Makefile.target
|
||||
--- a/tools/respack.lua
|
||||
+++ b/tools/respack.lua
|
||||
@@ -44,7 +44,7 @@ out_cpp:write('#include "libresrc.h"\n')
|
||||
for line in manifest:lines() do
|
||||
if line:find('.') then
|
||||
local file = try_open(path..line, 'rb')
|
||||
- local id = line:gsub('^.*/', ''):gsub('\.[a-z]+$', '')
|
||||
+ local id = line:gsub('^.*/', ''):gsub('%.[a-z]+$', '')
|
||||
out_cpp:write("const unsigned char " .. id .. "[] = {")
|
||||
|
||||
local len = 0
|
||||
--- a/src/libresrc/Makefile
|
||||
+++ b/src/libresrc/Makefile
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
$(resrc_OBJ): $(d)default_config.h $(d)bitmap.h $(d)default_config.cpp $(d)bitmap.cpp
|
||||
|
||||
-RESPACK := cd $(TOP)src/libresrc; $(TOP)vendor/luajit/src/host/minilua $(TOP)tools/respack.lua
|
||||
+RESPACK := cd $(TOP)src/libresrc; $(TOP)tools/respack.lua
|
||||
|
||||
$(d)bitmap.cpp: $(d)bitmap.h
|
||||
$(d)default_config.cpp: $(d)default_config.h
|
|
@ -1,43 +0,0 @@
|
|||
Source: Upstream
|
||||
Upstream: Yes
|
||||
Reason: Use system luajit
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index be657b0..2c03951 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -376,6 +376,34 @@ AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 supp
|
||||
AGI_OPT_PKG(fftw3, [build without fftw support [auto]], [Enable fftw support])
|
||||
AGI_OPT_PKG(hunspell, [build without hunspell spell-checking [auto]], [Enable Hunspell support])
|
||||
|
||||
+########
|
||||
+# LuaJIT
|
||||
+########
|
||||
+system_luajit="bundled"
|
||||
+AC_ARG_WITH(system-luajit, AS_HELP_STRING([--without-system-luajit], [Use built-in LuaJIT [auto]]))
|
||||
+# Check if it's available at all
|
||||
+AS_IF([test x$with_system_luajit = xno], [],
|
||||
+ [PKG_CHECK_MODULES(LUAJIT, luajit >= 2.0.0, [], [
|
||||
+ AS_IF([test x$with_system_luajit = xyes],
|
||||
+ [AC_MSG_FAILURE([--with-sytem-luajit was specified, but luajit could not be found])])
|
||||
+ with_system_luajit="no"])])
|
||||
+
|
||||
+with_system_luajit="yes"
|
||||
+system_luajit="system"
|
||||
+
|
||||
+
|
||||
+AS_IF([test $with_system_luajit = no],
|
||||
+ [AC_SUBST([LUAJIT_CFLAGS], ['-I$(TOP)vendor/luajit/include'])
|
||||
+ AC_SUBST([LUAJIT_LIBS], ['$(TOP)vendor/luajit/src/libluajit.a'])])
|
||||
+
|
||||
+# We also need a Lua binary to run part of the build system
|
||||
+# Which version doesn't matter as the scripts are portable between them
|
||||
+AC_CHECK_PROGS([LUA], [lua luajit lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1])
|
||||
+
|
||||
+# If the user doesn't have an installed copy of Lua, just use the one built
|
||||
+# as part of building LuaJIT
|
||||
+AS_IF([test -z $LUA], [LUA="$srcdir/vendor/luajit/src/host/minilua"])
|
||||
+
|
||||
######################################################
|
||||
# Debugging support
|
||||
######################################################
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From 592250eeaafe2a34b08e973ac97afe389617a3e6 Mon Sep 17 00:00:00 2001
|
||||
From: wangqr <wangqr@wangqr.tk>
|
||||
Date: Thu, 6 Jun 2019 15:24:40 -0400
|
||||
Subject: [PATCH] Remove call to wxSizer::CalcMin and wxSizer::RecalcSizes
|
||||
|
||||
As they are used internally by Layout and should not be called
|
||||
directly.
|
||||
---
|
||||
src/frame_main.cpp | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/src/frame_main.cpp b/src/frame_main.cpp
|
||||
index b35c32960..df115b27c 100644
|
||||
--- a/src/frame_main.cpp
|
||||
+++ b/src/frame_main.cpp
|
||||
@@ -240,8 +240,6 @@ void FrameMain::SetDisplayMode(int video, int audio) {
|
||||
TopSizer->Show(videoBox, showVideo, true);
|
||||
ToolsSizer->Show(audioBox, showAudio, true);
|
||||
|
||||
- MainSizer->CalcMin();
|
||||
- MainSizer->RecalcSizes();
|
||||
MainSizer->Layout();
|
||||
Layout();
|
||||
|
|
@ -1,22 +1,25 @@
|
|||
# Template file for 'Aegisub'
|
||||
pkgname=Aegisub
|
||||
version=3.2.2
|
||||
revision=13
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-update-checker --with-alsa --with-ffms2
|
||||
--with-wx-config=wx-config-gtk3 $(vopt_with fftw fftw3) $(vopt_with openal)
|
||||
$(vopt_with portaudio)"
|
||||
hostmakedepends="automake gettext-devel intltool libtool LuaJIT pkg-config"
|
||||
version=3.3.2
|
||||
revision=1
|
||||
build_style=cmake
|
||||
build_helper=cmake-wxWidgets-gtk3
|
||||
cmake_builddir="BUILD"
|
||||
configure_args="-DwxWidgets_CONFIG_EXECUTABLE=$WX_CONFIG
|
||||
-DWITH_PORTAUDIO=$(vopt_if portaudio ON OFF)
|
||||
-DWITH_OPENAL=$(vopt_if openal ON OFF) -DWITH_FFTW3=$(vopt_if fftw ON OFF)"
|
||||
hostmakedepends="gettext-devel intltool pkg-config git"
|
||||
makedepends="alsa-lib-devel boost-devel libcurl-devel fontconfig-devel
|
||||
freetype-devel hunspell-devel icu-devel libass-devel libffms2-devel LuaJIT-devel
|
||||
freetype-devel hunspell-devel icu-devel libass-devel libffms2-devel
|
||||
MesaLib-devel wxWidgets-gtk3-devel $(vopt_if fftw fftw-devel)
|
||||
$(vopt_if openal libopenal-devel) $(vopt_if portaudio portaudio-devel)"
|
||||
short_desc="Tool for creating and modifying subtitles"
|
||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||
short_desc="Subtitle editor (ssa, ass, srt)"
|
||||
maintainer="pudiva <rogi@skylittlesystem.org>"
|
||||
license="BSD-3-Clause, MIT"
|
||||
homepage="http://www.aegisub.org"
|
||||
distfiles="https://github.com/Aegisub/Aegisub/archive/v${version}.tar.gz"
|
||||
checksum=62757dd491455268a240f983b59734a801cc2e899039a7493deeaf5e24a61dcd
|
||||
homepage="https://github.com/wangqr/Aegisub"
|
||||
distfiles="https://github.com/wangqr/Aegisub/archive/v${version}.tar.gz"
|
||||
checksum="9aaab8e66cef2a72368c6b7f79b2f99700321a7b9a1ca623c5e6be0e65418db5"
|
||||
nocross=yes
|
||||
|
||||
build_options="fftw openal portaudio"
|
||||
build_options_default="fftw"
|
||||
|
@ -24,38 +27,8 @@ build_options_default="fftw"
|
|||
desc_option_fftw="Enable support for rendering of audio waveforms/spectrum"
|
||||
desc_option_openal="Enable support for openal"
|
||||
|
||||
LDFLAGS+=" -pthread"
|
||||
|
||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||
makedepends+="libatomic-devel"
|
||||
configure_args+=" --with-libatomic"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# When cross building the detection of iconv const parameters is wrong
|
||||
configure_args+=" agi_cv_with_iconv_const=no"
|
||||
# and cross is broken because of boost::icu_regex_trais anyway ...
|
||||
broken="/usr/aarch64-linux-gnu/usr/include/boost/regex/v4/perl_matcher_common.hpp:512: undefined reference to 'boost ::icu_regex_traits::isctype(int, unsigned long) const'"
|
||||
fi
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*musl) broken="segfaults on startup";;
|
||||
esac
|
||||
|
||||
post_extract() {
|
||||
# Fix shebang to use system luajit instead of vendored minilua
|
||||
sed -e \
|
||||
"s:../vendor/luajit/src/host/minilua:/usr/bin/luajit:" \
|
||||
-i tools/respack.lua
|
||||
}
|
||||
|
||||
pre_configure() {
|
||||
# Aegisub fails to start on Wayland, so we have to force GDK to start it
|
||||
# with the x11 backend
|
||||
sed "s/Exec=@AEGISUB_COMMAND@ %f/Exec=env GDK_BACKEND=x11 @AEGISUB_COMMAND@ %f/" -i \
|
||||
packages/desktop/aegisub.desktop.template.in
|
||||
|
||||
autoreconf -fi
|
||||
pre_build() {
|
||||
export FORCE_GIT_VERSION="$version"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
|
Loading…
Reference in New Issue