From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Feb 7 04:40:06 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB751106564A for ; Mon, 7 Feb 2011 04:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B58348FC18 for ; Mon, 7 Feb 2011 04:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p174e6au075552 for ; Mon, 7 Feb 2011 04:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p174e6du075551; Mon, 7 Feb 2011 04:40:06 GMT (envelope-from gnats) Resent-Date: Mon, 7 Feb 2011 04:40:06 GMT Resent-Message-Id: <201102070440.p174e6du075551@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Charlie Kester Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C912106566C for ; Mon, 7 Feb 2011 04:39:45 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by mx1.freebsd.org (Postfix) with ESMTP id 3690A8FC08 for ; Mon, 7 Feb 2011 04:39:44 +0000 (UTC) Received: from omta10.westchester.pa.mail.comcast.net ([76.96.62.28]) by qmta06.westchester.pa.mail.comcast.net with comcast id 4sW51g0030cZkys56sfl4v; Mon, 07 Feb 2011 04:39:45 +0000 Received: from comcast.net ([98.203.142.76]) by omta10.westchester.pa.mail.comcast.net with comcast id 4sfj1g0161f6R9u3WsfjNu; Mon, 07 Feb 2011 04:39:45 +0000 Received: by comcast.net (sSMTP sendmail emulation); Sun, 06 Feb 2011 20:39:41 -0800 Message-Id: <20110207043945.7C912106566C@hub.freebsd.org> Date: Sun, 06 Feb 2011 20:39:41 -0800 From: Charlie Kester To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/154565: [NEW PORT] py-mlt: python bindings for MLT framework X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Charlie Kester List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2011 04:40:06 -0000 >Number: 154565 >Category: ports >Synopsis: [NEW PORT] py-mlt: python bindings for MLT framework >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Feb 07 04:40:06 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Charlie Kester >Release: FreeBSD 8.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD atom.local 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Thu Feb 3 17:45:33 PST 2011 root@atom.local:/usr/obj/usr/src/sys/ATOM i386 >Description: Install the python bindings for the MLT framework (multimedia/mlt). mlt.i was borrowed from multimedia/mlt's ${WRKSRC}/src/swig directory, and the do-build steps are a lightly-modified version of the build script in that same ports's ${WRKSRC}/src/swig/python. The license of this port reflects the license info found in mlt.i >How-To-Repeat: >Fix: --- py-mlt.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # py-mlt # py-mlt/pkg-descr # py-mlt/Makefile # py-mlt/files # py-mlt/files/mlt.i # echo c - py-mlt mkdir -p py-mlt > /dev/null 2>&1 echo x - py-mlt/pkg-descr sed 's/^X//' >py-mlt/pkg-descr << 'e68892ed3ab7c94b43e9bbb91995bd94' XPython bindings for the MLT framework. X XMLT is an open source multimedia framework, designed and developed for Xtelevision broadcasting. It provides a toolkit for broadcasters, video Xeditors, media players, transcoders, web streamers and many more types Xof applications. The functionality of the system is provided via an Xassortment of ready to use tools, XML authoring components, and an Xextensible plug-in based API. X XWWW: http://www.mltframework.org e68892ed3ab7c94b43e9bbb91995bd94 echo x - py-mlt/Makefile sed 's/^X//' >py-mlt/Makefile << '29b2e87932a689d63459a853941c7a9d' X# ex:ts=8 X# Ports collection makefile for: mlt X# Date created: 2011-02-06 X# Whom: Charlie Kester X# X# $FreeBSD$ X# X XPORTNAME= mlt XPORTVERSION= 0.6.0 XCATEGORIES= multimedia python XMASTER_SITES= # empty XPKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} XDISTFILES= # none X XMAINTAINER= corky1951@comcast.net XCOMMENT= Python bindings for the MLT multimedia framework X XBUILD_DEPENDS= swig:${PORTSDIR}/devel/swig13 XLIB_DEPENDS= mlt.3:${PORTSDIR}/multimedia/mlt X XUSE_PYTHON= yes X XLICENSE= GPLv2 X XPLIST_FILES= %%PYTHON_SITELIBDIR%%/_mlt.so \ X %%PYTHON_SITELIBDIR%%/mlt.py X Xpost-patch: X @${MKDIR} ${WRKSRC} X @${CP} ${FILESDIR}/mlt.i ${WRKSRC} X Xdo-build: X (cd ${WRKSRC} && \ X swig -c++ -I${LOCALBASE}/include/mlt -I${LOCALBASE}/include/mlt++ -python mlt.i && \ X g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I${LOCALBASE}/include -I${LOCALBASE}/include/mlt -I${PYTHON_INCLUDEDIR} mlt_wrap.cxx && \ X g++ -shared mlt_wrap.o -L${LOCALBASE}/lib -lmlt++ -o _mlt.so) X Xdo-install: X ${INSTALL_LIB} ${WRKSRC}/_mlt.so ${PYTHONPREFIX_SITELIBDIR} X ${INSTALL_SCRIPT} ${WRKSRC}/mlt.py ${PYTHONPREFIX_SITELIBDIR} X X.include 29b2e87932a689d63459a853941c7a9d echo c - py-mlt/files mkdir -p py-mlt/files > /dev/null 2>&1 echo x - py-mlt/files/mlt.i sed 's/^X//' >py-mlt/files/mlt.i << '67e0d1170794d930d7e0084564bf7b16' X/** X * mlt.i - Swig Bindings for mlt++ X * Copyright (C) 2004-2005 Charles Yates X * Author: Charles Yates X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU Lesser General Public License as published X * by the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software Foundation, X * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. X */ X X%module mlt X%include "carrays.i" X%array_class(unsigned char, unsignedCharArray); X X%{ X#include Xint mlt_log_get_level( void ); Xvoid mlt_log_set_level( int ); X%} X X/** These methods return objects which should be gc'd. X */ X Xnamespace Mlt { X%newobject Factory::init( const char * ); X%newobject Factory::producer( Profile &, char *, char * ); X%newobject Factory::filter( Profile &, char *, char * ); X%newobject Factory::transition( Profile &, char *, char * ); X%newobject Factory::consumer( Profile &, char *, char * ); X%newobject Properties::listen( const char *, void *, mlt_listener ); X%newobject Properties::setup_wait_for( const char * ); X%newobject Properties::parse_yaml( const char * ); X%newobject Service::producer( ); X%newobject Service::consumer( ); X%newobject Service::get_frame( int ); X%newobject Service::filter( int ); X%newobject Producer::filter( int ); X%newobject Producer::cut( int, int ); X%newobject Playlist::current( ); X%newobject Playlist::clip_info( int ); X%newobject Playlist::get_clip( int ); X%newobject Multitrack::track( int ); X%newobject Tractor::multitrack( ); X%newobject Tractor::field( ); X%newobject Tractor::track( int ); X%newobject Frame::get_original_producer( ); X%newobject Repository::consumers( ); X%newobject Repository::filters( ); X%newobject Repository::producers( ); X%newobject Repository::transitions( ); X%newobject Repository::metadata( mlt_service_type, const char * ); X%newobject Repository::languages( ); X} X X/** Classes to wrap. X */ X X%include X%include X%include Xint mlt_log_get_level( void ); Xvoid mlt_log_set_level( int ); X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X%include X X#if defined(SWIGRUBY) X X%{ X Xstatic void ruby_listener( mlt_properties owner, void *object ); X Xclass RubyListener X{ X private: X VALUE callback; X Mlt::Event *event; X X public: X RubyListener( Mlt::Properties &properties, char *id, VALUE callback ) : X callback( callback ) X { X event = properties.listen( id, this, ( mlt_listener )ruby_listener ); X } X X ~RubyListener( ) X { X delete event; X } X X void mark( ) X { X ((void (*)(VALUE))(rb_gc_mark))( callback ); X } X X void doit( ) X { X ID method = rb_intern( "call" ); X rb_funcall( callback, method, 0 ); X } X}; X Xstatic void ruby_listener( mlt_properties owner, void *object ) X{ X RubyListener *o = static_cast< RubyListener * >( object ); X o->doit( ); X} X Xvoid markRubyListener( void* p ) X{ X RubyListener *o = static_cast( p ); X o->mark( ); X} X X%} X X// Ruby wrapper X%rename( Listener ) RubyListener; X%markfunc RubyListener "markRubyListener"; X Xclass RubyListener X{ X public: X RubyListener( Mlt::Properties &properties, char *id, VALUE callback ); X}; X X#endif X X#if defined(SWIGPYTHON) X%{ Xtypedef struct { X int size; X char* data; X} binary_data; X Xbinary_data frame_get_waveform( Mlt::Frame &frame, int w, int h ) X{ X binary_data result = { X w * h, X (char*) frame.get_waveform( w, h ) X }; X return result; X} X X%} X X%typemap(out) binary_data { X $result = PyString_FromStringAndSize( $1.data, $1.size ); X} X Xbinary_data frame_get_waveform(Mlt::Frame&, int, int); X X#endif 67e0d1170794d930d7e0084564bf7b16 exit --- py-mlt.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: