gentoo-ebuilds/x11-misc/xscreensaver/files/xscreensaver-6.09-ffmpeg.patch
Cristian Othón Martínez Vera d768a17282
x11-misc/xscreensaver: fix implicit dependency on media-video/ffmpeg
Since version 6.07, xscreensaver could save videos, using
```media-video/ffmpeg```. But the ```configure``` flag
```--with-record-animation``` doesn't work to deactivate this feature.

Also, version 6.09 isn't compatible with recent ffmpeg versions.

Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx>
Part-of: https://github.com/gentoo/gentoo/pull/42397
Closes: https://github.com/gentoo/gentoo/pull/42397
Signed-off-by: Florian Schmaus <flow@gentoo.org>
2025-07-17 09:50:25 +02:00

94 lines
2.7 KiB
Diff

Since version 6.07, xscreensaver could save videos, using ffmpeg
But the configure flag --with-record-animation doesn't work to
deactivate this feature.
Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx>
--- a/configure.ac
+++ b/configure.ac
@@ -3992,6 +3992,28 @@
XFT_OBJS='$(UTILS_BIN)/xft.o'
fi
+###############################################################################
+#
+# Check for --with-record-animation
+#
+###############################################################################
+
+record_anim_default=no
+record_anim="$record_anim_default"
+AC_ARG_WITH(record-animation,
+[ --with-record-animation Include code for generating MP4 videos.],
+ [record_anim="$withval"], [record_anim="$record_anim_default"])
+
+HANDLE_X_PATH_ARG(record_anim, --with-record-animation, record animation)
+
+if test "$record_anim" = yes; then
+ true
+elif test "$record_anim" != no; then
+ echo "error: must be yes or no: --with-record-animation=$record_anim"
+ exit 1
+fi
+
+if test "$record_anim" = yes; then
###############################################################################
#
@@ -4130,6 +4152,15 @@
FFMPEG_LIBS="$FFMPEG_LIBS $extra_ffmpeg_bs"
fi
+ if test "$have_ffmpeg" != yes; then
+ AC_MSG_WARN(--with-record-animation requires the ffmpeg libraries)
+ else
+ AC_MSG_RESULT(enabling --with-record-animation)
+ AC_DEFINE(HAVE_RECORD_ANIM)
+ ANIM_OBJS='$(ANIM_OBJS)'
+ ANIM_LIBS='$(ANIM_LIBS)'
+ fi
+fi
###############################################################################
#
@@ -4221,40 +4252,6 @@
exit 1
fi
-
-###############################################################################
-#
-# Check for --with-record-animation
-#
-###############################################################################
-
-record_anim_default=no
-record_anim="$record_anim_default"
-AC_ARG_WITH(record-animation,
-[ --with-record-animation Include code for generating MP4 videos.],
- [record_anim="$withval"], [record_anim="$record_anim_default"])
-
-HANDLE_X_PATH_ARG(record_anim, --with-record-animation, record animation)
-
-if test "$record_anim" = yes; then
- true
-elif test "$record_anim" != no; then
- echo "error: must be yes or no: --with-record-animation=$record_anim"
- exit 1
-fi
-
-if test "$record_anim" = yes; then
- if test "$have_ffmpeg" != yes; then
- AC_MSG_WARN(--with-record-animation requires the ffmpeg libraries)
- else
- AC_MSG_RESULT(enabling --with-record-animation)
- AC_DEFINE(HAVE_RECORD_ANIM)
- ANIM_OBJS='$(ANIM_OBJS)'
- ANIM_LIBS='$(ANIM_LIBS)'
- fi
-fi
-
-
###############################################################################
#
# Done testing. Now, set up the various -I and -L variables,