diff --git a/graphics/php5-ffmpeg/Makefile b/graphics/php5-ffmpeg/Makefile index 2e5a33a89eba..47a1d9327dfe 100644 --- a/graphics/php5-ffmpeg/Makefile +++ b/graphics/php5-ffmpeg/Makefile @@ -2,51 +2,24 @@ # $FreeBSD$ PORTNAME= ffmpeg -PORTVERSION= 0.6.0 -PORTREVISION= 9 +PORTVERSION= 0.6.0.20120114 CATEGORIES= graphics -MASTER_SITES= SF/${PORTNAME}-php/${PORTNAME}-php/${PORTVERSION} +MASTER_SITES= LOCAL/sunpoet PKGNAMEPREFIX= php5- DISTNAME= ${PORTNAME}-php-${PORTVERSION} -EXTRACT_SUFX= .tbz2 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= sunpoet@FreeBSD.org COMMENT= The ffmpeg shared extension for php +LICENSE= GPLv2 + LIB_DEPENDS= libgd.so:${PORTSDIR}/graphics/gd \ - libavutil0.so:${PORTSDIR}/multimedia/ffmpeg0 + libavutil.so:${PORTSDIR}/multimedia/ffmpeg -CFLAGS+= -I${LOCALBASE}/include/ffmpeg0 -LDFLAGS+= -L${LOCALBASE}/lib/ffmpeg0 -USE_BZIP2= yes +CFLAGS+= -I${LOCALBASE}/include USE_PHP= yes -USE_PHPIZE= yes USE_PHPEXT= yes - -CONFIGURE_ARGS+= --with-ffmpeg=${LOCALBASE}/include/ffmpeg0 - -NO_STAGE= yes -post-patch: - @${REINPLACE_CMD} -e 's|==|=|g' ${WRKSRC}/config.m4 - @${REINPLACE_CMD} \ - -e 's,,,g' \ - -e 's,,,g' \ - -e 's,,,g' \ - ${WRKSRC}/*.c \ - ${WRKSRC}/*.h - -pre-configure: - @${REINPLACE_CMD} \ - -e 's,lavcodec,lavcodec0,g' \ - -e 's,lavformat,lavformat0,g' \ - -e 's,lavutil,lavutil0,g' \ - -e 's,lswscale,lswscale0,g' \ - -e 's,include/libavcodec,include/ffmpeg0/libavcodec,g' \ - -e 's,/libavcodec.so,/ffmpeg0/libavcodec0.so,g' \ - ${WRKSRC}/configure - -post-configure: - @${REINPLACE_CMD} -e 's,include/ffmpeg$$,include/ffmpeg0,g' \ - ${WRKSRC}/Makefile +USE_PHPIZE= yes +USES= tar:xz .include diff --git a/graphics/php5-ffmpeg/distinfo b/graphics/php5-ffmpeg/distinfo index 7359da6b9dca..bbd72ff92021 100644 --- a/graphics/php5-ffmpeg/distinfo +++ b/graphics/php5-ffmpeg/distinfo @@ -1,2 +1,2 @@ -SHA256 (ffmpeg-php-0.6.0.tbz2) = ec8a9847e0f4d5101a5afedb7dac318e9a13f099865215ae99d08d56add9b141 -SIZE (ffmpeg-php-0.6.0.tbz2) = 275557 +SHA256 (ffmpeg-php-0.6.0.20120114.tar.xz) = 0434e3e4251a112fe0ba945a9ad27ebb5cb093913e7f7dda570d5769fc7d79f5 +SIZE (ffmpeg-php-0.6.0.20120114.tar.xz) = 280244 diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c b/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c deleted file mode 100644 index 9c783972acd2..000000000000 --- a/graphics/php5-ffmpeg/files/patch-ffmpeg_frame.c +++ /dev/null @@ -1,29 +0,0 @@ ---- ffmpeg_frame.c.orig 2010-07-21 10:31:08.581341617 +0200 -+++ ffmpeg_frame.c 2010-07-21 10:31:21.405528178 +0200 -@@ -333,7 +333,7 @@ - - GET_FRAME_RESOURCE(getThis(), ff_frame); - -- _php_convert_frame(ff_frame, PIX_FMT_RGBA32); -+ _php_convert_frame(ff_frame, PIX_FMT_RGB32); - - return_value->value.lval = _php_get_gd_image(ff_frame->width, - ff_frame->height); -@@ -418,7 +418,7 @@ - - /* create a an av_frame and allocate space for it */ - frame = avcodec_alloc_frame(); -- avpicture_alloc((AVPicture*)frame, PIX_FMT_RGBA32, width, height); -+ avpicture_alloc((AVPicture*)frame, PIX_FMT_RGB32, width, height); - - /* copy the gd image to the av_frame */ - _php_gd_image_to_avframe(gd_img, frame, width, height); -@@ -429,7 +429,7 @@ - /* set the ffpmeg_frame's properties */ - ff_frame->width = width; - ff_frame->height = height; -- ff_frame->pixel_format = PIX_FMT_RGBA32; -+ ff_frame->pixel_format = PIX_FMT_RGB32; - break; - default: - zend_error(E_ERROR, "Invalid argument\n"); diff --git a/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c b/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c index 9e309e6af99f..6d95818ca37a 100644 --- a/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c +++ b/graphics/php5-ffmpeg/files/patch-ffmpeg_movie.c @@ -1,6 +1,6 @@ ---- ffmpeg_movie.c.orig 2012-09-01 22:21:08.000000000 -0500 -+++ ffmpeg_movie.c 2012-09-01 22:25:06.000000000 -0500 -@@ -308,7 +308,7 @@ +--- ffmpeg_movie.c.orig 2014-07-24 01:57:31.000000000 +0800 ++++ ffmpeg_movie.c 2014-07-24 02:05:36.823897263 +0800 +@@ -315,7 +315,7 @@ } if (persistent) { @@ -9,7 +9,7 @@ /* resolve the fully-qualified path name to use as the hash key */ fullpath = expand_filepath(filename, NULL TSRMLS_CC); -@@ -343,7 +343,7 @@ +@@ -350,7 +350,7 @@ } } else { /* no existing persistant movie, create one */ @@ -18,7 +18,7 @@ ffmovie_ctx = _php_alloc_ffmovie_ctx(1); if (_php_open_movie_file(ffmovie_ctx, filename)) { -@@ -357,7 +357,7 @@ +@@ -364,7 +364,7 @@ new_le.ptr = ffmovie_ctx; if (FAILURE == zend_hash_update(&EG(persistent_list), hashkey, @@ -27,7 +27,7 @@ NULL)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to register persistent resource"); -@@ -501,7 +501,7 @@ +@@ -508,7 +508,7 @@ codec_id)); if (!decoder) { @@ -36,3 +36,18 @@ _php_get_filename(ffmovie_ctx)); return NULL; } +@@ -964,12 +964,14 @@ + /* Copied from libavcodec/utils.c::avcodec_string */ + if (p) { + codec_name = p->name; ++/* + if (decoder_ctx->codec_id == CODEC_ID_MP3) { + if (decoder_ctx->sub_id == 2) + codec_name = "mp2"; + else if (decoder_ctx->sub_id == 1) + codec_name = "mp1"; + } ++ */ + } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) { + /* fake mpeg2 transport stream codec (currently not registered) */ + codec_name = "mpeg2ts"; diff --git a/graphics/php5-ffmpeg/pkg-descr b/graphics/php5-ffmpeg/pkg-descr index d37829bb1543..d850edb306d3 100644 --- a/graphics/php5-ffmpeg/pkg-descr +++ b/graphics/php5-ffmpeg/pkg-descr @@ -1,11 +1,11 @@ -The ffmpeg-php is an extension for PHP that adds an easy to use, -object-oriented API for accessing and retrieving information from video and -audio files. It has methods for returning frames from movie files as images -that can be manipulated using PHP's image functions. This works well for -automatically creating thumbnail images from movies. ffmpeg-php is also useful -for reporting the duration and bitrate of audio files (mp3, wma...). +The ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented +API for accessing and retrieving information from video and audio files. It has +methods for returning frames from movie files as images that can be manipulated +using PHP's image functions. This works well for automatically creating +thumbnail images from movies. ffmpeg-php is also useful for reporting the +duration and bitrate of audio files (mp3, wma...). -The ffmpeg-php can access many of the video formats supported by ffmpeg (mov, +The ffmpeg-php can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...) -WWW: http://ffmpeg-php.sourceforge.net/ +WWW: http://ffmpeg-php.sourceforge.net/