Lines 1-9
Link Here
|
1 |
# Copyright 1999-2011 Gentoo Foundation |
1 |
# Copyright 1999-2011 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-plugins/live/live-2011.06.16.ebuild,v 1.1 2011/06/22 14:28:26 aballier Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-plugins/live/live-2011.06.16.ebuild,v 1.1 2011/06/22 14:28:26 aballier Exp $ |
4 |
|
4 |
|
5 |
EAPI=3 |
5 |
EAPI=4 |
6 |
inherit flag-o-matic eutils toolchain-funcs multilib |
6 |
|
|
|
7 |
inherit eutils toolchain-funcs multilib |
7 |
|
8 |
|
8 |
DESCRIPTION="Source-code libraries for standards-based RTP/RTCP/RTSP multimedia streaming, suitable for embedded and/or low-cost streaming applications" |
9 |
DESCRIPTION="Source-code libraries for standards-based RTP/RTCP/RTSP multimedia streaming, suitable for embedded and/or low-cost streaming applications" |
9 |
HOMEPAGE="http://www.live555.com/" |
10 |
HOMEPAGE="http://www.live555.com/" |
Lines 22-43
Link Here
|
22 |
LIVE_ABI_VERSION=4 |
23 |
LIVE_ABI_VERSION=4 |
23 |
|
24 |
|
24 |
src_prepare() { |
25 |
src_prepare() { |
25 |
cd "${WORKDIR}" |
26 |
epatch "${FILESDIR}"/${PN}-2009.09.28-buildorder.patch |
26 |
epatch "${FILESDIR}/${PN}-recursive.patch" |
27 |
epatch "${FILESDIR}/${PN}-recursive.patch" |
27 |
|
28 |
|
28 |
cp -pPR live live-shared |
29 |
cp -pPR live live-shared || die |
29 |
mv live live-static |
30 |
pushd live-shared || die |
|
|
31 |
# To build shared libraries with proper NEEDED entries, we need |
32 |
# these libraries to link to eachother. This patch does this. |
33 |
epatch "${FILESDIR}"/${PN}-2009.06.02-libdeps.patch |
34 |
popd || die |
35 |
|
36 |
mv live live-static || die |
30 |
|
37 |
|
31 |
cp "${FILESDIR}/config.gentoo" live-static |
38 |
cp "${FILESDIR}"/config.gentoo-r1 live-static/ || die |
32 |
cp "${FILESDIR}/config.gentoo-so-r1" live-shared |
39 |
cp "${FILESDIR}"/config.gentoo-so-r2 live-shared/ || die |
33 |
|
40 |
|
34 |
case ${CHOST} in |
41 |
case ${CHOST} in |
35 |
*-solaris*) |
42 |
*-solaris*) |
36 |
sed -i \ |
43 |
sed -i \ |
37 |
-e '/^COMPILE_OPTS /s/$/ -DSOLARIS/' \ |
44 |
-e '/^COMPILE_OPTS /s/$/ -DSOLARIS/' \ |
38 |
-e '/^LIBS_FOR_CONSOLE_APPLICATION /s/$/ -lsocket -lnsl/' \ |
45 |
-e '/^LIBS_FOR_CONSOLE_APPLICATION /s/$/ -lsocket -lnsl/' \ |
39 |
live-static/config.gentoo \ |
46 |
live-static/config.gentoo-r1 \ |
40 |
live-shared/config.gentoo-so-r1 \ |
47 |
live-shared/config.gentoo-so-r2 \ |
41 |
|| die |
48 |
|| die |
42 |
;; |
49 |
;; |
43 |
*-darwin*) |
50 |
*-darwin*) |
Lines 46-104
Link Here
|
46 |
-e '/^LINK /s/$/ /' \ |
53 |
-e '/^LINK /s/$/ /' \ |
47 |
-e '/^LIBRARY_LINK /s/$/ /' \ |
54 |
-e '/^LIBRARY_LINK /s/$/ /' \ |
48 |
-e '/^LIBRARY_LINK_OPTS /s/-Bstatic//' \ |
55 |
-e '/^LIBRARY_LINK_OPTS /s/-Bstatic//' \ |
49 |
live-static/config.gentoo \ |
56 |
live-static/config.gentoo-r1 \ |
50 |
|| die static |
57 |
|| die static |
51 |
sed -i \ |
58 |
sed -i \ |
52 |
-e '/^COMPILE_OPTS /s/$/ -DBSD=1 -DHAVE_SOCKADDR_LEN=1/' \ |
59 |
-e '/^COMPILE_OPTS /s/$/ -DBSD=1 -DHAVE_SOCKADDR_LEN=1/' \ |
53 |
-e '/^LINK /s/$/ /' \ |
60 |
-e '/^LINK /s/$/ /' \ |
54 |
-e '/^LIBRARY_LINK /s/=.*$/= $(CXX) -o /' \ |
61 |
-e '/^LIBRARY_LINK /s/=.*$/= $(CXX) -o /' \ |
55 |
-e '/^LIBRARY_LINK_OPTS /s:-shared.*$:-undefined suppress -flat_namespace -dynamiclib -install_name '"${EPREFIX}/usr/$(get_libdir)/"'$@:' \ |
62 |
-e '/^LIBRARY_LINK_OPTS /s:-shared.*$:-undefined suppress -flat_namespace -dynamiclib -install_name '"${EPREFIX}/usr/$(get_libdir)/"'$@:' \ |
56 |
live-shared/config.gentoo-so-r1 \ |
63 |
live-shared/config.gentoo-so-r2 \ |
57 |
|| die shared |
64 |
|| die shared |
58 |
;; |
65 |
;; |
59 |
esac |
66 |
esac |
60 |
} |
67 |
} |
61 |
|
68 |
|
62 |
src_configure() { :; } |
69 |
src_configure() { |
|
|
70 |
tc-export CC CXX |
71 |
export LIVE_ABI_VERSION LIBDIR=/usr/"$(get_libdir)" |
63 |
|
72 |
|
64 |
src_compile() { |
73 |
cd "${WORKDIR}"/${PN}-static || die |
65 |
tc-export CC CXX LD |
74 |
./genMakefiles gentoo-r1 || die |
66 |
|
75 |
|
67 |
cd "${WORKDIR}/live-static" |
76 |
cd "${WORKDIR}"/${PN}-shared || die |
|
|
77 |
./genMakefiles gentoo-so-r2 || die |
78 |
} |
68 |
|
79 |
|
|
|
80 |
src_compile() { |
69 |
einfo "Beginning static library build" |
81 |
einfo "Beginning static library build" |
70 |
./genMakefiles gentoo |
82 |
emake -C ${PN}-static -j1 |
71 |
emake -j1 LINK_OPTS="-L. $(raw-ldflags)" || die "failed to build static libraries" |
|
|
72 |
|
83 |
|
73 |
einfo "Beginning programs build" |
|
|
74 |
cd "${WORKDIR}/live-static/testProgs" |
75 |
emake LINK_OPTS="-L. ${LDFLAGS}" || die "failed to build test programs" |
76 |
cd "${WORKDIR}/live-static/mediaServer" |
77 |
emake LINK_OPTS="-L. ${LDFLAGS}" || die "failed to build the mediaserver" |
78 |
|
79 |
cd "${WORKDIR}/live-shared" |
80 |
einfo "Beginning shared library build" |
84 |
einfo "Beginning shared library build" |
81 |
./genMakefiles gentoo-so-r1 |
85 |
emake -C ${PN}-shared -j1 |
82 |
local suffix=$(get_libname ${LIVE_ABI_VERSION}) |
86 |
|
83 |
emake -j1 LINK_OPTS="-L. ${LDFLAGS}" LIB_SUFFIX="${suffix#.}" || die "failed to build shared libraries" |
87 |
einfo "Beginning programs build" |
|
|
88 |
emake -C ${PN}-shared/testProgs |
89 |
emake -C ${PN}-shared/mediaServer |
84 |
} |
90 |
} |
85 |
|
91 |
|
86 |
src_install() { |
92 |
src_install() { |
87 |
for library in UsageEnvironment liveMedia BasicUsageEnvironment groupsock; do |
93 |
for library in UsageEnvironment liveMedia BasicUsageEnvironment groupsock; do |
88 |
dolib.a live-static/${library}/lib${library}.a |
94 |
dolib.a live-static/${library}/lib${library}.a |
89 |
dolib.so live-shared/${library}/lib${library}$(get_libname ${LIVE_ABI_VERSION}) |
95 |
|
90 |
dosym lib${library}$(get_libname ${LIVE_ABI_VERSION}) /usr/$(get_libdir)/lib${library}$(get_libname) |
96 |
mv ${PN}-shared/${library}/lib${library}.so{,.${LIVE_ABI_VERSION}} || die |
|
|
97 |
dolib.so ${PN}-shared/${library}/lib${library}.so.${LIVE_ABI_VERSION} |
98 |
dosym lib${library}.so.${LIVE_ABI_VERSION} /usr/$(get_libdir)/lib${library}.so |
91 |
|
99 |
|
92 |
insinto /usr/include/${library} |
100 |
insinto /usr/include/${library} |
93 |
doins live-shared/${library}/include/*h |
101 |
doins live-shared/${library}/include/*h |
94 |
done |
102 |
done |
95 |
|
103 |
|
96 |
# Should we really install these? |
104 |
# Should we really install these? |
97 |
find live-static/testProgs -type f -perm +111 -print0 | \ |
105 |
find live-shared/testProgs -type f -perm +111 -print0 | \ |
98 |
xargs -0 dobin |
106 |
xargs -0 dobin |
99 |
|
107 |
|
100 |
#install included live555MediaServer aplication |
108 |
#install included live555MediaServer aplication |
101 |
dobin live-static/mediaServer/live555MediaServer |
109 |
dobin live-shared/mediaServer/live555MediaServer |
102 |
|
110 |
|
103 |
# install docs |
111 |
# install docs |
104 |
dodoc live-static/README |
112 |
dodoc live-static/README |