Add emulators/py-ffmpeg 1.2.4.

This is python bindings for ffmpeg, specifically designed for Android for
use by Kivy (x11-toolkits/py-kivy).
This commit is contained in:
David Naylor 2014-01-23 18:06:23 +00:00
parent 0fe0c8b7fe
commit 8dc5216d73
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=340843
5 changed files with 76 additions and 0 deletions

View file

@ -282,6 +282,7 @@
SUBDIR += pwcbsd
SUBDIR += pwcview
SUBDIR += py-enzyme
SUBDIR += py-ffmpeg
SUBDIR += py-guessit
SUBDIR += py-gstreamer
SUBDIR += py-kaa-base

View file

@ -0,0 +1,36 @@
# Created by: David Naylor <dbn@FreeBSD.org>
# $FreeBSD$
PORTNAME= ffmpeg
PORTVERSION= 1.2.4
CATEGORIES= multimedia python
MASTER_SITES= LOCAL/dbn/${PORTNAME}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME}-android-${PORTVERSION}
MAINTAINER= dbn@FreeBSD.org
COMMENT= Python bindings for FFmpeg
LICENSE= LGPL20 LGPL21 LGPL3
LICENSE_COMB= dual
BUILD_DEPENDS= cython:${PORTSDIR}/lang/cython
LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
MAKE_ENV= FFMPEG_LIBRARIES="SDL SDL_mixer" FFMPEG_LIBRARY_DIRS=${LOCALBASE}/lib \
FFMPEG_INCLUDES=${LOCALBASE}/include/SDL FFMPEG_ROOT=${LOCALBASE}
GH_ACCOUNT= tito
GH_PROJECT= ${PORTNAME}-android
GH_TAGNAME= ${GH_COMMIT}
GH_COMMIT= 6636c3a
USE_GITHUB= yes
USE_PYTHON= 2
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
USE_SDL= mixer
WRKSRC_SUBDIR= python
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/ffmpeg/_ffmpeg.so
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (ffmpeg-android-1.2.4.tar.gz) = 1b3692bcc06765794e78b8906617b6ce697dd8044ad6c9ca620666908f2c8c7a
SIZE (ffmpeg-android-1.2.4.tar.gz) = 7380012

View file

@ -0,0 +1,32 @@
--- setup.py.orig 2013-10-28 18:04:02.000000000 +0200
+++ setup.py 2014-01-22 21:29:49.000000000 +0200
@@ -15,7 +15,7 @@
library_dirs = []
include_dirs = []
extra_objects = []
-extra_compile_args=['-ggdb', '-O0']
+extra_compile_args=['-fPIC']
ext_files = ['ffmpeg/_ffmpeg.pyx']
root_ffmpeg = environ.get('FFMPEG_ROOT')
@@ -29,14 +29,13 @@
if environ.get('FFMPEG_LIBRARY_DIRS'):
library_dirs += environ.get('FFMPEG_LIBRARY_DIRS').split(' ')
libraries = environ.get('FFMPEG_LIBRARIES', 'gcc z sdl sdl_mixer m').split(' ')
- extra_compile_args = ['-ggdb', '-O0']
p = join(root_ffmpeg, 'lib')
- extra_objects = [
- join(p, 'libavformat.a'),
- join(p, 'libavcodec.a'),
- join(p, 'libswscale.a'),
- join(p, 'libavresample.a'),
- join(p, 'libavutil.a')]
+ libraries += [
+ 'avformat',
+ 'avcodec',
+ 'swscale',
+ 'avresample',
+ 'avutil']
elif not have_cython:
# Special hack for PGS4A-android, should we deprecated it ?

View file

@ -0,0 +1,5 @@
py-ffmpeg includes a specific Python wrapper to decode audio / video,
implemented to be as portable as possible. The goal is to use it for a
core provider in the Kivy project, on android platform.
WWW: http://txzone.net/