commit:     e8c4597e86598c495ea4e4dd43897c52941b4b08
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 10:03:15 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 10:03:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8c4597e

media-plugins/live: bump to 2017.10.28 and fix build with recent glibc versions.

Closes: https://bugs.gentoo.org/634152
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 media-plugins/live/Manifest                  |   1 +
 media-plugins/live/files/config.gentoo-r1    |  17 ++++
 media-plugins/live/files/config.gentoo-so-r2 |  17 ++++
 media-plugins/live/live-2017.10.28.ebuild    | 128 +++++++++++++++++++++++++++
 4 files changed, 163 insertions(+)

diff --git a/media-plugins/live/Manifest b/media-plugins/live/Manifest
index da25a871d49..c83b652e2b4 100644
--- a/media-plugins/live/Manifest
+++ b/media-plugins/live/Manifest
@@ -3,3 +3,4 @@ DIST live.2017.05.24.tar.gz 629181 BLAKE2B 
2cf6218777991fe68b10f130f04691cc98a4e
 DIST live.2017.06.04.tar.gz 629288 BLAKE2B 
df2e99ab348b92de1b3ac60b53e9f80a41a8307160f78b5bc8f97385210a4b45f0b4bb9359a3b1574880b6d15a09506aa654100ca5360041c3ac31e9c9698687
 SHA512 
89eb3854c2ef7d0a1f443b4ca46c66040dfcc586ffd1e3e08c1b9e831eae6ade1c16e628c0ed0e7804c4e7430993f662e3fe8df2f09903024153d188276c3088
 DIST live.2017.07.18.tar.gz 629395 BLAKE2B 
79a7a31b65d6a116ab36f6f9c590df0957ce84810cb4ac6ae101ae6185bbe80cbbea68a45a0119cb2acb75f7f7647b4f4006449e82b5f02b597f3048bf322d58
 SHA512 
49e164203a73a94629e66fcf48fde5f937b2c4724a0d4026b1970a8118039ce5cec393b777dea7439c09d3b0789f9f9d7f6f8a5328c4a3dd78a95e05b6525586
 DIST live.2017.09.12.tar.gz 629538 BLAKE2B 
6f2b08d6b73a287663ec2c40faa7ff8b955aea7ca261d3eec69d85ea77f26ee951d14c3aedac48d84be0bdaafccc7a721d83974ce0fc8693aecc63984f377fbe
 SHA512 
09b18b5f5dce28519b6c7cd8d52eb3448711939df051f84c8d6dce0b88d05c982711059f2ce13efccd326b2dbfeb93b88c4e03fe4a88bbd8fcefcb25e51d107d
+DIST live.2017.10.28.tar.gz 629858 BLAKE2B 
a1d862ae1356b46fcd4e5ef7e27c47d3fb3abac35add6feb7955f60ddbd93e9242a84102393de67dda0d39c09632a0cc9a5f54d30c9f91d005696d3a566258bd
 SHA512 
eea5bdb8d89e76c8b6aeb6ec04b77af3048cb41f228d230ba4da6045e9bc691a456023d44d8650fe690b08143567ed5af5b633f5b6522debff79344a813dc7d0

diff --git a/media-plugins/live/files/config.gentoo-r1 
b/media-plugins/live/files/config.gentoo-r1
new file mode 100644
index 00000000000..d77fb19758a
--- /dev/null
+++ b/media-plugins/live/files/config.gentoo-r1
@@ -0,0 +1,17 @@
+COMPILE_OPTS =         $(INCLUDES) -I. -DSOCKLEN_T=socklen_t 
-D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DXLOCALE_NOT_USED
+C =                    c
+C_COMPILER =           $(CC)
+C_FLAGS =              $(COMPILE_OPTS) $(CFLAGS)
+CPP =                  cpp
+CPLUSPLUS_COMPILER =   $(CXX)
+CPLUSPLUS_FLAGS =      $(COMPILE_OPTS) $(CXXFLAGS)
+OBJ =                  o
+LINK =                 $(CXX) -o
+LINK_OPTS =            -L.
+CONSOLE_LINK_OPTS =    $(LINK_OPTS)
+LIBRARY_LINK =         $(LD) -o
+LIBRARY_LINK_OPTS =    $(LINK_OPTS) -r -Bstatic
+LIB_SUFFIX =                   a
+LIBS_FOR_CONSOLE_APPLICATION =
+LIBS_FOR_GUI_APPLICATION =
+EXE =

diff --git a/media-plugins/live/files/config.gentoo-so-r2 
b/media-plugins/live/files/config.gentoo-so-r2
new file mode 100644
index 00000000000..fb9241ef3e8
--- /dev/null
+++ b/media-plugins/live/files/config.gentoo-so-r2
@@ -0,0 +1,17 @@
+COMPILE_OPTS =         $(INCLUDES) -I. -DSOCKLEN_T=socklen_t 
-D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DXLOCALE_NOT_USED
+C =                    c
+C_COMPILER =           $(CC)
+C_FLAGS =              $(COMPILE_OPTS) -fPIC $(CFLAGS)
+CPP =                  cpp
+CPLUSPLUS_COMPILER =   $(CXX)
+CPLUSPLUS_FLAGS =      $(COMPILE_OPTS) -fPIC $(CXXFLAGS)
+OBJ =                  o
+LINK =                 $(CXX) -o
+LINK_OPTS =            -L.
+CONSOLE_LINK_OPTS =    $(LINK_OPTS)
+LIBRARY_LINK =         $(CXX) -o
+LIBRARY_LINK_OPTS =    $(LINK_OPTS) -shared -Wl,-soname,$@
+LIB_SUFFIX =                   so
+LIBS_FOR_CONSOLE_APPLICATION =
+LIBS_FOR_GUI_APPLICATION =
+EXE =

diff --git a/media-plugins/live/live-2017.10.28.ebuild 
b/media-plugins/live/live-2017.10.28.ebuild
new file mode 100644
index 00000000000..c6ce728a574
--- /dev/null
+++ b/media-plugins/live/live-2017.10.28.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic eutils toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="Libraries for standards-based RTP/RTCP/RTSP multimedia streaming"
+HOMEPAGE="http://www.live555.com/";
+SRC_URI="http://www.live555.com/liveMedia/public/${P/-/.}.tar.gz
+       mirror://gentoo/${P/-/.}.tar.gz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos 
~sparc-solaris ~x86-solaris"
+IUSE="examples static-libs"
+DOCS=( "live-shared/README" )
+
+# Alexis Ballier <[email protected]>
+# Be careful, bump this everytime you bump the package and the ABI has changed.
+# If you don't know, ask someone.
+LIVE_ABI_VERSION=7
+SLOT="0/${LIVE_ABI_VERSION}"
+
+src_unpack() {
+       unpack ${A}
+       mkdir -p "${S}"
+       mv "${WORKDIR}/live" "${S}/" || die
+}
+
+src_prepare() {
+       epatch "${FILESDIR}/${PN}-recursive3.patch"
+
+       if use static-libs ; then
+               cp -pPR live live-shared
+               mv live live-static
+       else
+               mv live live-shared
+       fi
+
+       use static-libs && cp "${FILESDIR}/config.gentoo-r1" 
live-static/config.gentoo
+       cp "${FILESDIR}/config.gentoo-so-r2" live-shared/config.gentoo-so-r1
+
+       case ${CHOST} in
+               *-solaris*)
+                       use static-libs && { sed -i \
+                               -e '/^COMPILE_OPTS /s/$/ -DSOLARIS 
-DXLOCALE_NOT_USED/' \
+                               -e '/^LIBS_FOR_CONSOLE_APPLICATION /s/$/ 
-lsocket -lnsl/' \
+                               live-static/config.gentoo \
+                               || die ; }
+                       sed -i \
+                               -e '/^COMPILE_OPTS /s/$/ -DSOLARIS 
-DXLOCALE_NOT_USED/' \
+                               -e '/^LIBS_FOR_CONSOLE_APPLICATION /s/$/ 
-lsocket -lnsl/' \
+                               live-shared/config.gentoo-so-r1 \
+                               || die
+               ;;
+               *-darwin*)
+                       use static-libs && { sed -i \
+                               -e '/^COMPILE_OPTS /s/$/ -DBSD=1 
-DHAVE_SOCKADDR_LEN=1/' \
+                               -e '/^LINK /s/$/ /' \
+                               -e '/^LIBRARY_LINK /s/$/ /' \
+                               -e '/^LIBRARY_LINK_OPTS /s/-Bstatic//' \
+                               live-static/config.gentoo \
+                               || die static ; }
+                       sed -i \
+                               -e '/^COMPILE_OPTS /s/$/ -DBSD=1 
-DHAVE_SOCKADDR_LEN=1/' \
+                               -e '/^LINK /s/$/ /' \
+                               -e '/^LIBRARY_LINK /s/=.*$/= $(CXX) -o /' \
+                               -e '/^LIBRARY_LINK_OPTS 
/s:-shared.*$:-undefined suppress -flat_namespace -dynamiclib -install_name 
'"${EPREFIX}/usr/$(get_libdir)/"'$@:' \
+                               -e '/^LIB_SUFFIX /s/so/dylib/' \
+                               live-shared/config.gentoo-so-r1 \
+                               || die shared
+               ;;
+       esac
+       multilib_copy_sources
+}
+
+src_configure() { :; }
+
+multilib_src_compile() {
+       tc-export CC CXX LD
+
+       if use static-libs ; then
+               cd "${BUILD_DIR}/live-static"
+
+               einfo "Beginning static library build"
+               ./genMakefiles gentoo
+               emake -j1 LINK_OPTS="-L. $(raw-ldflags)" || die "failed to 
build static libraries"
+       fi
+
+       cd "${BUILD_DIR}/live-shared"
+       einfo "Beginning shared library build"
+       ./genMakefiles gentoo-so-r1
+       local suffix=$(get_libname ${LIVE_ABI_VERSION})
+       emake -j1 LINK_OPTS="-L. ${LDFLAGS}" LIB_SUFFIX="${suffix#.}" || die 
"failed to build shared libraries"
+
+       for i in liveMedia groupsock UsageEnvironment BasicUsageEnvironment ; do
+               pushd "${BUILD_DIR}/live-shared/${i}" > /dev/null
+               ln -s lib${i}.${suffix#.} lib${i}$(get_libname) || die
+               popd > /dev/null
+       done
+
+       if multilib_is_native_abi; then
+               einfo "Beginning programs build"
+               for i in $(use examples && echo "testProgs") proxyServer 
mediaServer ; do
+                       cd "${BUILD_DIR}/live-shared/${i}"
+                       emake LINK_OPTS="-L. ${LDFLAGS}" || die "failed to 
build test programs"
+               done
+       fi
+}
+
+multilib_src_install() {
+       for library in UsageEnvironment liveMedia BasicUsageEnvironment 
groupsock; do
+               use static-libs && dolib.a 
live-static/${library}/lib${library}.a
+               dolib.so live-shared/${library}/lib${library}$(get_libname 
${LIVE_ABI_VERSION})
+               dosym lib${library}$(get_libname ${LIVE_ABI_VERSION}) 
/usr/$(get_libdir)/lib${library}$(get_libname)
+
+               insinto /usr/include/${library}
+               doins live-shared/${library}/include/*h
+       done
+
+       if multilib_is_native_abi; then
+               # Should we really install these?
+               use examples && find live-shared/testProgs -type f -perm 755 
-print0 | \
+                       xargs -0 dobin
+
+               dobin live-shared/mediaServer/live555MediaServer
+               dobin live-shared/proxyServer/live555ProxyServer
+       fi
+}

Reply via email to