mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
- fix build with ffmpeg2
- make ffmpeg default PR: 188317 Obtained from: pld-linux.org
This commit is contained in:
parent
9e12b7916b
commit
8b69a5aedb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350470
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= vice
|
||||
PORTVERSION= 2.4
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/ \
|
||||
ftp://ftp.zimmers.net/pub/cbm/crossplatform/emulators/VICE/
|
||||
@ -19,7 +19,8 @@ BUILD_DEPENDS= bdftopcf:${PORTSDIR}/x11-fonts/bdftopcf \
|
||||
mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
|
||||
LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \
|
||||
libgif.so:${PORTSDIR}/graphics/giflib \
|
||||
libmp3lame.so:${PORTSDIR}/audio/lame
|
||||
libmp3lame.so:${PORTSDIR}/audio/lame \
|
||||
libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
||||
|
||||
RESTRICTED= ROMs are copyrighted by Commodore Business Machines
|
||||
|
||||
@ -41,7 +42,7 @@ CONFIGURE_ARGS+= --enable-fullscreen --enable-ipv6 \
|
||||
#CONFIGURE_ARGS+= --enable-parsid
|
||||
#CONFIGURE_ARGS+= --enable-memmap
|
||||
|
||||
MLINKS= vice.1 x64.1 \
|
||||
LMLINKS= vice.1 x64.1 \
|
||||
vice.1 x128.1 \
|
||||
vice.1 xvic.1 \
|
||||
vice.1 xpet.1 \
|
||||
@ -89,7 +90,7 @@ PULSE_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if !defined(BUILDING_INDEX)
|
||||
__pmlinks1!= ${ECHO_CMD} '${MLINKS:S/ / /}' | ${AWK} \
|
||||
__pmlinks1!= ${ECHO_CMD} '${LMLINKS:S/ / /}' | ${AWK} \
|
||||
'{ if (NF % 2 != 0) { print "broken"; exit; } \
|
||||
for (i=1; i<=NF; i++) { \
|
||||
if ( i % 2 == 0) { print " " $$i " ;"; } \
|
||||
@ -121,11 +122,6 @@ PLIST_SUB+= FCCACHE="@comment "
|
||||
PLIST_SUB+= NOFCCACHE=""
|
||||
.endif
|
||||
|
||||
# will be picked up by configure
|
||||
.if exists(${LOCALBASE}/include/ffmpeg/avformat.h)
|
||||
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MNLS}
|
||||
USES+= gettext
|
||||
CONFIGURE_ARGS+= --enable-nls --localedir=${LOCALBASE}/share/locale
|
||||
|
52
emulators/vice/files/patch-ffmpegdrv.c
Normal file
52
emulators/vice/files/patch-ffmpegdrv.c
Normal file
@ -0,0 +1,52 @@
|
||||
--- src/gfxoutputdrv/ffmpegdrv.c.orig 2012-02-13 20:31:44.000000000 +0100
|
||||
+++ src/gfxoutputdrv/ffmpegdrv.c 2012-11-25 13:10:46.712199998 +0100
|
||||
@@ -343,7 +343,7 @@ static int ffmpegmovie_init_audio(int sp
|
||||
c = st->codec;
|
||||
c->codec_id = ffmpegdrv_fmt->audio_codec;
|
||||
c->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
- c->sample_fmt = SAMPLE_FMT_S16;
|
||||
+ c->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
|
||||
/* put sample parameters */
|
||||
c->bit_rate = audio_bitrate;
|
||||
@@ -613,11 +613,6 @@ static int ffmpegdrv_init_file(void)
|
||||
if (!video_init_done || !audio_init_done)
|
||||
return 0;
|
||||
|
||||
- if ((*ffmpeglib.p_av_set_parameters)(ffmpegdrv_oc, NULL) < 0) {
|
||||
- log_debug("ffmpegdrv: Invalid output format parameters");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
(*ffmpeglib.p_dump_format)(ffmpegdrv_oc, 0, ffmpegdrv_oc->filename, 1);
|
||||
|
||||
if (video_st && (ffmpegdrv_open_video(ffmpegdrv_oc, video_st) < 0)) {
|
||||
@@ -632,8 +627,8 @@ static int ffmpegdrv_init_file(void)
|
||||
}
|
||||
|
||||
if (!(ffmpegdrv_fmt->flags & AVFMT_NOFILE)) {
|
||||
- if ((*ffmpeglib.p_url_fopen)(&ffmpegdrv_oc->pb, ffmpegdrv_oc->filename,
|
||||
- URL_WRONLY) < 0)
|
||||
+ if ((*ffmpeglib.p_avio_open)(&ffmpegdrv_oc->pb, ffmpegdrv_oc->filename,
|
||||
+ AVIO_FLAG_WRITE) < 0)
|
||||
{
|
||||
ui_error(translate_text(IDGS_FFMPEG_CANNOT_OPEN_S), ffmpegdrv_oc->filename);
|
||||
screenshot_stop_recording();
|
||||
@@ -642,7 +637,7 @@ static int ffmpegdrv_init_file(void)
|
||||
|
||||
}
|
||||
|
||||
- (*ffmpeglib.p_av_write_header)(ffmpegdrv_oc);
|
||||
+ (*ffmpeglib.p_avformat_write_header)(ffmpegdrv_oc, NULL);
|
||||
|
||||
log_debug("ffmpegdrv: Initialized file successfully");
|
||||
|
||||
@@ -724,7 +719,7 @@ static int ffmpegdrv_close(screenshot_t
|
||||
(*ffmpeglib.p_av_write_trailer)(ffmpegdrv_oc);
|
||||
if (!(ffmpegdrv_fmt->flags & AVFMT_NOFILE)) {
|
||||
/* close the output file */
|
||||
- (*ffmpeglib.p_url_fclose)(ffmpegdrv_oc->pb);
|
||||
+ (*ffmpeglib.p_avio_close)(ffmpegdrv_oc->pb);
|
||||
}
|
||||
}
|
||||
|
34
emulators/vice/files/patch-ffmpeglib.c
Normal file
34
emulators/vice/files/patch-ffmpeglib.c
Normal file
@ -0,0 +1,34 @@
|
||||
--- src/gfxoutputdrv/ffmpeglib.c.orig 2011-09-18 15:09:45.000000000 +0200
|
||||
+++ src/gfxoutputdrv/ffmpeglib.c 2012-11-25 13:11:58.342198505 +0100
|
||||
@@ -208,12 +208,11 @@ static int load_avformat(ffmpeglib_t *li
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(av_init_packet);
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(av_register_all);
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(av_new_stream);
|
||||
- GET_SYMBOL_AND_TEST_AVFORMAT(av_set_parameters);
|
||||
- GET_SYMBOL_AND_TEST_AVFORMAT(av_write_header);
|
||||
+ GET_SYMBOL_AND_TEST_AVFORMAT(avformat_write_header);
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(av_write_frame);
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(av_write_trailer);
|
||||
- GET_SYMBOL_AND_TEST_AVFORMAT(url_fopen);
|
||||
- GET_SYMBOL_AND_TEST_AVFORMAT(url_fclose);
|
||||
+ GET_SYMBOL_AND_TEST_AVFORMAT(avio_open);
|
||||
+ GET_SYMBOL_AND_TEST_AVFORMAT(avio_close);
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(dump_format);
|
||||
GET_SYMBOL_AND_TEST_AVFORMAT(av_guess_format);
|
||||
#ifndef HAVE_FFMPEG_SWSCALE
|
||||
@@ -240,12 +239,11 @@ static void free_avformat(ffmpeglib_t *l
|
||||
lib->p_av_init_packet = NULL;
|
||||
lib->p_av_register_all = NULL;
|
||||
lib->p_av_new_stream = NULL;
|
||||
- lib->p_av_set_parameters = NULL;
|
||||
- lib->p_av_write_header = NULL;
|
||||
+ lib->p_avformat_write_header = NULL;
|
||||
lib->p_av_write_frame = NULL;
|
||||
lib->p_av_write_trailer = NULL;
|
||||
- lib->p_url_fopen = NULL;
|
||||
- lib->p_url_fclose = NULL;
|
||||
+ lib->p_avio_open = NULL;
|
||||
+ lib->p_avio_close = NULL;
|
||||
lib->p_dump_format = NULL;
|
||||
lib->p_av_guess_format = NULL;
|
||||
#ifndef HAVE_FFMPEG_SWSCALE
|
43
emulators/vice/files/patch-ffmpeglib.h
Normal file
43
emulators/vice/files/patch-ffmpeglib.h
Normal file
@ -0,0 +1,43 @@
|
||||
--- src/gfxoutputdrv/ffmpeglib.h.orig 2011-10-24 21:06:48.000000000 +0200
|
||||
+++ src/gfxoutputdrv/ffmpeglib.h 2012-11-25 13:09:18.518868503 +0100
|
||||
@@ -70,7 +70,7 @@
|
||||
/* avcodec fucntions */
|
||||
typedef int (*avcodec_open_t) (AVCodecContext*, AVCodec*);
|
||||
typedef int (*avcodec_close_t) (AVCodecContext*);
|
||||
-typedef AVCodec* (*avcodec_find_encoder_t) (enum CodecID);
|
||||
+typedef AVCodec* (*avcodec_find_encoder_t) (enum AVCodecID);
|
||||
typedef int (*avcodec_encode_audio_t) (AVCodecContext*, uint8_t*, int, const short*);
|
||||
typedef int (*avcodec_encode_video_t) (AVCodecContext*, uint8_t*, int, const AVFrame*);
|
||||
typedef int (*avpicture_fill_t) (AVPicture*, uint8_t*, int, int, int);
|
||||
@@ -80,12 +80,11 @@ typedef int (*avpicture_get_size_t) (int
|
||||
typedef void (*av_init_packet_t) (AVPacket *pkt);
|
||||
typedef void (*av_register_all_t) (void);
|
||||
typedef AVStream* (*av_new_stream_t) (AVFormatContext*, int);
|
||||
-typedef int (*av_set_parameters_t) (AVFormatContext*, AVFormatParameters*);
|
||||
-typedef int (*av_write_header_t) (AVFormatContext*);
|
||||
+typedef int (*avformat_write_header_t) (AVFormatContext*, AVDictionary **);
|
||||
typedef int (*av_write_frame_t) (AVFormatContext*, AVPacket*);
|
||||
typedef int (*av_write_trailer_t) (AVFormatContext*);
|
||||
-typedef int (*url_fopen_t) (ByteIOContext**, const char*, int);
|
||||
-typedef int (*url_fclose_t) (ByteIOContext*);
|
||||
+typedef int (*avio_open_t) (AVIOContext**, const char*, int);
|
||||
+typedef int (*avio_close_t) (AVIOContext*);
|
||||
typedef void (*dump_format_t) (AVFormatContext *, int, const char*, int);
|
||||
typedef AVOutputFormat* (*av_guess_format_t) (const char*, const char*, const char*);
|
||||
typedef int (*img_convert_t) (AVPicture*, int, AVPicture*, int, int, int);
|
||||
@@ -118,12 +117,11 @@ struct ffmpeglib_s {
|
||||
av_init_packet_t p_av_init_packet;
|
||||
av_register_all_t p_av_register_all;
|
||||
av_new_stream_t p_av_new_stream;
|
||||
- av_set_parameters_t p_av_set_parameters;
|
||||
- av_write_header_t p_av_write_header;
|
||||
+ avformat_write_header_t p_avformat_write_header;
|
||||
av_write_frame_t p_av_write_frame;
|
||||
av_write_trailer_t p_av_write_trailer;
|
||||
- url_fopen_t p_url_fopen;
|
||||
- url_fclose_t p_url_fclose;
|
||||
+ avio_open_t p_avio_open;
|
||||
+ avio_close_t p_avio_close;
|
||||
dump_format_t p_dump_format;
|
||||
av_guess_format_t p_av_guess_format;
|
||||
#ifndef HAVE_FFMPEG_SWSCALE
|
Loading…
Reference in New Issue
Block a user