Date: Sun, 15 Dec 2013 16:04:37 GMT From: Hardy Schumacher <hardy.schumacher@gmx.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/184779: [PATCH] emulators/kcemu (fix build issues) Message-ID: <201312151604.rBFG4brc082300@oldred.freebsd.org> Resent-Message-ID: <201312151610.rBFGA0ar044419@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184779 >Category: ports >Synopsis: [PATCH] emulators/kcemu (fix build issues) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 15 16:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Hardy Schumacher >Release: FreeBSD-9.2 >Organization: >Environment: FreeBSD gamma.low.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255996: Thu Oct 3 20:40:04 CEST 2013 root@gamma.low.org:/usr/obj/usr/src/sys/LOW_GAMMA i386 >Description: Port emulators/kcemu became broken after update of dependent ports. This PR is fixing the issues. >How-To-Repeat: Try to build/rebuild port emulators/kcemu on FreeBSD-9.x with current set of ports tree. >Fix: See attachment. Patch attached with submission follows: diff -ruN /usr/ports/emulators/kcemu/Makefile ./kcemu/Makefile --- /usr/ports/emulators/kcemu/Makefile 2013-11-08 21:34:59.000000000 +0100 +++ ./kcemu/Makefile 2013-12-15 14:24:30.000000000 +0100 @@ -3,7 +3,7 @@ PORTNAME= kcemu PORTVERSION= 0.5.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/KCemu/KCemu-${PORTVERSION} DISTNAME= KCemu-${PORTVERSION} @@ -13,7 +13,7 @@ BUILD_DEPENDS= pngtopnm:${PORTSDIR}/graphics/netpbm LIB_DEPENDS= libaudiofile.so:${PORTSDIR}/audio/libaudiofile \ - avformat.1:${PORTSDIR}/multimedia/ffmpeg \ + avformat:${PORTSDIR}/multimedia/ffmpeg \ dirac_encoder.1:${PORTSDIR}/multimedia/dirac \ schroedinger-1.0:${PORTSDIR}/multimedia/schroedinger \ sndfile.1:${PORTSDIR}/audio/libsndfile \ diff -ruN /usr/ports/emulators/kcemu/files/patch-include-ui-gtk-ffmpeg.h ./kcemu/files/patch-include-ui-gtk-ffmpeg.h --- /usr/ports/emulators/kcemu/files/patch-include-ui-gtk-ffmpeg.h 1970-01-01 01:00:00.000000000 +0100 +++ ./kcemu/files/patch-include-ui-gtk-ffmpeg.h 2013-12-15 16:46:26.000000000 +0100 @@ -0,0 +1,12 @@ +--- include/ui/gtk/ffmpeg.h.orig 2010-03-07 20:50:22.000000000 +0100 ++++ include/ui/gtk/ffmpeg.h 2013-12-15 16:45:59.000000000 +0100 +@@ -28,7 +28,9 @@ + extern "C" + { + #define __STDC_CONSTANT_MACROS ++#include <libavcodec/avcodec.h> + #include <libavformat/avformat.h> ++#include <libavformat/avio.h> + } + + #include "kc/system.h" diff -ruN /usr/ports/emulators/kcemu/files/patch-src-libdisk-load_22dsk.c ./kcemu/files/patch-src-libdisk-load_22dsk.c --- /usr/ports/emulators/kcemu/files/patch-src-libdisk-load_22dsk.c 1970-01-01 01:00:00.000000000 +0100 +++ ./kcemu/files/patch-src-libdisk-load_22dsk.c 2013-12-15 14:43:41.000000000 +0100 @@ -0,0 +1,11 @@ +--- src/libdisk/load_22dsk.c.orig 2010-03-07 20:50:22.000000000 +0100 ++++ src/libdisk/load_22dsk.c 2013-12-15 14:43:31.000000000 +0100 +@@ -81,7 +81,7 @@ + + typedef struct { + FILE *f; +- gzFile *gzf; ++ gzFile gzf; + int read_only; + int len; + struct { diff -ruN /usr/ports/emulators/kcemu/files/patch-src-ui-gtk-ffmpeg.cc ./kcemu/files/patch-src-ui-gtk-ffmpeg.cc --- /usr/ports/emulators/kcemu/files/patch-src-ui-gtk-ffmpeg.cc 1970-01-01 01:00:00.000000000 +0100 +++ ./kcemu/files/patch-src-ui-gtk-ffmpeg.cc 2013-12-15 16:54:28.000000000 +0100 @@ -0,0 +1,78 @@ +--- src/ui/gtk/ffmpeg.cc.orig 2010-03-07 20:50:23.000000000 +0100 ++++ src/ui/gtk/ffmpeg.cc 2013-12-15 16:54:09.000000000 +0100 +@@ -48,7 +48,7 @@ + + av_register_all(); + +- AVOutputFormat *fmt = guess_format("avi", NULL, "video/x-msvideo"); ++ AVOutputFormat *fmt = av_guess_format("avi", NULL, "video/x-msvideo"); + if (fmt == NULL) + return false; + +@@ -66,7 +66,7 @@ + return false; + } + _stream->codec->codec_id = fmt->video_codec; +- _stream->codec->codec_type = CODEC_TYPE_VIDEO; ++ _stream->codec->codec_type = AVMEDIA_TYPE_VIDEO; + _stream->codec->codec_tag = MKTAG('D', 'X', '5', '0'); + + _stream->codec->bit_rate = 79000 + 1000 * pow(1.4, quality * 20.0); +@@ -81,14 +81,8 @@ + if (_context->oformat->flags & AVFMT_GLOBALHEADER) + _stream->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; + +- if (av_set_parameters(_context, NULL) < 0) +- { +- close(); +- return false; +- } +- + AVCodec *codec = avcodec_find_encoder(_stream->codec->codec_id); +- if (avcodec_open(_stream->codec, codec) < 0) ++ if (avcodec_open2(_stream->codec, codec, NULL) < 0) + { + close(); + return false; +@@ -119,14 +113,14 @@ + + avpicture_fill((AVPicture *) _frame, buf, _stream->codec->pix_fmt, width, height); + +- if (url_fopen(&_context->pb, filename, URL_WRONLY) < 0) ++ if (avio_open(&_context->pb, filename, AVIO_FLAG_WRITE) < 0) + { + close(); + return false; + } + + //dump_format(_context, 0, filename, 1); +- av_write_header(_context); ++ avformat_write_header(_context, NULL); + return true; + } + +@@ -171,7 +165,7 @@ + if (_stream->codec->coded_frame->pts != AV_NOPTS_VALUE) + pkt.pts = av_rescale_q(_stream->codec->coded_frame->pts, _stream->codec->time_base, _stream->time_base); + if (_stream->codec->coded_frame->key_frame) +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + pkt.stream_index = _stream->index; + pkt.data = _buf; + pkt.size = out_size; +@@ -197,7 +191,7 @@ + av_freep(&_context->streams[i]->codec); + av_freep(&_context->streams[i]); + } +- url_fclose(_context->pb); ++ avio_close(_context->pb); + + av_free(_context); + +@@ -207,4 +201,4 @@ + _buf = NULL; + } + +-#endif /* HAVE_LIBAVFORMAT */ +\ No newline at end of file ++#endif /* HAVE_LIBAVFORMAT */ diff -ruN /usr/ports/emulators/kcemu/files/patch-src-ui-gtk-plotter.cc ./kcemu/files/patch-src-ui-gtk-plotter.cc --- /usr/ports/emulators/kcemu/files/patch-src-ui-gtk-plotter.cc 1970-01-01 01:00:00.000000000 +0100 +++ ./kcemu/files/patch-src-ui-gtk-plotter.cc 2013-12-15 14:51:42.000000000 +0100 @@ -0,0 +1,12 @@ +--- src/ui/gtk/plotter.cc.orig 2010-03-07 20:50:22.000000000 +0100 ++++ src/ui/gtk/plotter.cc 2013-12-15 14:50:48.000000000 +0100 +@@ -18,8 +18,7 @@ + */ + + #include <cairo/cairo.h> +-#include <glib-2.0/glib/gmain.h> +-#include <gtk-2.0/gtk/gtkspinbutton.h> ++#include <glib.h> + + #include "kc/kc.h" + #include "kc/system.h" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312151604.rBFG4brc082300>