Skip to content

Commit

Permalink
multimedia/avidemux: Add patch for x265-4.1 update.
Browse files Browse the repository at this point in the history
Signed-off-by: B. Watson <[email protected]>

Signed-off-by: Willy Sudiarto Raharjo <[email protected]>
  • Loading branch information
B. Watson authored and willysr committed Dec 5, 2024
1 parent d4ea2d1 commit e2eb376
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 17 deletions.
19 changes: 16 additions & 3 deletions multimedia/avidemux/avidemux.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# 20220402 bkw: Modified by SlackBuilds.org, BUILD=2:
# 20241205 bkw: Modified by SlackBuilds.org, v2.8.1, BUILD=2:
# - add patch for x265 update to 4.1. don't apply if building against
# x265 3.x.
# - gzip the x86 nosse patch, to avoid misconfigured git repos
# stripping the CRLFs off it.

# 20220402 bkw: Modified by SlackBuilds.org, v2.8.0, BUILD=2:
# - man page was getting installed as a *file* called /usr/man/man1. fix.

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=avidemux
VERSION=${VERSION:-2.8.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

Expand All @@ -53,6 +59,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# 20241205 bkw: Note: these SLKCFLAGS are bogus. They never get
# passed to the build. Also LIBDIRSUFFIX not needed.
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
Expand Down Expand Up @@ -85,7 +93,12 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+

# Thanks FreeBSD guys!
[[ "$ARCH" = "i586" ]] && patch -p0 < $CWD/extra-patch-i386-nosse.patch
[[ "$ARCH" = "i586" ]] && \
zcat $CWD/extra-patch-i386-nosse.patch.gz | patch -p0

# 20241205 bkw: API change in x265 between 3.6 and 4.1. A struct field
# used to be a char*, and now it's a char[256]. Only apply if needed.
pkg-config --atleast-version 4.0 x265 && patch -p1 < $CWD/x265-4.1.diff

sed -i 's|../avidemux/qt4|../avidemux/qt4 -DLRELEASE_EXECUTABLE=/usr/bin/lrelease-qt5|' bootStrap.bash || exit 1
sed -i 's|0.19|1.0|' avidemux_plugins/ADM_videoFilters6/ass/CMakeLists.txt || exit 1
Expand Down
14 changes: 0 additions & 14 deletions multimedia/avidemux/extra-patch-i386-nosse.patch

This file was deleted.

Binary file added multimedia/avidemux/extra-patch-i386-nosse.patch.gz
Binary file not shown.
19 changes: 19 additions & 0 deletions multimedia/avidemux/x265-4.1.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff -Naur avidemux_2.8.1/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp avidemux_2.8.1.patched/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp
--- avidemux_2.8.1/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp 2022-09-17 09:59:17.000000000 -0400
+++ avidemux_2.8.1.patched/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp 2024-12-05 04:27:42.629540408 -0500
@@ -207,13 +207,13 @@
{
param.rc.bStatWrite=1;
param.rc.bStatRead=0;
- param.rc.statFileName=strdup(logFile);
+ strncpy(param.rc.statFileName, logFile, 256);

}else
{
param.rc.bStatWrite=0;
param.rc.bStatRead=1;
- param.rc.statFileName=strdup(logFile);
+ strncpy(param.rc.statFileName, logFile, 256);
if(!ADM_fileExist(logFile))
{
ADM_error("Logfile %s does not exist \n",logFile);

0 comments on commit e2eb376

Please sign in to comment.