[packages/vice] - various build fixes (ffmpeg, giflib, perl syntax in texi2html script) - rel 5
baggins
baggins at pld-linux.org
Thu Oct 20 09:03:24 CEST 2016
commit 50f09ec288a53593d0584f27eea89648aa491c82
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Oct 20 09:02:45 2016 +0200
- various build fixes (ffmpeg, giflib, perl syntax in texi2html script)
- rel 5
ffmpeg3.patch | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
giflib5.patch | 20 ++++++++
perl.patch | 20 ++++++++
vice.spec | 8 ++-
4 files changed, 205 insertions(+), 1 deletion(-)
---
diff --git a/vice.spec b/vice.spec
index f685396..eee6988 100644
--- a/vice.spec
+++ b/vice.spec
@@ -9,7 +9,7 @@ Summary: Versatile Commodore Emulator
Summary(pl.UTF-8): Uniwersalny emulator Commodore
Name: vice
Version: 2.4
-Release: 4
+Release: 5
License: GPL v2+
Group: Applications/Emulators
Source0: http://www.zimmers.net/anonftp/pub/cbm/crossplatform/emulators/VICE/%{name}-%{version}.tar.gz
@@ -27,6 +27,9 @@ Patch3: %{name}-fonts.patch
Patch4: %{name}-link.patch
Patch5: %{name}-ffmpeg.patch
Patch6: texinfo.patch
+Patch7: ffmpeg3.patch
+Patch8: giflib5.patch
+Patch9: perl.patch
URL: http://www.viceteam.org/
BuildRequires: OpenGL-GLX-devel
BuildRequires: SDL-devel >= 1.2.0
@@ -84,6 +87,9 @@ pasował do tej linii), CBM-II (C610) oraz Plus4.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
%{__perl} -i -pe 's@\$\(VICEDIR\)/fonts@%{_fontsdir}/misc@' data/fonts/Makefile.am
%build
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..8b4aca4
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,158 @@
+--- vice-2.4/src/gfxoutputdrv/ffmpegdrv.c.orig 2016-10-20 08:39:01.494075298 +0200
++++ vice-2.4/src/gfxoutputdrv/ffmpegdrv.c 2016-10-20 08:39:21.217744132 +0200
+@@ -46,29 +46,29 @@
+ #include "../sounddrv/soundmovie.h"
+
+ static gfxoutputdrv_codec_t avi_audio_codeclist[] = {
+- { CODEC_ID_MP2, "MP2" },
+- { CODEC_ID_MP3, "MP3" },
+- { CODEC_ID_FLAC, "FLAC" },
+- { CODEC_ID_PCM_S16LE, "PCM uncompressed" },
++ { AV_CODEC_ID_MP2, "MP2" },
++ { AV_CODEC_ID_MP3, "MP3" },
++ { AV_CODEC_ID_FLAC, "FLAC" },
++ { AV_CODEC_ID_PCM_S16LE, "PCM uncompressed" },
+ { 0, NULL }
+ };
+
+ static gfxoutputdrv_codec_t avi_video_codeclist[] = {
+- { CODEC_ID_MPEG4, "MPEG4 (DivX)" },
+- { CODEC_ID_MPEG1VIDEO, "MPEG1" },
+- { CODEC_ID_FFV1, "FFV1 (lossless)" },
+- { CODEC_ID_H264, "H264" },
+- { CODEC_ID_THEORA, "Theora" },
++ { AV_CODEC_ID_MPEG4, "MPEG4 (DivX)" },
++ { AV_CODEC_ID_MPEG1VIDEO, "MPEG1" },
++ { AV_CODEC_ID_FFV1, "FFV1 (lossless)" },
++ { AV_CODEC_ID_H264, "H264" },
++ { AV_CODEC_ID_THEORA, "Theora" },
+ { 0, NULL }
+ };
+
+ static gfxoutputdrv_codec_t ogg_audio_codeclist[] = {
+- { CODEC_ID_FLAC, "FLAC" },
++ { AV_CODEC_ID_FLAC, "FLAC" },
+ { 0, NULL }
+ };
+
+ static gfxoutputdrv_codec_t ogg_video_codeclist[] = {
+- { CODEC_ID_THEORA, "Theora" },
++ { AV_CODEC_ID_THEORA, "Theora" },
+ { 0, NULL }
+ };
+
+@@ -201,9 +201,9 @@
+ { "FFMPEGVideoBitrate", VICE_FFMPEG_VIDEO_RATE_DEFAULT,
+ RES_EVENT_NO, NULL,
+ &video_bitrate, set_video_bitrate, NULL },
+- { "FFMPEGAudioCodec", CODEC_ID_MP3, RES_EVENT_NO, NULL,
++ { "FFMPEGAudioCodec", AV_CODEC_ID_MP3, RES_EVENT_NO, NULL,
+ &audio_codec, set_audio_codec, NULL },
+- { "FFMPEGVideoCodec", CODEC_ID_MPEG4, RES_EVENT_NO, NULL,
++ { "FFMPEGVideoCodec", AV_CODEC_ID_MPEG4, RES_EVENT_NO, NULL,
+ &video_codec, set_video_codec, NULL },
+ { "FFMPEGVideoHalveFramerate", 0, RES_EVENT_NO, NULL,
+ &video_halve_framerate, set_video_halve_framerate, NULL },
+@@ -278,10 +278,10 @@
+ if (c->frame_size <= 1) {
+ audio_inbuf_samples = audio_outbuf_size;
+ switch(st->codec->codec_id) {
+- case CODEC_ID_PCM_S16LE:
+- case CODEC_ID_PCM_S16BE:
+- case CODEC_ID_PCM_U16LE:
+- case CODEC_ID_PCM_U16BE:
++ case AV_CODEC_ID_PCM_S16LE:
++ case AV_CODEC_ID_PCM_S16BE:
++ case AV_CODEC_ID_PCM_U16LE:
++ case AV_CODEC_ID_PCM_U16BE:
+ audio_inbuf_samples >>= 1;
+ break;
+ default:
+@@ -326,7 +326,7 @@
+
+ audio_init_done = 1;
+
+- if (ffmpegdrv_fmt->audio_codec == CODEC_ID_NONE)
++ if (ffmpegdrv_fmt->audio_codec == AV_CODEC_ID_NONE)
+ return -1;
+
+ *audio_in = &ffmpegdrv_audio_in;
+@@ -496,8 +496,8 @@
+ picture is needed too. It is then converted to the required
+ output format */
+ tmp_picture = NULL;
+- if (c->pix_fmt != PIX_FMT_RGB24) {
+- tmp_picture = ffmpegdrv_alloc_picture(PIX_FMT_RGB24,
++ if (c->pix_fmt != AV_PIX_FMT_RGB24) {
++ tmp_picture = ffmpegdrv_alloc_picture(AV_PIX_FMT_RGB24,
+ c->width, c->height);
+ if (!tmp_picture) {
+ log_debug("ffmpegdrv: could not allocate temporary picture");
+@@ -548,7 +548,7 @@
+
+ video_init_done = 1;
+
+- if (ffmpegdrv_fmt->video_codec == CODEC_ID_NONE)
++ if (ffmpegdrv_fmt->video_codec == AV_CODEC_ID_NONE)
+ return;
+
+ st = (*ffmpeglib.p_av_new_stream)(ffmpegdrv_oc, 0);
+@@ -573,23 +573,23 @@
+ }
+ c->time_base.num = 1;
+ c->gop_size = 12; /* emit one intra frame every twelve frames at most */
+- c->pix_fmt = PIX_FMT_YUV420P;
++ c->pix_fmt = AV_PIX_FMT_YUV420P;
+
+ /* Avoid format conversion which would lead to loss of quality */
+- if (c->codec_id == CODEC_ID_FFV1) {
+- c->pix_fmt = PIX_FMT_RGB32;
++ if (c->codec_id == AV_CODEC_ID_FFV1) {
++ c->pix_fmt = AV_PIX_FMT_RGB32;
+ }
+
+ /* Use XVID instead of FMP4 FOURCC for better compatibility */
+- if (c->codec_id == CODEC_ID_MPEG4) {
++ if (c->codec_id == AV_CODEC_ID_MPEG4) {
+ c->codec_tag = MKTAG('X','V','I','D');
+ }
+
+ #ifdef HAVE_FFMPEG_SWSCALE
+ /* setup scaler */
+- if (c->pix_fmt != PIX_FMT_RGB24) {
++ if (c->pix_fmt != AV_PIX_FMT_RGB24) {
+ sws_ctx = (*ffmpeglib.p_sws_getContext)
+- (video_width, video_height, PIX_FMT_RGB24,
++ (video_width, video_height, AV_PIX_FMT_RGB24,
+ video_width, video_height, c->pix_fmt,
+ SWS_BICUBIC,
+ NULL, NULL, NULL);
+@@ -794,7 +794,7 @@
+
+ c = video_st->codec;
+
+- if (c->pix_fmt != PIX_FMT_RGB24) {
++ if (c->pix_fmt != AV_PIX_FMT_RGB24) {
+ ffmpegdrv_fill_rgb_image(screenshot, tmp_picture);
+ #ifdef HAVE_FFMPEG_SWSCALE
+ if (sws_ctx != NULL) {
+@@ -804,7 +804,7 @@
+ }
+ #else
+ (*ffmpeglib.p_img_convert)((AVPicture *)picture, c->pix_fmt,
+- (AVPicture *)tmp_picture, PIX_FMT_RGB24,
++ (AVPicture *)tmp_picture, AV_PIX_FMT_RGB24,
+ c->width, c->height);
+ #endif
+ } else {
+--- vice-2.4/src/gfxoutputdrv/ffmpeglib.h.orig 2016-10-20 08:42:01.130057414 +0200
++++ vice-2.4/src/gfxoutputdrv/ffmpeglib.h 2016-10-20 08:42:13.940218343 +0200
+@@ -95,7 +95,7 @@
+ #ifdef HAVE_FFMPEG_SWSCALE
+ /* swscale functions */
+ typedef struct SwsContext * (*sws_getContext_t)(int srcW, int srcH,
+- enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat,
++ enum AVPixelFormat srcFormat, int dstW, int dstH, enum AVPixelFormat dstFormat,
+ int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param);
+ typedef void (*sws_freeContext_t)(struct SwsContext *swsContext);
+ typedef int (*sws_scale_t)(struct SwsContext *context, uint8_t* srcSlice[],
diff --git a/giflib5.patch b/giflib5.patch
new file mode 100644
index 0000000..1358d95
--- /dev/null
+++ b/giflib5.patch
@@ -0,0 +1,20 @@
+--- vice-2.4/src/gfxoutputdrv/gifdrv.c~ 2012-07-26 01:46:05.000000000 +0200
++++ vice-2.4/src/gfxoutputdrv/gifdrv.c 2016-10-20 08:43:09.037546871 +0200
+@@ -114,7 +114,7 @@
+ if (EGifPutScreenDesc(sdata->fd, screenshot->width, screenshot->height, 8, 0, gif_colors) == GIF_ERROR ||
+ EGifPutImageDesc(sdata->fd, 0, 0, screenshot->width, screenshot->height, 0, NULL) == GIF_ERROR)
+ {
+- EGifCloseFile(sdata->fd);
++ EGifCloseFile(sdata->fd, NULL);
+ VICE_FreeMapObject(gif_colors);
+ lib_free(sdata->data);
+ lib_free(sdata->ext_filename);
+@@ -145,7 +145,7 @@
+
+ sdata = screenshot->gfxoutputdrv_data;
+
+- EGifCloseFile(sdata->fd);
++ EGifCloseFile(sdata->fd, NULL);
+ VICE_FreeMapObject(gif_colors);
+
+ /* for some reason giflib will create a file with unexpected
diff --git a/perl.patch b/perl.patch
new file mode 100644
index 0000000..6b9697f
--- /dev/null
+++ b/perl.patch
@@ -0,0 +1,20 @@
+--- vice-2.4/doc/html/texi2html~ 2008-03-30 17:04:15.000000000 +0200
++++ vice-2.4/doc/html/texi2html 2016-10-20 08:58:42.902422283 +0200
+@@ -1557,7 +1557,7 @@
+ $level--; # here we start at 0
+ if ($name =~ /^appendix/) {
+ # appendix style
+- if (defined(@appendix_sec_num)) {
++ if (@appendix_sec_num) {
+ &incr_sec_num($level, @appendix_sec_num);
+ } else {
+ @appendix_sec_num = ('A', 0, 0, 0);
+@@ -1565,7 +1565,7 @@
+ return(join('.', @appendix_sec_num[0..$level]));
+ } else {
+ # normal style
+- if (defined(@normal_sec_num)) {
++ if (@normal_sec_num) {
+ &incr_sec_num($level, @normal_sec_num);
+ } else {
+ @normal_sec_num = (1, 0, 0, 0);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vice.git/commitdiff/50f09ec288a53593d0584f27eea89648aa491c82
More information about the pld-cvs-commit
mailing list