aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/vlc/Makefile3
-rw-r--r--multimedia/vlc/Makefile.inc5
-rw-r--r--multimedia/vlc/files/old-ffmpeg-patch54
-rw-r--r--multimedia/vlc/files/patch-modules_codec_ffmpeg_ffmpeg.c25
-rw-r--r--multimedia/vlc/files/patch-modules_codec_ffmpeg_postprocess.c18
-rw-r--r--multimedia/vlc/files/patch-modules_stream_out_switcher.c11
6 files changed, 61 insertions, 55 deletions
diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile
index 3153024302a2..da1fda3af39d 100644
--- a/multimedia/vlc/Makefile
+++ b/multimedia/vlc/Makefile
@@ -68,8 +68,11 @@ BROKEN= Does not compile with perl ${PERL_VERSION}
.if exists(${LOCALBASE}/libdata/pkgconfig/libavcodec.pc) || !exists(${LOCALBASE}/lib/libavformat.a)
LIB_DEPENDS+= avcodec.1:${PORTSDIR}/multimedia/ffmpeg-devel
+FFMPEG= new
.else
LIB_DEPENDS+= avcodec.1:${PORTSDIR}/multimedia/ffmpeg
+FFMPEG= old
+EXTRA_PATCHES= ${PATCHDIR}/old-ffmpeg-patch
.endif
# compatible knobs.
diff --git a/multimedia/vlc/Makefile.inc b/multimedia/vlc/Makefile.inc
index 698148d7612e..266816021dde 100644
--- a/multimedia/vlc/Makefile.inc
+++ b/multimedia/vlc/Makefile.inc
@@ -254,8 +254,11 @@ post-patch:
@${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/' \
-e 's/-lc_r/${PTHREAD_LIBS}/' \
-e 's|-mcpu=pentiumpro||' \
- -e 's|postproc/postprocess.h|ffmpeg/postproc/postprocess.h|' \
${WRKSRC}/configure
+.if ${FFMPEG:L}=="old"
+ @${REINPLACE_CMD} -e 's|postproc/postprocess.h|ffmpeg/postproc/postprocess.h|' \
+ ${WRKSRC}/configure
+.endif
# cdrom/dvd support
@${REINPLACE_CMD} -e 's|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|; \
s|/dev/dvd|${DEFAULT_DVD_DEVICE}|' \
diff --git a/multimedia/vlc/files/old-ffmpeg-patch b/multimedia/vlc/files/old-ffmpeg-patch
new file mode 100644
index 000000000000..a7129ec3e6b2
--- /dev/null
+++ b/multimedia/vlc/files/old-ffmpeg-patch
@@ -0,0 +1,54 @@
+--- modules/codec/ffmpeg/ffmpeg.c.orig Fri May 13 07:48:21 2005
++++ modules/codec/ffmpeg/ffmpeg.c Fri May 13 13:28:17 2005
+@@ -42,11 +42,9 @@
+
+ #include "ffmpeg.h"
+
+-#ifdef LIBAVCODEC_PP
++#if defined(LIBAVCODEC_PP) && LIBAVCODEC_BUILD > 4750
+ # ifdef HAVE_POSTPROC_POSTPROCESS_H
+-# include <postproc/postprocess.h>
+-# else
+-# include <libpostproc/postprocess.h>
++# include <ffmpeg/postproc/postprocess.h>
+ # endif
+ #endif
+
+@@ -105,7 +103,7 @@
+ VLC_TRUE );
+ change_integer_range( 0, 2 );
+
+-#ifdef LIBAVCODEC_PP
++#if defined(LIBAVCODEC_PP) && LIBAVCODEC_BUILD > 4750
+ add_integer( "ffmpeg-pp-q", 0, NULL, PP_Q_TEXT, PP_Q_LONGTEXT, VLC_FALSE );
+ add_string( "ffmpeg-pp-name", "default", NULL, LIBAVCODEC_PP_TEXT,
+ LIBAVCODEC_PP_LONGTEXT, VLC_TRUE );
+--- modules/stream_out/switcher.c.orig Wed Mar 23 03:57:15 2005
++++ modules/stream_out/switcher.c Wed Mar 23 03:57:50 2005
+@@ -44,7 +44,7 @@
+ #ifdef HAVE_POSTPROC_POSTPROCESS_H
+ # include <postproc/postprocess.h>
+ #else
+-# include <libpostproc/postprocess.h>
++# include <ffmpeg/postproc/postprocess.h>
+ #endif
+
+ #define SOUT_CFG_PREFIX "sout-switcher-"
+--- modules/codec/ffmpeg/postprocess.c.orig Fri May 13 07:48:21 2005
++++ modules/codec/ffmpeg/postprocess.c Sat May 14 00:11:53 2005
+@@ -35,13 +35,9 @@
+
+ #include "ffmpeg.h"
+
+-#ifdef LIBAVCODEC_PP
++#if defined(LIBAVCODEC_PP) && LIBAVCODEC_BUILD > 4750
+
+-#ifdef HAVE_POSTPROC_POSTPROCESS_H
+-# include <postproc/postprocess.h>
+-#else
+-# include <libpostproc/postprocess.h>
+-#endif
++#include <ffmpeg/postproc/postprocess.h>
+
+ #ifndef PP_CPU_CAPS_ALTIVEC
+ # define PP_CPU_CAPS_ALTIVEC 0
diff --git a/multimedia/vlc/files/patch-modules_codec_ffmpeg_ffmpeg.c b/multimedia/vlc/files/patch-modules_codec_ffmpeg_ffmpeg.c
deleted file mode 100644
index 502fe4c9688f..000000000000
--- a/multimedia/vlc/files/patch-modules_codec_ffmpeg_ffmpeg.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- modules/codec/ffmpeg/ffmpeg.c.orig Fri May 13 07:48:21 2005
-+++ modules/codec/ffmpeg/ffmpeg.c Fri May 13 13:28:17 2005
-@@ -42,11 +42,9 @@
-
- #include "ffmpeg.h"
-
--#ifdef LIBAVCODEC_PP
-+#if defined(LIBAVCODEC_PP) && LIBAVCODEC_BUILD > 4750
- # ifdef HAVE_POSTPROC_POSTPROCESS_H
--# include <postproc/postprocess.h>
--# else
--# include <libpostproc/postprocess.h>
-+# include <ffmpeg/postproc/postprocess.h>
- # endif
- #endif
-
-@@ -105,7 +103,7 @@
- VLC_TRUE );
- change_integer_range( 0, 2 );
-
--#ifdef LIBAVCODEC_PP
-+#if defined(LIBAVCODEC_PP) && LIBAVCODEC_BUILD > 4750
- add_integer( "ffmpeg-pp-q", 0, NULL, PP_Q_TEXT, PP_Q_LONGTEXT, VLC_FALSE );
- add_string( "ffmpeg-pp-name", "default", NULL, LIBAVCODEC_PP_TEXT,
- LIBAVCODEC_PP_LONGTEXT, VLC_TRUE );
diff --git a/multimedia/vlc/files/patch-modules_codec_ffmpeg_postprocess.c b/multimedia/vlc/files/patch-modules_codec_ffmpeg_postprocess.c
deleted file mode 100644
index 29b5eb319416..000000000000
--- a/multimedia/vlc/files/patch-modules_codec_ffmpeg_postprocess.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- modules/codec/ffmpeg/postprocess.c.orig Fri May 13 07:48:21 2005
-+++ modules/codec/ffmpeg/postprocess.c Sat May 14 00:11:53 2005
-@@ -35,13 +35,9 @@
-
- #include "ffmpeg.h"
-
--#ifdef LIBAVCODEC_PP
-+#if defined(LIBAVCODEC_PP) && LIBAVCODEC_BUILD > 4750
-
--#ifdef HAVE_POSTPROC_POSTPROCESS_H
--# include <postproc/postprocess.h>
--#else
--# include <libpostproc/postprocess.h>
--#endif
-+#include <ffmpeg/postproc/postprocess.h>
-
- #ifndef PP_CPU_CAPS_ALTIVEC
- # define PP_CPU_CAPS_ALTIVEC 0
diff --git a/multimedia/vlc/files/patch-modules_stream_out_switcher.c b/multimedia/vlc/files/patch-modules_stream_out_switcher.c
deleted file mode 100644
index 3952ddff1848..000000000000
--- a/multimedia/vlc/files/patch-modules_stream_out_switcher.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- modules/stream_out/switcher.c.orig Wed Mar 23 03:57:15 2005
-+++ modules/stream_out/switcher.c Wed Mar 23 03:57:50 2005
-@@ -44,7 +44,7 @@
- #ifdef HAVE_POSTPROC_POSTPROCESS_H
- # include <postproc/postprocess.h>
- #else
--# include <libpostproc/postprocess.h>
-+# include <ffmpeg/postproc/postprocess.h>
- #endif
-
- #define SOUT_CFG_PREFIX "sout-switcher-"