Hello Dan,

2012/5/23 Dan Dennedy <dan@dennedy.org>

I hate to be the bearer of bad news, but I think you are going to fail
unless you are prepared to make substantial changes to the MLT Python
binding and OpenShot. OpenShot uses the sdl (or sdl_preview) consumer
with its awkward way of embedding SDL into a GUI toolkit, which does
not work on OS X. Kdenlive only uses the sdl_audio consumer and then
listens to a MLT event for when to paint the frame. From the frame
that the event provides, the app fetches the rgba data and renders it
with OpenGL in a QGLWidget. The python binding needs enhancement to
support MLT events invoking a python callable. Then, enhanced to
subclass an events with a frame object argument. Next, you would need
to figure out how to integrate that into OpenShot as well as rendering
with OpenGL into GTK+. P.S. This is the same sort of work I anticipate
is needed for GTK3 if the reports about SDL embedding being broken are

I do not plan to help you in this endeavor because I am in the midst
of making a new Qt-based cross-platform editor named Shotcut where I
have already cross-platform working well. Besides all of this,
OpenShot plans to abandon MLT, and I am not particularly keen on the
way it uses MLT API (or lack thereof) or the way GTK+ looks/works on
OS X and Windows.

OK, thanks for the info. I fully understand and support your reasons.

> So far the introduction.
> For Openshot I need mlt with python bindings so I took your
> macports portfile, upgraded it to 0.78 and added a python
> variant (default is for kedenlive and doesn\'t need python).
> In the meantime I encountered a weird issue with the
> framework build (src/framework) as the config.mak contains
> \"-n\" and gcc/g++ stumbles on that, so I made a very rude fix

Why? Where? I have never encountered that problem, and neither has
anyone else reported it. Is it due to enabling a swig language?

I think the python expansion did this as it doesn't happen with the normal Portfile that you created.


> to it (the post-configure), which I assume you can do much
> better.
> The problem now is that the _mlt.so and accompanying mlt.py
> get built but doesn\'t seem to get installed.
> So now I have two questions:
> - do you want me to file a bug ticket or something alike?
> - do you have a clue?
> Below a copied diff or my attempts

OK, thanks...

> ---
> /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/multimedia/mlt/Portfile
>  2011-12-13 10:30:26.000000000 +0100
> +++ /Users/harryvanderwolf/Portfile.mlt 2012-05-23
> 16:24:43.000000000 +0200
> @@ -5,8 +5,8 @@
>  PortGroup           qt4 1.0
>  name                mlt
> -epoch               3
> -version             0.7.6
> +#epoch               3
> +version             0.7.8

I have been holding off upgrading it because the Kdenlive port is very
sensitive to MLT version, and I have not upgraded the Kdenlive port
because I could not get dbus to work again after some upgrades and
even reinstalling. Consequently, I have abandoned supporting and
maintaining the kdenlive port. KDE apps on macports are a real pain in
the ass because of their dependence on dbus daemons and kded, which
not only makes install difficult and tedious for end users but also
for me to support them. It is not effective use of my time. Also, the
very tall stack of dependencies and these daemons makes install slow
and long, and afterwards it is very brittle to upgrade resulting in
many headaches. It is for these reasons that I also started Shotcut.

For my reasons to move I started again with kdenlive also on OS X and I fully agree with you on the kde and dbus stuff. In the last week I already removed and reinstalled macports three times. Only the second time I succeeded in installing kdenlive.
Next from not stable kdenlive is dead slow, also with proxies enabled.

You can see the work-in-progress here:

Official preview release not available pending the automated nightly
windows build. As you may see, at this time it is not an editor, but
mainly just a media player. It is all foundational work at this point.

Yes, I downloaded it. The Ubuntu 11.10 version also plays fine on 12.04.
Well, I'm interested with what you will deliver..

>  categories          multimedia
>  maintainers         dennedy.org:dan
>  description         Open source multimedia framework - core
> libraries
> @@ -23,8 +23,8 @@
>  master_sites        sourceforge:project/mlt/mlt
>  platforms           darwin
> -checksums           sha1
> f23c8bddb9b1f406c3cfcd155e74f8d9d37b5120 \\
> -                    rmd160
> 898256dfbbda158f51796a7d4468a6a54b9b246d
> +checksums           sha1
> 2d55b16918284ffadd5eae6eed1c5f0a12669d32 \\
> +                    rmd160
> 8edaeba84ca91b002c85e8582b7b0fa8d0286a86
>  # frei0r-plugins is not universal
>  universal_variant   no
> @@ -40,7 +40,7 @@
>                     port:libsamplerate \\
>                     path:lib/pkgconfig/sdl.pc:libsdl \\
>                     port:libvorbis \\
> -                    port:sox
> +                    port:sox
>  if {${configure.compiler} == \"clang\"} {
>     configure.compiler llvm-gcc-4.2
> @@ -52,6 +52,9 @@
>                     --disable-jackrack \\
>                     --disable-mmx
> +post-configure { reinplace \"s|-n||\"
> ${worksrcpath}/src/framework/config.mak
> +}
> +

Unable to reproduce. Pending further explanation.

I also think this is due to the python variant. 

>  platform darwin 10 {
>     if { ${build_arch} == \"x86_64\" } {
>         configure.args-delete --disable-mmx
> @@ -66,11 +69,19 @@
>  build.env-append            CFLAGS=\"${configure.cflags}\"
> LDFLAGS=\"${configure.ldflags}\"
>  build.args-append           CC=\"${configure.cc}\"
> CXX=\"${configure.cxx}\" CPP=\"${configure.cpp}\"
> +
>  variant no_x11 {
>     configure.args-append   --disable-gtk2
>     depends_lib-delete      port:gtk2
>  }
> +variant python {
> +    configure.args-append   --swig-languages=python
> +    depends_lib-append      port:python27 \\
> +                            port:swig-python \\
> +                            port:swig
> +}
> +

That looks fine.

Maybe it looks fine but it doesn't install the _mlt.so and mlt.py. When using the "port build mlt" I can see in the work folder that they are created.
I will not take it further from here also based on your arguments. I'm leaving OSX anyway. 

Thanks for your answer.