On Mon, Oct 24, 2011 at 5:02 PM, Richard Jones <[email protected]>wrote:

> On 24 October 2011 09:45, Nathan <[email protected]> wrote:
> > Obviously, AVbin needs some updating...
>
> Yes, between this thread and Dmitry Chichkov's post it's probably
> about time for another release, but Alex sure isn't likely to do it. I
> don't know that I'll find the time (I also only have OS X available
> for building).
>
>
Hmm, well since putting together the source code in the first place is
pretty tedious, I put together a github fork of avbin as best I could figure
out:

https://github.com/peaceful/avbin

The avbin checkout was r54 from http://avbin.googlecode.com/svn/trunk.  The
avbin/ffmpeg external checkout was r15943 from svn://
svn.mplayerhq.hu/ffmpeg/trunk.  The avbin/ffmpeg/libwscale external checkout
was r26991 from svn://svn.mplayerhq.hu/mplayer/trunk/libswscale.

So, I take all that, and try running "./build.sh darwin-x86-64" on Lion,
which goes for awhile and crashes with:

...
ld: warning: directory not found for option
'-L/usr/lib/gcc/i686-apple-darwin9/4.2.1/x86_64/'
ld: library not found for -lgcc
make: *** [dist/darwin-x86-64/libavbin.8.dylib] Error 1

So I poke around and find that the "i686-apple-darwin9" directory apparently
should be "i686-apple-darwin11", which makes sense, since the last
functioning avbin release for OS X was for Leopard, which was two major OS
revisions ago.

So I search for where that is and patch it:
diff --git a/Makefile.darwin-x86-64 b/Makefile.darwin-x86-64
index 1e9aa6b..1e4f1c1 100644
--- a/Makefile.darwin-x86-64
+++ b/Makefile.darwin-x86-64
@@ -15,7 +15,7 @@ LIBS = -lSystem \
        -lz \
        -lbz2 \
        /usr/lib/dylib1.o \
-       -L/usr/lib/gcc/i686-apple-darwin9/4.2.1/x86_64/ -lgcc
+       -L/usr/lib/gcc/i686-apple-darwin11/4.2.1/x86_64/ -lgcc

 $(LIBNAME) : $(OBJNAME) $(OUTDIR)
        $(LD) $(LDFLAGS) -o $@ $< $(STATIC_LIBS) $(LIBS)

...and then it _seems_ to compile okay.  Warnings, but no errors.

And that seems to create a .dylib:

$ ls -l ./dist/darwin-x86-64/libavbin.8.dylib
-rwxr-xr-x  1 nathan  nathan  3247060 Oct 24 22:29
./dist/darwin-x86-64/libavbin.8.dylib

I copy that into where it looks like it should go:

$ sudo cp ./dist/darwin-x86-64/libavbin.8.dylib
/usr/local/lib/libavbin.dylib

...and loading and playing a sound in pyglet works!  (the ctypes variant of
pyglet, I think).  Is there a set of unit tests I can run to specifically
exercise avbin?

~ Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to