Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386909 - media-libs/libshairport: new package (used by xbmc + --enable-airtunes)
Summary: media-libs/libshairport: new package (used by xbmc + --enable-airtunes)
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal enhancement with 1 vote (vote)
Assignee: Default Assignee for New Packages
URL: https://github.com/xbmc/xbmc/tree/mas...
Whiteboard:
Keywords:
Depends on:
Blocks: 458514
  Show dependency tree
 
Reported: 2011-10-12 14:40 UTC by hal
Modified: 2013-05-04 17:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,785 bytes, text/plain)
2011-10-12 14:42 UTC, hal
Details
libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,1.35 KB, text/plain)
2012-03-13 01:44 UTC, hal
Details
libshairport-9999.ebuild (libshairport-9999.ebuild,1.35 KB, text/plain)
2012-03-13 01:45 UTC, hal
Details
01-libshairport-1.2.0.20310-add_ao.patch (01-libshairport-1.2.0.20310-add_ao.patch,9.11 KB, patch)
2012-03-13 01:45 UTC, hal
Details | Diff
02-libshairport-1.2.0.20310-fix_install_header.patch (02-libshairport-1.2.0.20310-fix_install_header.patch,447 bytes, patch)
2012-03-13 01:46 UTC, hal
Details | Diff
03-libshairport-1.2.0.20310-fix_deadlock.patch (03-libshairport-1.2.0.20310-fix_deadlock.patch,268 bytes, patch)
2012-03-13 01:46 UTC, hal
Details | Diff
04-libshairport-1.2.0.20310-fix_bad_access.patch (04-libshairport-1.2.0.20310-fix_bad_access.patch,573 bytes, patch)
2012-03-13 01:46 UTC, hal
Details | Diff
05-libshairport-1.2.0.20310-fix_shutdown.patch (05-libshairport-1.2.0.20310-fix_shutdown.patch,244 bytes, patch)
2012-03-13 01:47 UTC, hal
Details | Diff
06-libshairport-1.2.0.20310-no_printf.patch (06-libshairport-1.2.0.20310-no_printf.patch,28.85 KB, patch)
2012-03-13 01:47 UTC, hal
Details | Diff
07-libshairport-1.2.0.20310-fix_syslog_defines.patch (07-libshairport-1.2.0.20310-fix_syslog_defines.patch,456 bytes, patch)
2012-03-13 01:47 UTC, hal
Details | Diff
08-libshairport-1.2.0.20310-add-missing-libs.patch (08-libshairport-1.2.0.20310-add-missing-libs.patch,636 bytes, patch)
2012-03-13 01:48 UTC, hal
Details | Diff
updated libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,1.47 KB, text/plain)
2012-06-06 22:09 UTC, hal
Details
libshairport-9999.ebuild (libshairport-9999.ebuild,1.47 KB, text/plain)
2012-06-06 22:09 UTC, hal
Details
09-libshairport-1.2.0.20310-fix-ipv6.patch (09-libshairport-1.2.0.20310-fix-ipv6.patch,810 bytes, patch)
2012-06-06 22:10 UTC, hal
Details | Diff
10-libshairport-1.2.0.20310-handle-metadata.patch (10-libshairport-1.2.0.20310-handle-metadata.patch,5.94 KB, patch)
2012-06-06 22:11 UTC, hal
Details | Diff
10-libshairport-1.2.0.20310-handle_metadata.patch (10-libshairport-1.2.0.20310-handle_metadata.patch,5.94 KB, patch)
2012-06-07 12:29 UTC, hal
Details | Diff
09-libshairport-1.2.0.20310-fix_ipv6.patch (09-libshairport-1.2.0.20310-fix_ipv6.patch,810 bytes, patch)
2012-06-07 12:30 UTC, hal
Details | Diff
08-libshairport-1.2.0.20310-add_missing_libs.patch (08-libshairport-1.2.0.20310-add_missing_libs.patch,636 bytes, patch)
2012-06-07 12:31 UTC, hal
Details | Diff
libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,1.42 KB, text/plain)
2012-06-07 12:34 UTC, hal
Details
libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,1.42 KB, text/plain)
2012-06-07 13:20 UTC, hal
Details
libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,1.48 KB, text/plain)
2012-06-11 00:20 UTC, hal
Details
11-libshairport-1.2.0.20310-ipv4_fallback.patch (11-libshairport-1.2.0.20310-ipv4_fallback.patch,445 bytes, patch)
2013-02-17 22:58 UTC, hal
Details | Diff
libshairport-1.2.0.20310.ebuild (libshairport-1.2.0.20310.ebuild,1.53 KB, text/plain)
2013-02-17 23:00 UTC, hal
Details
Enhances xbmc-9999.ebuild to enable airtunes/libshairport (xbmc-9999.ebuild.airtunes.patch,1.07 KB, patch)
2013-02-21 12:46 UTC, hal
Details | Diff
Updated ebuild to include libao as a dependency. Drops support for original unmaintained upstream source. (xbmc-libshairport-1.2.0.20310_pre21022013.ebuild,826 bytes, text/plain)
2013-02-21 14:19 UTC, hal
Details
Patch for xbmc-9999.ebuild (xbmc-9999.ebuild.airtunes.patch,1.08 KB, patch)
2013-02-21 14:23 UTC, hal
Details | Diff
xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild (xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild,826 bytes, text/plain)
2013-02-21 19:03 UTC, hal
Details
xbmc-9999.ebuild.airtunes.patch (xbmc-9999.ebuild.airtunes.patch,1.08 KB, patch)
2013-02-21 19:04 UTC, hal
Details | Diff
xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild (xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild,739 bytes, text/plain)
2013-02-22 12:48 UTC, hal
Details
xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild (xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild,739 bytes, text/plain)
2013-02-22 13:24 UTC, hal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hal 2011-10-12 14:40:54 UTC
"Emulates an AirPort Express for the purpose of streaming music from
iTunes and compatible iPods"

see: http://mafipulation.org/blagoblig/reversing/index.html#shairport

This library is a dependency for xbmc-9999 and the upcoming eden release and
enables the builtin airport support in XBMC. Since Gentoo wants to have each
dependency as a seperate ebuild, we should split libshairport from xbmc and offer
it as a dedicated package.

Therefore I rolled an ebuild, which is based on the sources found at http://mirrors.xbmc.org/build-deps/darwin-libs/.
XBMC needs a spcific version and patches in order to work, please see http://forum.xbmc.org/showpost.php?p=902459&postcount=2 and https://github.com/xbmc/xbmc/tree/master/lib/libshairport (patches).

Please see attachement for the ebuild. It would be nice to find a maintainer soon to get this
ebuild into the official tree.

Currently libshairport gets build fine, although configure phase of xbmc will not recognize the installed lib on gentoo due to --as-needed. Until now I wasn't able to fix it by following the "--as-needed guide" (http://www.gentoo.org/proj/en/qa/asneeded.xml)

Reproducible: Always

Steps to Reproduce:
1. emerge xbmc-9999
Actual Results:  
1. configure phase tells me it has no builtin nfs support

Expected Results:  
1. configure phase should tell me it has builtin nfs support
Comment 1 hal 2011-10-12 14:42:06 UTC
Created attachment 289661 [details]
libshairport-1.2.0.20310.ebuild
Comment 2 hal 2011-10-12 14:46:03 UTC
wrong:

> Steps to Reproduce:
> 1. emerge xbmc-9999
> Actual Results:  
> 1. configure phase tells me it has no builtin nfs support
> 
> Expected Results:  
> 1. configure phase should tell me it has builtin nfs support

right:
Steps to Reproduce:
1. emerge xbmc-9999
Actual Results:  
1. configure phase tells me it has no builtin airport support

Expected Results:  
1. configure phase should tell me it has builtin airport support
Comment 3 hal 2011-10-12 14:59:22 UTC
> Currently libshairport gets build fine, although configure phase of xbmc will
> not recognize the installed lib on gentoo due to --as-needed. Until now I
> wasn't able to fix it by following the "--as-needed guide"
> (http://www.gentoo.org/proj/en/qa/asneeded.xml)

What worked is to filter --as-needed in the xbmc ebuild by adding: 

inherit flag-o-matic
...

pkg_setup() {
    append-ldflags $(no-as-needed)
}

But I assume this is not "the way of gentoo". :)
Comment 4 hal 2012-01-23 02:35:06 UTC
commit https://github.com/xbmc/xbmc/commit/40ab15b1cb6e6c868d6b5ac2f295807741e902f4

fixed the build issue.
Comment 5 SpanKY gentoo-dev 2012-01-28 22:49:19 UTC
Comment on attachment 289661 [details]
libshairport-1.2.0.20310.ebuild

airtunes support is optional, so having this in the tree isn't a real requirement

as for the ebuild:
 - there's no need for the tarball renaming in SRC_URI
 - delete empty DEPEND/RDEPEND
 - set S= in global scope rather than src_unpack
 - you should list explicit patches rather than globing them all
Comment 6 hal 2012-03-13 01:44:58 UTC
Created attachment 305103 [details]
libshairport-1.2.0.20310.ebuild
Comment 7 hal 2012-03-13 01:45:15 UTC
Created attachment 305105 [details]
libshairport-9999.ebuild
Comment 8 hal 2012-03-13 01:45:35 UTC
Created attachment 305107 [details, diff]
01-libshairport-1.2.0.20310-add_ao.patch
Comment 9 hal 2012-03-13 01:46:08 UTC
Created attachment 305109 [details, diff]
02-libshairport-1.2.0.20310-fix_install_header.patch
Comment 10 hal 2012-03-13 01:46:31 UTC
Created attachment 305111 [details, diff]
03-libshairport-1.2.0.20310-fix_deadlock.patch
Comment 11 hal 2012-03-13 01:46:53 UTC
Created attachment 305113 [details, diff]
04-libshairport-1.2.0.20310-fix_bad_access.patch
Comment 12 hal 2012-03-13 01:47:14 UTC
Created attachment 305115 [details, diff]
05-libshairport-1.2.0.20310-fix_shutdown.patch
Comment 13 hal 2012-03-13 01:47:37 UTC
Created attachment 305117 [details, diff]
06-libshairport-1.2.0.20310-no_printf.patch
Comment 14 hal 2012-03-13 01:47:54 UTC
Created attachment 305119 [details, diff]
07-libshairport-1.2.0.20310-fix_syslog_defines.patch
Comment 15 hal 2012-03-13 01:48:16 UTC
Created attachment 305121 [details, diff]
08-libshairport-1.2.0.20310-add-missing-libs.patch
Comment 16 hal 2012-03-13 01:50:37 UTC
All fixed, though not sure about the $S. Just have a look at it.

You are right libshairport is optional for xbmc. However I think it would be a really nice addon for a media center.
Comment 17 hal 2012-06-06 22:09:04 UTC
Created attachment 314475 [details]
updated libshairport-1.2.0.20310.ebuild

- inherit eutils 
- added ipv6 patch from team xbmc
- added metadata patch from team xbmc
Comment 18 hal 2012-06-06 22:09:58 UTC
Created attachment 314477 [details]
libshairport-9999.ebuild

- inherit eutils 
- added ipv6 patch from team xbmc
- added metadata patch from team xbmc
Comment 19 hal 2012-06-06 22:10:59 UTC
Created attachment 314479 [details, diff]
09-libshairport-1.2.0.20310-fix-ipv6.patch
Comment 20 hal 2012-06-06 22:11:29 UTC
Created attachment 314481 [details, diff]
10-libshairport-1.2.0.20310-handle-metadata.patch
Comment 21 hal 2012-06-07 12:29:59 UTC
Created attachment 314547 [details, diff]
10-libshairport-1.2.0.20310-handle_metadata.patch
Comment 22 hal 2012-06-07 12:30:29 UTC
Created attachment 314549 [details, diff]
09-libshairport-1.2.0.20310-fix_ipv6.patch
Comment 23 hal 2012-06-07 12:31:11 UTC
Created attachment 314551 [details, diff]
08-libshairport-1.2.0.20310-add_missing_libs.patch
Comment 24 hal 2012-06-07 12:34:54 UTC
Created attachment 314553 [details]
libshairport-1.2.0.20310.ebuild

- removed live ebuild, just rename to *-9999.ebuild in order to obtain the live sources. XBMC needs PV 1.2.0.20310
- moved inherit eutils to else clause
- removed globbing from patches
- corrected patch names
Comment 25 hal 2012-06-07 13:20:41 UTC
Created attachment 314569 [details]
libshairport-1.2.0.20310.ebuild

- removed testing echo "${S}"
- moved ${S} to global scope
- negative if clause for epatch (!= "9999")
Comment 26 SpanKY gentoo-dev 2012-06-07 13:37:17 UTC
Comment on attachment 314569 [details]
libshairport-1.2.0.20310.ebuild

inherit vcs-snapshot rather than mucking with S yourself

can't you get these patches merged upstream ?
Comment 27 hal 2012-06-11 00:19:16 UTC
(In reply to comment #26)
> Comment on attachment 314569 [details]
> libshairport-1.2.0.20310.ebuild
> 
> inherit vcs-snapshot rather than mucking with S yourself

You mean something like below?

SRC_URI="http://mirrors.xbmc.org/build-deps/darwin-libs/${P}_lib.tar.gz -> ${P}.tar.gz"

> can't you get these patches merged upstream ?

The point is I took the patches from team xbmc found over here: https://github.com/xbmc/xbmc/tree/master/lib/libshairport

All I wanted to achive is to create an ebuild providing a version of libshairport playing together with xbmc nicely. So I referred to the snapshot of team xbmc and their patches rather than to the git sources. (see post #1)

So afait team xbmc already cares about getting the patches merged upstream. At least it looks like some of them were already merged according to the commit log: https://github.com/amejia1/libshairport
Comment 28 hal 2012-06-11 00:20:48 UTC
Created attachment 314923 [details]
libshairport-1.2.0.20310.ebuild

- add openssl as a dependency
- assign value to $S (S="${WORKDIR}/${P}_lib")
Comment 29 Craig Andrews gentoo-dev 2013-01-16 05:19:34 UTC
Any news here? This would be a nice addition, and it seems like we're really close!
Comment 30 hal 2013-01-16 13:10:07 UTC
(In reply to comment #29)
> Any news here? This would be a nice addition, and it seems like we're really
> close!

Can't tell you anything about an approval to get this into the tree.
But personally I haven't been able to improve or to keep the ebuild in sync since my last changes due to time constraints. And it looks like I will not have time during the next months to do so.
Comment 31 Simon Bühler 2013-01-27 12:42:37 UTC
also needed for the up and coming plex hometheater linux client, i changed the ebuild to  -9999 an the live version is missing libao dependencie but compiles fine!

please add to tree !
Comment 32 hal 2013-02-17 22:58:55 UTC
Created attachment 339194 [details, diff]
11-libshairport-1.2.0.20310-ipv4_fallback.patch
Comment 33 hal 2013-02-17 23:00:21 UTC
Created attachment 339196 [details]
libshairport-1.2.0.20310.ebuild

Updated epatch section
Comment 34 hal 2013-02-21 12:34:14 UTC
I just wanted to emphasize: Although airplay can live without airtunes (libshairport), it will not play back pure audio streams in that case. It will stream videos with audio, pictures, but not pure audio data.

The other way 'round, airtunes will not do anything with the absence of airplay.

So in order to get the full enjoyment of streaming all kinds of media we will need both airplay and airtunes.

This might seem to be strange because airplay is the successor of airtunes and is able to stream the full spectrum of available media on Apple devices. But I **assume** (I really don't know tbh) airplay is based on an enhanced airtunes codebase, so again under the hood we might have both airplay and airtunes again.

http://en.wikipedia.org/wiki/AirPlay
Comment 35 hal 2013-02-21 12:46:59 UTC
Created attachment 339570 [details, diff]
Enhances xbmc-9999.ebuild to enable airtunes/libshairport
Comment 36 hal 2013-02-21 13:06:54 UTC
(In reply to comment #26)
> Comment on attachment 314569 [details]
> libshairport-1.2.0.20310.ebuild
> 
> can't you get these patches merged upstream ?

Meanwhile all of them seem to be merged upstream, see: https://github.com/amejia1/libshairport

So using the live ebuild would use the patched sources from upstream.
The point is they don't have tags/releases we could use for a non-live ebuild.

Not sure about how Gentoo handles such cases.
Comment 37 Anthony Ryan 2013-02-21 13:20:15 UTC
I just thought I'd update this based on brief discussion I had with the upstream (link: http://forum.xbmc.org/showthread.php?tid=157025 ).

This ebuild, while completely necessary for airplay (airtunes specifically) to function, is not actually "libshairport", but rather the XBMC patched version of the library, which is on the roadmap for deprecation within XBMC.

I would argue that if this ebuild were to be included, it should be re-labeled xbmc-libshairport rather than libshairport which might be confusing. Additionally, it should be removed from the portage tree entirely once it's been properly deprecated in XBMC.
Comment 38 hal 2013-02-21 14:16:37 UTC
(In reply to comment #37)
> I just thought I'd update this based on brief discussion I had with the
> upstream (link: http://forum.xbmc.org/showthread.php?tid=157025 ).
> 
> This ebuild, while completely necessary for airplay (airtunes specifically)
> to function, is not actually "libshairport", but rather the XBMC patched
> version of the library, which is on the roadmap for deprecation within XBMC.
> 
> I would argue that if this ebuild were to be included, it should be
> re-labeled xbmc-libshairport rather than libshairport which might be
> confusing. Additionally, it should be removed from the portage tree entirely
> once it's been properly deprecated in XBMC.

Thank you very much for clearing things up!
I completely agree with your last comment.

I'm going to attach an updated ebuild in a few minutes.
It will only support the git master branch and a git snapshot which we can nail down to a specific commit,

e.g. media-plugins/xbmc-libshairport-1.2.0.20310_pre21022013.ebuild

So I completely dropped the patches and the source of the original code and added libao dependency.
Comment 39 hal 2013-02-21 14:19:03 UTC
Created attachment 339574 [details]
Updated ebuild to include libao as a dependency. Drops support for original unmaintained upstream source.
Comment 40 hal 2013-02-21 14:23:00 UTC
Created attachment 339576 [details, diff]
Patch for xbmc-9999.ebuild
Comment 41 hal 2013-02-21 14:38:48 UTC
Would it make sense to rename the ebuild to

media-plugins/xbmc-addon-libshairport-1.2.0.20310_pre21022013.ebuild

since there is already

media-lugins/xbmc-addon-xvdr?
Comment 42 hal 2013-02-21 19:03:29 UTC
Created attachment 339620 [details]
xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild

- Corrected timestamp in ebuild name according to gentoo policies
- Renamed ebuild to match existing xbmc addons in portage tree
Comment 43 hal 2013-02-21 19:04:40 UTC
Created attachment 339622 [details, diff]
xbmc-9999.ebuild.airtunes.patch

- Applied changes from libshairport ebuild to xbmc-9999 patch
Comment 44 hal 2013-02-22 12:48:11 UTC
Created attachment 339686 [details]
xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild

- Removed $S
- Removed unnecessary else-statement for EGIT_REPO_URI
Comment 45 hal 2013-02-22 13:22:16 UTC
(In reply to comment #37)
> I just thought I'd update this based on brief discussion I had with the
> upstream (link: http://forum.xbmc.org/showthread.php?tid=157025 ).
> 
> This ebuild, while completely necessary for airplay (airtunes specifically)
> to function, is not actually "libshairport", but rather the XBMC patched
> version of the library, which is on the roadmap for deprecation within XBMC.
> 
> I would argue that if this ebuild were to be included, it should be
> re-labeled xbmc-libshairport rather than libshairport which might be
> confusing. Additionally, it should be removed from the portage tree entirely
> once it's been properly deprecated in XBMC.

FYI I just submitted an ebuild for libairplay: https://bugs.gentoo.org/show_bug.cgi?id=458734
Comment 46 hal 2013-02-22 13:24:35 UTC
Created attachment 339694 [details]
xbmc-addon-libshairport-1.2.0.20310_pre20130221.ebuild

- Fixed date format in $MY_PV
Comment 47 hal 2013-05-04 11:02:42 UTC
This ebuild is obsolete since upstream has merged the unified airplay branch into master.

Details: https://github.com/xbmc/xbmc/pull/2631

An ebuild for libshairplay is available in this bug report:
https://bugs.gentoo.org/show_bug.cgi?id=458734