diff options
author | Remi Collet <fedora@famillecollet.com> | 2013-01-02 09:26:42 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2013-01-02 09:26:42 +0100 |
commit | 1d6a75585dfbdf374a560e30323ce688d981b592 (patch) | |
tree | 367e60265d34d40bc469475d8720b7bb3165a507 | |
parent | 090181a4c42cf8d422d7c6d482ce1876c2d44420 (diff) |
php-ffmpeg: fix f18 build + cleanups
-rw-r--r-- | php-ffmpeg-incl.patch | 124 | ||||
-rw-r--r-- | php-ffmpeg-php54.patch | 9 | ||||
-rw-r--r-- | php-ffmpeg.spec | 16 |
3 files changed, 122 insertions, 27 deletions
diff --git a/php-ffmpeg-incl.patch b/php-ffmpeg-incl.patch index 1e7fea7..26b6c7a 100644 --- a/php-ffmpeg-incl.patch +++ b/php-ffmpeg-incl.patch @@ -1,28 +1,43 @@ diff -up ./config.m4.incl ./config.m4 --- ./config.m4.incl 2009-07-02 19:15:48.000000000 +0200 -+++ ./config.m4 2012-09-17 06:31:46.733978790 +0200 -@@ -41,6 +41,18 @@ if test "$PHP_FFMPEG" != "no"; then - PHP_ADD_INCLUDE($i/include/libavdevice/) - FFMPEG_INC_FOUND=$i/include/libavcodec - break ++++ ./config.m4 2013-01-02 09:05:39.525828877 +0100 +@@ -33,13 +33,14 @@ if test "$PHP_FFMPEG" != "no"; then + elif test -f $i/include/libavcodec/avcodec.h; then + dnl ffmpeg svn revision 12194 and newer put each header in its own dir + dnl so we have to include them all. +- PHP_ADD_INCLUDE($i/include/libavcodec/) +- PHP_ADD_INCLUDE($i/include/libavformat/) +- PHP_ADD_INCLUDE($i/include/libavutil/) +- PHP_ADD_INCLUDE($i/include/libswscale/) +- PHP_ADD_INCLUDE($i/include/libavfilter/) +- PHP_ADD_INCLUDE($i/include/libavdevice/) +- FFMPEG_INC_FOUND=$i/include/libavcodec ++ PHP_ADD_INCLUDE($i/include) ++ FFMPEG_INC_FOUND=$i/include ++ break + elif test -f $i/libavcodec/avcodec.h; then + dnl ffmpeg svn revision 12194 and newer put each header in its own dir + dnl ffmpeg-devel RPM install in /usr/include/ffmpeg/* + PHP_ADD_INCLUDE($i) -+ PHP_ADD_INCLUDE($i/libavcodec/) -+ PHP_ADD_INCLUDE($i/libavformat/) -+ PHP_ADD_INCLUDE($i/libavutil/) -+ PHP_ADD_INCLUDE($i/libswscale/) -+ PHP_ADD_INCLUDE($i/libavfilter/) -+ PHP_ADD_INCLUDE($i/libavdevice/) + FFMPEG_INC_FOUND=$i -+ break + break fi done +diff -up ./ffmpeg_errorhandler.c.incl ./ffmpeg_errorhandler.c +--- ./ffmpeg_errorhandler.c.incl 2009-02-25 21:48:46.000000000 +0100 ++++ ./ffmpeg_errorhandler.c 2013-01-02 09:05:39.525828877 +0100 +@@ -34,7 +34,7 @@ + */ + + #include "php.h" +-#include <avcodec.h> ++#include <libavcodec/avcodec.h> + /* {{{ ffmpeg_errorhandler() + */ diff -up ./ffmpeg_frame.c.incl ./ffmpeg_frame.c ---- ./ffmpeg_frame.c.incl 2012-09-17 06:44:58.242810037 +0200 -+++ ./ffmpeg_frame.c 2012-09-17 06:44:07.729629307 +0200 +--- ./ffmpeg_frame.c.incl 2012-01-14 02:49:31.000000000 +0100 ++++ ./ffmpeg_frame.c 2013-01-02 09:05:39.526828871 +0100 @@ -57,7 +57,7 @@ allow ffmpeg-php to be built without access to the php sources */ @@ -32,3 +47,84 @@ diff -up ./ffmpeg_frame.c.incl ./ffmpeg_frame.c #define FFMPEG_PHP_FETCH_IMAGE_RESOURCE(gd_img, ret) { \ ZEND_GET_RESOURCE_TYPE_ID(le_gd, "gd"); \ +diff -up ./ffmpeg_frame.h.incl ./ffmpeg_frame.h +--- ./ffmpeg_frame.h.incl 2009-06-22 06:22:21.000000000 +0200 ++++ ./ffmpeg_frame.h 2013-01-02 09:05:39.527828864 +0100 +@@ -38,9 +38,9 @@ + + #include "php_version.h" + +-#include <avcodec.h> +-#include <avformat.h> +-#include <avutil.h> ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> ++#include <libavutil/avutil.h> + + #ifdef HAVE_CONFIG_H + #include "config.h" +diff -up ./ffmpeg_movie.c.incl ./ffmpeg_movie.c +--- ./ffmpeg_movie.c.incl 2012-01-14 02:49:31.000000000 +0100 ++++ ./ffmpeg_movie.c 2013-01-02 09:07:37.865917445 +0100 +@@ -34,10 +34,10 @@ + #include "php_globals.h" + #include "ext/standard/info.h" + +-#include <avcodec.h> +-#include <avformat.h> +-#include <pixfmt.h>
+-#include <pixdesc.h> ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> ++#include <libavutil/pixfmt.h> ++#include <libavutil/pixdesc.h> + + #ifdef HAVE_CONFIG_H + #include "config.h" +diff -up ./ffmpeg-php.c.incl ./ffmpeg-php.c +--- ./ffmpeg-php.c.incl 2012-01-14 02:49:31.000000000 +0100 ++++ ./ffmpeg-php.c 2013-01-02 09:05:39.528828857 +0100 +@@ -39,11 +39,11 @@ + + #include "php.h" + +-#include <avcodec.h> +-#include <avformat.h> ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> + + #if HAVE_SWSCALER +-#include <swscale.h> ++#include <libswscale/swscale.h> + #endif + + #include "php_ini.h" +diff -up ./ffmpeg_tools.c.incl ./ffmpeg_tools.c +--- ./ffmpeg_tools.c.incl 2009-06-22 06:22:21.000000000 +0200 ++++ ./ffmpeg_tools.c 2013-01-02 09:05:39.529828850 +0100 +@@ -42,7 +42,7 @@ + #include "ffmpeg_tools.h" + + #if LIBAVCODEC_VERSION_MAJOR >= 52 +-#include <swscale.h> ++#include <libswscale/swscale.h> + + /* {{{ ffmpeg_img_convert() + * wrapper around ffmpeg image conversion routines +diff -up ./ffmpeg_tools.h.incl ./ffmpeg_tools.h +--- ./ffmpeg_tools.h.incl 2009-06-22 06:22:21.000000000 +0200 ++++ ./ffmpeg_tools.h 2013-01-02 09:05:39.529828850 +0100 +@@ -36,11 +36,11 @@ + #ifndef FFMPEG_TOOLS_H + #define FFMPEG_TOOLS_H + +-#include <avcodec.h> ++#include <libavcodec/avcodec.h> + + #if LIBAVCODEC_VERSION_MAJOR >= 52 + +-#include <swscale.h> ++#include <libswscale/swscale.h> + + // Starting from this version, ImgReSampleContext doesn't exist anymore. + // This code implements the previous functions with a similar interface diff --git a/php-ffmpeg-php54.patch b/php-ffmpeg-php54.patch index 6a7e1ab..c00f78d 100644 --- a/php-ffmpeg-php54.patch +++ b/php-ffmpeg-php54.patch @@ -1,15 +1,6 @@ diff -up ffmpeg-php-svn678/ffmpeg_movie.c.php54 ffmpeg-php-svn678/ffmpeg_movie.c --- ffmpeg-php-svn678/ffmpeg_movie.c.php54 2012-09-17 06:08:57.113312219 +0200 +++ ffmpeg-php-svn678/ffmpeg_movie.c 2012-09-17 06:12:10.425069883 +0200 -@@ -36,7 +36,7 @@ - - #include <avcodec.h> - #include <avformat.h> --#include <pixfmt.h>
-+#include <pixfmt.h> - #include <pixdesc.h> - - #ifdef HAVE_CONFIG_H @@ -315,7 +315,7 @@ FFMPEG_PHP_CONSTRUCTOR(ffmpeg_movie, __c } diff --git a/php-ffmpeg.spec b/php-ffmpeg.spec index 73d8bb0..67086c4 100644 --- a/php-ffmpeg.spec +++ b/php-ffmpeg.spec @@ -4,14 +4,14 @@ Name: php-ffmpeg Version: 0.7.0 %if 0%{?svn} -Release: 0.1.svn%{svn}%{?dist} +Release: 0.2.svn%{svn}%{?dist}.1 %else Release: 1%{?dist} %endif Summary: Extension to manipulate movie in PHP Group: Development/Languages -License: GPLv2 +License: GPLv2+ URL: http://ffmpeg-php.sourceforge.net/ %if 0%{?svn} # svn export -r 678 https://ffmpeg-php.svn.sourceforge.net/svnroot/ffmpeg-php/trunk/ffmpeg-php ffmpeg-php-svn678 @@ -28,9 +28,13 @@ Patch1: php-ffmpeg-php54.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ffmpeg-devel >= 0.10, php-devel, php-gd +BuildRequires: ffmpeg-devel >= 0.10 +BuildRequires: php-devel +BuildRequires: php-gd + Obsoletes: ffmpeg-php < %{version} Provides: ffmpeg-php = %{version}-%{release} +Provides: ffmpeg-php%{?_isa} = %{version}-%{release} Requires: php-gd%{?_isa} Requires: php(zend-abi) = %{php_zend_api} @@ -142,7 +146,11 @@ rm -rf %{buildroot} %changelog -* Mon Sep 17 2010 Remi Collet <rpms@famillecollet.com> 0.7.0-0.1.svn678 +* Wed Jan 2 2013 Remi Collet <rpms@famillecollet.com> 0.7.0-0.2.svn678 +- rewrite patch for include using explicit path of each header + because of conflicts with system headers (time.h) + +* Mon Sep 17 2012 Remi Collet <rpms@famillecollet.com> 0.7.0-0.1.svn678 - update to 0.7.0 svn snapshot revision 678 - add patch for php 5.4 - add ZTS extension |