diff --git a/srcpkgs/Aegisub/patches/fix-ffms2-2.40.patch b/srcpkgs/Aegisub/patches/fix-ffms2-2.40.patch new file mode 100644 index 00000000000..bec02003130 --- /dev/null +++ b/srcpkgs/Aegisub/patches/fix-ffms2-2.40.patch @@ -0,0 +1,87 @@ +Source: @pullmoll +Upstream: no +Reason: ffms2 no longer provides color space enum values; use the ffmpeg ones + +--- src/ffmpegsource_common.cpp 2014-12-08 01:07:09.000000000 +0100 ++++ 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); + }); + +--- src/video_provider_ffmpegsource.cpp 2014-12-08 01:07:09.000000000 +0100 ++++ src/video_provider_ffmpegsource.cpp 2021-01-18 21:07:47.205800051 +0100 +@@ -42,6 +42,7 @@ + + #include + #include ++#include + + 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 + diff --git a/srcpkgs/Aegisub/patches/fix-no-narrowing.patch b/srcpkgs/Aegisub/patches/fix-no-narrowing.patch new file mode 100644 index 00000000000..ecccc927abe --- /dev/null +++ b/srcpkgs/Aegisub/patches/fix-no-narrowing.patch @@ -0,0 +1,12 @@ +--- configure.ac 2021-01-18 20:39:16.546501531 +0100 ++++ 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]) + diff --git a/srcpkgs/Aegisub/template b/srcpkgs/Aegisub/template index cc810752563..9f38b0e37c0 100644 --- a/srcpkgs/Aegisub/template +++ b/srcpkgs/Aegisub/template @@ -1,7 +1,7 @@ # Template file for 'Aegisub' pkgname=Aegisub version=3.2.2 -revision=11 +revision=12 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)