[84289] trunk/dports/graphics/gegl

devans at macports.org devans at macports.org
Wed Sep 21 13:56:27 PDT 2011


Revision: 84289
          http://trac.macports.org/changeset/84289
Author:   devans at macports.org
Date:     2011-09-21 13:56:26 -0700 (Wed, 21 Sep 2011)
Log Message:
-----------
gegl: patch to build with either ffmpeg or ffmpeg-devel, see #31336.

Modified Paths:
--------------
    trunk/dports/graphics/gegl/Portfile

Added Paths:
-----------
    trunk/dports/graphics/gegl/files/patch-configure.ac.diff
    trunk/dports/graphics/gegl/files/patch-operations-external-ff-load.c.diff

Modified: trunk/dports/graphics/gegl/Portfile
===================================================================
--- trunk/dports/graphics/gegl/Portfile	2011-09-21 20:49:22 UTC (rev 84288)
+++ trunk/dports/graphics/gegl/Portfile	2011-09-21 20:56:26 UTC (rev 84289)
@@ -5,6 +5,7 @@
 
 name            gegl
 version         0.1.6
+revision        1
 set branch      [join [lrange [split ${version} .] 0 1] .]
 categories      graphics
 maintainers     devans
@@ -43,6 +44,12 @@
     path:lib/libavcodec.dylib:ffmpeg \
     port:libspiro
 
+patchfiles      patch-configure.ac.diff \
+                patch-operations-external-ff-load.c.diff
+
+use_autoreconf  yes
+autoreconf.args -fvi
+
 configure.args  --disable-docs
 
 platform darwin {

Added: trunk/dports/graphics/gegl/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/graphics/gegl/files/patch-configure.ac.diff	                        (rev 0)
+++ trunk/dports/graphics/gegl/files/patch-configure.ac.diff	2011-09-21 20:56:26 UTC (rev 84289)
@@ -0,0 +1,12 @@
+--- configure.ac.orig	2011-02-13 09:54:23.000000000 -0800
++++ configure.ac	2011-09-21 11:55:42.000000000 -0700
+@@ -852,6 +852,9 @@
+   PKG_CHECK_MODULES(AVFORMAT, libavformat libavcodec,
+     have_libavformat="yes",
+     have_libavformat="no  (libavformat not found)")
++  PKG_CHECK_EXISTS(libavformat >= 53.0.0,
++    AC_DEFINE(HAVE_LIBAVFORMAT_53, 1,
++          [define to 1 if libavformat version >= 53.0.0]),)
+   # verify the presence of the avformat.h header
+   if test "x$have_libavformat" = "xyes"; then
+     gegl_save_CPPFLAGS=$CPPFLAGS

Added: trunk/dports/graphics/gegl/files/patch-operations-external-ff-load.c.diff
===================================================================
--- trunk/dports/graphics/gegl/files/patch-operations-external-ff-load.c.diff	                        (rev 0)
+++ trunk/dports/graphics/gegl/files/patch-operations-external-ff-load.c.diff	2011-09-21 20:56:26 UTC (rev 84289)
@@ -0,0 +1,42 @@
+--- operations/external/ff-load.c.orig	2011-09-21 12:11:08.000000000 -0700
++++ operations/external/ff-load.c	2011-09-21 12:20:20.000000000 -0700
+@@ -69,7 +69,11 @@
+ {
+   switch (err)
+     {
+-    case AVERROR_NUMEXPECTED:
++#ifdef HAVE_LIBAVFORMAT_53
++      case AVERROR(EINVAL):
++#else
++      case AVERROR_NUMEXPECTED:
++#endif
+       g_warning ("%s: Incorrect image filename syntax.\n"
+                  "Use '%%d' to specify the image number:\n"
+                  "  for img1.jpg, img2.jpg, ..., use 'img%%d.jpg';\n"
+@@ -77,10 +81,14 @@
+                  filename);
+       break;
+     case AVERROR_INVALIDDATA:
++#ifdef HAVE_LIBAVFORMAT_53
++      g_warning ("%s: Error while parsing header or unknown format\n", filename);
++#else
+       g_warning ("%s: Error while parsing header\n", filename);
+       break;
+     case AVERROR_NOFMT:
+       g_warning ("%s: Unknown format\n", filename);
++#endif
+       break;
+     default:
+       g_warning ("%s: Error while opening file\n", filename);
+@@ -278,7 +286,11 @@
+       for (i = 0; i< p->ic->nb_streams; i++)
+         {
+           AVCodecContext *c = p->ic->streams[i]->codec;
++#ifdef HAVE_LIBAVFORMAT_53
++          if (c->codec_type == AVMEDIA_TYPE_VIDEO)
++#else
+           if (c->codec_type == CODEC_TYPE_VIDEO)
++#endif
+             {
+               p->video_st = p->ic->streams[i];
+               p->video_stream = i;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110921/3647d351/attachment-0001.html>


More information about the macports-changes mailing list