[111823] trunk/dports/multimedia/gpac
devans at macports.org
devans at macports.org
Wed Oct 2 15:49:39 PDT 2013
Revision: 111823
https://trac.macports.org/changeset/111823
Author: devans at macports.org
Date: 2013-10-02 15:49:39 -0700 (Wed, 02 Oct 2013)
Log Message:
-----------
gpac: backport fixes for current ffmpeg from upstream, missing dependencies, configuration, closes #40555, #40581.
Modified Paths:
--------------
trunk/dports/multimedia/gpac/Portfile
Added Paths:
-----------
trunk/dports/multimedia/gpac/files/
trunk/dports/multimedia/gpac/files/patch-configure.diff
trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff
Modified: trunk/dports/multimedia/gpac/Portfile
===================================================================
--- trunk/dports/multimedia/gpac/Portfile 2013-10-02 21:12:23 UTC (rev 111822)
+++ trunk/dports/multimedia/gpac/Portfile 2013-10-02 22:49:39 UTC (rev 111823)
@@ -5,7 +5,7 @@
name gpac
version 0.5.0
-revision 2
+revision 3
categories multimedia
platforms darwin
maintainers nomaintainer
@@ -27,7 +27,8 @@
checksums rmd160 106f589a52f147bd8f00ffced2b252f81ed3f053 \
sha256 5e067850618783d3ba4d9035bcea6727855f3a87a007960ab1f0f980a552f3cb
-depends_build port:zlib
+depends_build port:pkgconfig \
+ port:zlib
depends_lib port:a52dec \
port:faad2 \
@@ -41,8 +42,10 @@
port:libvorbis \
port:openjpeg \
port:openssl \
- port:spidermonkey \
- port:xvid
+ port:jack \
+ port:xvid \
+ port:mesa \
+ port:xorg-libXv
worksrcdir ${name}
@@ -50,17 +53,30 @@
file attributes ${worksrcpath}/configure -permissions a+x
}
+patchfiles patch-configure.diff \
+ patch-ffmpeg-2.0.diff
+
# This project's build system misuses the prefix "cpp" to refer to the C++ compiler instead of the C preprocessor.
# https://sourceforge.net/p/gpac/bugs/287/
# Unfortunately setting cc and cpp doesn't actually do anything.
# https://sourceforge.net/p/gpac/bugs/286/
+
+# external spidermonkey (--use-js=no) is not recognized because it doesn't provide a pkg-config file and build fails with local copy
+# pulseaudio is recognized if installed but build fails
+
configure.args --cc="${configure.cc}" \
--cpp="${configure.cxx}" \
--extra-cflags="${configure.cc_archflags}" \
--extra-ldflags="${configure.ld_archflags}" \
--mandir=${prefix}/share/man \
- --X11-path=${prefix}
+ --X11-path=${prefix} \
+ --disable-pulseaudio \
+ --use-js=no
+# use the RightCompiler
+
+build.args-append CC="${configure.cc}"
+
# This project's build system detects CPU and endianness at configure time.
# muniversal is worth a try.
universal_variant no
Added: trunk/dports/multimedia/gpac/files/patch-configure.diff
===================================================================
--- trunk/dports/multimedia/gpac/files/patch-configure.diff (rev 0)
+++ trunk/dports/multimedia/gpac/files/patch-configure.diff 2013-10-02 22:49:39 UTC (rev 111823)
@@ -0,0 +1,20 @@
+--- configure.orig 2013-10-02 14:43:27.000000000 -0700
++++ configure 2013-10-02 14:44:22.000000000 -0700
+@@ -1589,7 +1589,7 @@
+ ;;
+ --enable-amr-nb-fixed) has_amr_nb_fixed="yes"
+ ;;
+- --disable-pulseaudio=*) has_pulseaudio="no"
++ --disable-pulseaudio) has_pulseaudio="no"
+ ;;
+ --enable-amr-nb) has_amr_nb="yes"
+ ;;
+@@ -1599,7 +1599,7 @@
+ ;;
+ --disable-oggvorbis) has_oggvorbis="no"
+ ;;
+- --disable-jack=*) has_jack="no"
++ --disable-jack) has_jack="no"
+ ;;
+ --disable-alsa) has_alsa="no"
+ ;;
Added: trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff
===================================================================
--- trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff (rev 0)
+++ trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff 2013-10-02 22:49:39 UTC (rev 111823)
@@ -0,0 +1,110 @@
+--- modules/ffmpeg_in/ffmpeg_in.h.orig 2012-05-24 14:45:44.000000000 -0700
++++ modules/ffmpeg_in/ffmpeg_in.h 2013-10-02 13:25:27.000000000 -0700
+@@ -117,7 +117,7 @@
+
+ /*for audio packed frames*/
+ u32 frame_start;
+- char audio_buf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
++ char audio_buf[19200];
+ Bool check_h264_isma;
+
+ u32 base_ES_ID;
+--- modules/ffmpeg_in/ffmpeg_decode.c.orig 2012-02-29 18:24:26.000000000 -0800
++++ modules/ffmpeg_in/ffmpeg_decode.c 2013-10-02 14:10:13.000000000 -0700
+@@ -38,6 +38,11 @@
+ #endif
+
+
++#if (LIBAVCODEC_VERSION_MAJOR >= 55)
++#define USE_AVCTX3
++#elif (LIBAVCODEC_VERSION_MAJOR >= 54) && (LIBAVCODEC_VERSION_MINOR >= 35)
++#define USE_AVCTX3
++#endif
+
+ /**
+ * Allocates data for FFMPEG decoding
+@@ -169,8 +174,12 @@
+ frame = &ffd->base_frame;
+ }
+ if (!(*ctx)){
+- *ctx = avcodec_alloc_context();
+- }
++#ifdef USE_AVCTX3
++ *ctx = avcodec_alloc_context3(NULL);
++#else
++ *ctx = avcodec_alloc_context();
++#endif
++ }
+
+ /*private FFMPEG DSI*/
+ if (ffd->oti == GPAC_OTI_MEDIA_FFMPEG) {
+@@ -317,7 +326,13 @@
+ (*ctx)->pix_fmt = ffd->raw_pix_fmt;
+ if ((*ctx)->extradata && strstr((*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
+ } else {
+- if (avcodec_open((*ctx), (*codec) )<0) return GF_NON_COMPLIANT_BITSTREAM;
++
++#ifdef USE_AVCTX3
++ if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
++#else
++ if (! (*codec) || (avcodec_open(ctx, *codec)<0)) return GF_NON_COMPLIANT_BITSTREAM;
++#endif
++
+ }
+
+ /*setup audio streams*/
+@@ -611,10 +626,11 @@
+ if (ffd->frame_start>inBufferLength) ffd->frame_start = 0;
+
+ redecode:
+- gotpic = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+ #ifdef USE_AVCODEC2
++ gotpic = 0;
+ len = avcodec_decode_audio3(ctx, (short *)ffd->audio_buf, &gotpic, &pkt);
+ #else
++ gotpic = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+ len = avcodec_decode_audio2(ctx, (short *)ffd->audio_buf, &gotpic, inBuffer + ffd->frame_start, inBufferLength - ffd->frame_start);
+ #endif
+ if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; }
+@@ -749,7 +765,12 @@
+ here this means the DSI was broken, so no big deal*/
+ avcodec_close(ctx);
+ *codec = avcodec_find_decoder(CODEC_ID_H263);
++#ifdef USE_AVCTX3
++ if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
++#else
+ if (! (*codec) || (avcodec_open(ctx, *codec)<0)) return GF_NON_COMPLIANT_BITSTREAM;
++#endif
++
+ #if USE_AVCODEC2
+ if (avcodec_decode_video2(ctx, frame, &gotpic, &pkt) < 0) {
+ #else
+@@ -759,7 +780,11 @@
+ avcodec_close(ctx);
+ *codec = avcodec_find_decoder(old_codec);
+ assert(*codec);
++#ifdef USE_AVCTX3
++ avcodec_open2(ctx, *codec, NULL);
++#else
+ avcodec_open(ctx, *codec);
++#endif
+ return GF_NON_COMPLIANT_BITSTREAM;
+ }
+ }
+--- modules/ffmpeg_in/ffmpeg_demux.c.orig 2012-04-04 14:57:38.000000000 -0700
++++ modules/ffmpeg_in/ffmpeg_demux.c 2013-10-02 14:15:21.000000000 -0700
+@@ -52,6 +52,14 @@
+ #define AVERROR_NOFMT AVERROR(EINVAL)
+ #endif /* AVERROR_NOFMT */
+
++#if (LIBAVFORMAT_VERSION_MAJOR >= 54) && (LIBAVFORMAT_VERSION_MINOR >= 20)
++#define av_find_stream_info(__c) avformat_find_stream_info(__c, NULL)
++#define FF_API_FORMAT_PARAMETERS 1
++#endif
++
++
++
++
+ static u32 FFDemux_Run(void *par)
+ {
+ AVPacket pkt;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131002/1b55f41c/attachment.html>
More information about the macports-changes
mailing list