Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

January 22 2012

January 15 2012

January 08 2012

January 01 2012

December 25 2011

December 18 2011

December 11 2011

December 06 2011

Fixing libdlna formula in Homebrew

Recently I got an XBox 360 for xmas, and started looking for ways to stream the music in my Macbook Air to it. I found some interesting commercial software to do it, but stumbled upon an open-source linux tool called uShare that was also available through the Homebrew package manager.

Doing a brew install ushare immediately stopped due to a make install error of the libdlna package, a dependency of uShare, that is required for compatibility with Playstation 3. Here’s the error I got:

profiles.c: In function 'av_profile_get_codecs':
profiles.c:208: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function)
profiles.c:208: error: (Each undeclared identifier is reported only once
profiles.c:208: error: for each function it appears in.)
profiles.c:214: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
make[1]: *** [profiles.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2

This error happens for newer versions of the libavformat that no longer have the symbols CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO.

So, in order to fix the formula you need to apply this patch to the source code of libdlna. You can find the content of this patch in a github gist. But to successfully install the Homebrew formula you have to edit the formula file and include this patch in the patches method:

$ brew edit libdnla

Then find the patches method (on line 10) and change the code inside to the following:

def patches
  [
    # fixes ffmpeg locations
    "https://gist.github.com/raw/356431/fbddfeee80d9224f6c67886b119fbd813f3c0ffa/libdlna.patch",
    # fixes missing symbols for newer versions of libavformat
    "https://gist.github.com/raw/1434147/293ec631536bc34a6e2dd49bb0f30c86f02b1107/libdlna023_fix_symbols.patch"
  ]
end

Basically, instead of returning just the patch that was already in the formula as a string, I’m now returning an array with that patch, and my patch.

Now just save the file and:

$ brew install libdlna

And then resume the ushare formula install:

$ brew install ushare

That’s it. It should now install without a hassle.

I submitted this change to the Homebrew project with a pull request, so anytime soon you won’t be needing this workaround :)

December 04 2011

November 27 2011

November 20 2011

November 13 2011

November 06 2011

October 30 2011

October 23 2011

October 16 2011

October 09 2011

September 18 2011

September 11 2011

September 04 2011

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.