[packages/grass] - updated to 6.4.5 - updated ffmpeg,ac patches (the first one also covers update for ffmpeg 3.0.x) -

qboosh qboosh at pld-linux.org
Sun Apr 3 09:03:47 CEST 2016


commit 4e71841441e96b77c1f2c0802453960cab930229
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 3 09:03:41 2016 +0200

    - updated to 6.4.5
    - updated ffmpeg,ac patches (the first one also covers update for ffmpeg 3.0.x)
    - added ctypesgen patch (make internal ctypesgen more resistant to unparseable defines)

 grass-ac.patch        |  11 -----
 grass-ctypesgen.patch |  11 +++++
 grass-ffmpeg.patch    | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++
 grass.spec            |   8 ++--
 4 files changed, 131 insertions(+), 14 deletions(-)
---
diff --git a/grass.spec b/grass.spec
index 76781e3..8fb874a 100644
--- a/grass.spec
+++ b/grass.spec
@@ -13,18 +13,19 @@
 Summary:	The Geographic Resources Analysis Support System
 Summary(pl.UTF-8):	System obsługujący analizę zasobów geograficznych
 Name:		grass
-Version:	6.4.4
-Release:	4
+Version:	6.4.5
+Release:	1
 Epoch:		1
 License:	GPL v2+
 Group:		X11/Applications
 Source0:	http://grass.osgeo.org/grass64/source/%{name}-%{version}.tar.gz
-# Source0-md5:	4b3e0caaeb1567e15c78b523e3674170
+# Source0-md5:	c58ab8db635ebd06cfd93dce7b70b6cb
 Patch0:		%{name}-soname.patch
 Patch1:		ncurses.patch
 Patch2:		%{name}-ffmpeg.patch
 Patch3:		%{name}-ac.patch
 Patch4:		%{name}-format.patch
+Patch5:		%{name}-ctypesgen.patch
 URL:		http://grass.osgeo.org/
 %{?with_tcl:BuildRequires:	OpenGL-GLU-devel}
 %{?with_glw:BuildRequires:	OpenGL-GLw-devel}
@@ -163,6 +164,7 @@ Pliki nagłówkowe i biblioteki statyczne systemu GRASS.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 cp -f lib/external/bwidget/CHANGES.txt bwidget.CHANGES.TXT
 cp -f lib/external/bwidget/README.grass bwidget.README.grass
diff --git a/grass-ac.patch b/grass-ac.patch
index a429871..7985b8e 100644
--- a/grass-ac.patch
+++ b/grass-ac.patch
@@ -131,17 +131,6 @@
  SCRIPT_ACTIONS += create.bat
  endif
  
---- grass-6.4.2/raster/Makefile.orig	2011-04-22 16:09:26.000000000 +0200
-+++ grass-6.4.2/raster/Makefile	2012-10-20 14:40:31.790262831 +0200
-@@ -129,7 +129,7 @@
- 
- include $(MODULE_TOPDIR)/include/Make/Platform.make
- 
--ifndef MINGW
-+ifneq ($(MINGW),yes)
-     SUBDIRS += r.li
- endif
- 
 --- grass-6.4.2/vector/v.transform/Makefile.orig	2008-12-19 21:28:57.000000000 +0100
 +++ grass-6.4.2/vector/v.transform/Makefile	2012-10-20 14:40:59.673594995 +0200
 @@ -5,7 +5,7 @@
diff --git a/grass-ctypesgen.patch b/grass-ctypesgen.patch
new file mode 100644
index 0000000..45832f5
--- /dev/null
+++ b/grass-ctypesgen.patch
@@ -0,0 +1,11 @@
+--- grass-6.4.5/lib/python/ctypes/ctypesgencore/parser/cgrammar.py.orig	2016-04-02 20:36:44.203067400 +0200
++++ grass-6.4.5/lib/python/ctypes/ctypesgencore/parser/cgrammar.py	2016-04-02 09:42:23.508048350 +0200
+@@ -1080,7 +1080,7 @@
+         p[0] = p[1]
+ 
+ def p_error(t):
+-    if t.lexer.in_define:
++    if t.lexer.in_define or t.type == 'PP_END_DEFINE':
+         # p_define_error will generate an error message.
+         pass
+     else:
diff --git a/grass-ffmpeg.patch b/grass-ffmpeg.patch
index 4b80df7..59a2742 100644
--- a/grass-ffmpeg.patch
+++ b/grass-ffmpeg.patch
@@ -9,3 +9,118 @@
  #endif
  
  /* 5 seconds stream duration */
+@@ -38,7 +38,7 @@
+ #define STREAM_DURATION   5.0
+ #define STREAM_FRAME_RATE 25	/* 25 images/s */
+ #define STREAM_NB_FRAMES  ((int)(STREAM_DURATION * STREAM_FRAME_RATE))
+-#define STREAM_PIX_FMT PIX_FMT_YUV420P	/* default pix_fmt */
++#define STREAM_PIX_FMT AV_PIX_FMT_YUV420P	/* default pix_fmt */
+ 
+ AVFrame *picture, *tmp_picture;
+ uint8_t *video_outbuf;
+@@ -95,11 +95,11 @@
+     c->time_base.num = 1;
+     c->gop_size = 12;		/* emit one intra frame every twelve frames at most */
+     c->pix_fmt = STREAM_PIX_FMT;
+-    if (c->codec_id == CODEC_ID_MPEG2VIDEO) {
++    if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
+ 	/* just for testing, we also add B frames */
+ 	c->max_b_frames = 2;
+     }
+-    if (c->codec_id == CODEC_ID_MPEG1VIDEO) {
++    if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
+ 	/* Needed to avoid using macroblocks in which some coeffs overflow.
+ 	   This does not happen with normal video, it just happens here as
+ 	   the motion of the chroma plane does not match the luma plane. */
+@@ -138,7 +138,7 @@
+     uint8_t *picture_buf;
+     int size;
+ 
+-    picture = avcodec_alloc_frame();
++    picture = av_frame_alloc();
+ 
+     if (!picture)
+ 	return NULL;
+@@ -147,7 +147,7 @@
+     picture_buf = av_malloc(size);
+ 
+     if (!picture_buf) {
+-	av_free(picture);
++	av_frame_free(&picture);
+ 	return NULL;
+     }
+ 
+@@ -210,8 +210,8 @@
+        picture is needed too. It is then converted to the required
+        output format */
+     tmp_picture = NULL;
+-    if (c->pix_fmt != PIX_FMT_YUV420P) {
+-	tmp_picture = alloc_picture(PIX_FMT_YUV420P, c->width, c->height);
++    if (c->pix_fmt != AV_PIX_FMT_YUV420P) {
++	tmp_picture = alloc_picture(AV_PIX_FMT_YUV420P, c->width, c->height);
+ 	if (!tmp_picture) {
+ 	    G_warning(_("Unable to allocate temporary picture"));
+ 	    return;
+@@ -250,27 +250,20 @@
+ 	ret = av_write_frame(oc, &pkt);
+     }
+     else {
++	AVPacket pkt;
++	int got_packet;
++	av_init_packet(&pkt);
++	pkt.data = video_outbuf;
++	pkt.size = video_outbuf_size;
+ 	/* encode the image */
+-	out_size =
+-	    avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
++	ret = avcodec_encode_video2(c, &pkt, picture, &got_packet);
+ 	/* if zero size, it means the image was buffered */
+-	if (out_size > 0) {
+-	    AVPacket pkt;
+-
+-	    av_init_packet(&pkt);
++	if ((ret >= 0) && got_packet) {
+ 
+ 	    pkt.pts =
+-		av_rescale_q(c->coded_frame->pts, c->time_base,
++		av_rescale_q(pkt.pts, c->time_base,
+ 			     st->time_base);
+-	    if (c->coded_frame->key_frame)
+-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 32, 0)
+-		pkt.flags |= PKT_FLAG_KEY;
+-#else
+-		pkt.flags |= AV_PKT_FLAG_KEY;
+-#endif
+ 	    pkt.stream_index = st->index;
+-	    pkt.data = video_outbuf;
+-	    pkt.size = out_size;
+ 
+ 	    /* write the compressed frame in the media file */
+ 	    ret = av_write_frame(oc, &pkt);
+@@ -296,10 +289,10 @@
+ {
+     avcodec_close(st->codec);
+     av_free(picture->data[0]);
+-    av_free(picture);
++    av_frame_free(&picture);
+     if (tmp_picture) {
+ 	av_free(tmp_picture->data[0]);
+-	av_free(tmp_picture);
++	av_frame_free(&tmp_picture);
+     }
+     av_free(video_outbuf);
+ }
+@@ -362,11 +362,11 @@
+     /* if you want to hardcode the codec (eg #ifdef USE_XVID)
+        this may be the place to do it (?????) */
+ #ifdef USE_XVID
+-    fmt->video_codec = CODEC_ID_XVID;
++    fmt->video_codec = AV_CODEC_ID_XVID;
+ #endif
+ 
+     video_st = NULL;
+-    if (fmt->video_codec != CODEC_ID_NONE) {
++    if (fmt->video_codec != AV_CODEC_ID_NONE) {
+ 	video_st =
+ 	    add_video_stream(oc, fmt->video_codec, (r - l + 1), (t - b + 1));
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/grass.git/commitdiff/4e71841441e96b77c1f2c0802453960cab930229



More information about the pld-cvs-commit mailing list