diff options
author | davidovski <david@davidovski.xyz> | 2023-02-02 14:10:02 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-02-02 14:10:02 +0000 |
commit | f29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch) | |
tree | 76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/live-media | |
parent | 05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff) |
Work
Diffstat (limited to 'repo/live-media')
3 files changed, 159 insertions, 0 deletions
diff --git a/repo/live-media/0001-Add-a-pkg-config-file-for-the-shared-libraries.patch b/repo/live-media/0001-Add-a-pkg-config-file-for-the-shared-libraries.patch new file mode 100644 index 0000000..a2ae1c1 --- /dev/null +++ b/repo/live-media/0001-Add-a-pkg-config-file-for-the-shared-libraries.patch @@ -0,0 +1,66 @@ +From: Benjamin Drung <bdrung@debian.org> +Date: Sat, 16 Sep 2017 11:22:03 +0200 +Subject: Add a pkg-config file for the shared libraries + +This patch was downloaded from Debian +https://sources.debian.org/src/liblivemedia/2018.08.05-1/debian/patches/0002-Add-a-pkg-config-file-for-the-shared-libraries.patch/ + +The local/ part of PREXIX and LIBDIR was removed to fit into buildroot. + +A similar version of this patch is part of the vlc source repo: +http://git.videolan.org/?p=vlc.git;a=blob;f=contrib/src/live555/add-pkgconfig-file.patch;hb=HEAD + +Upstream status: Rejected +http://lists.live555.com/pipermail/live-devel/2013-January/016374.html +http://lists.live555.com/pipermail/live-devel/2013-January/016375.html + +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> +--- + Makefile.head | 3 +++ + Makefile.tail | 7 ++++++- + live555.pc.in | 9 +++++++++ + 3 files changed, 18 insertions(+), 1 deletion(-) + create mode 100644 live555.pc.in + +diff --git a/Makefile.head b/Makefile.head +index 458c54c..1571037 100644 +--- a/Makefile.head ++++ b/Makefile.head +@@ -1 +1,4 @@ ++PREFIX = /usr ++LIBDIR = /usr/lib ++VERSION = $(shell grep LIVEMEDIA_LIBRARY_VERSION_STRING liveMedia/include/liveMedia_version.hh | sed 's/.*"\([^"]*\)".*/\1/') + ##### Change the following for your environment: +diff --git a/Makefile.tail b/Makefile.tail +index fc594ea..a20a527 100644 +--- a/Makefile.tail ++++ b/Makefile.tail +@@ -22,7 +22,12 @@ all: + @echo + @echo "For more information about this source code (including your obligations under the LGPL), please see our FAQ at http://live555.com/liveMedia/faq.html" + +-install: ++install_shared_libraries: ++ install -d $(DESTDIR)$(LIBDIR)/pkgconfig ++ sed "s#@PREFIX@#$(PREFIX)#;s#@LIBDIR@#$(LIBDIR)#;s#@VERSION@#$(VERSION)#" live555.pc.in > $(DESTDIR)$(LIBDIR)/pkgconfig/live555.pc ++ chmod 644 $(DESTDIR)$(LIBDIR)/pkgconfig/live555.pc ++ ++install: $(INSTALL2) + cd $(LIVEMEDIA_DIR) ; $(MAKE) install + cd $(GROUPSOCK_DIR) ; $(MAKE) install + cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) install +diff --git a/live555.pc.in b/live555.pc.in +new file mode 100644 +index 0000000..3736944 +--- /dev/null ++++ b/live555.pc.in +@@ -0,0 +1,9 @@ ++prefix=@PREFIX@ ++libdir=@LIBDIR@ ++includedir=${prefix}/include ++ ++Name: live555 ++Description: multimedia RTSP streaming library ++Version: @VERSION@ ++Cflags: -I${includedir}/liveMedia -I${includedir}/groupsock -I${includedir}/BasicUsageEnvironment -I${includedir}/UsageEnvironment ++Libs: -L${libdir} -lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment diff --git a/repo/live-media/0003-Link-shared-libraries-with-g-instead-of-gcc-to-fix-b.patch b/repo/live-media/0003-Link-shared-libraries-with-g-instead-of-gcc-to-fix-b.patch new file mode 100644 index 0000000..b463a1a --- /dev/null +++ b/repo/live-media/0003-Link-shared-libraries-with-g-instead-of-gcc-to-fix-b.patch @@ -0,0 +1,49 @@ +From: Benjamin Drung <bdrung@debian.org> +Date: Sat, 16 Sep 2017 11:22:04 +0200 +Subject: Link shared libraries with g++ instead of gcc to fix build failure + +--- + config.linux | 6 +++--- + config.linux-with-shared-libraries | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config.linux b/config.linux +index b4021ef..efff3a9 100644 +--- a/config.linux ++++ b/config.linux +@@ -1,12 +1,12 @@ + COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 + C = c +-C_COMPILER = cc ++C_COMPILER = $(CC) + C_FLAGS = $(COMPILE_OPTS) $(CPPFLAGS) $(CFLAGS) + CPP = cpp +-CPLUSPLUS_COMPILER = c++ ++CPLUSPLUS_COMPILER = $(CXX) + CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 $(CPPFLAGS) $(CXXFLAGS) + OBJ = o +-LINK = c++ -o ++LINK = $(CXX) -o + LINK_OPTS = -L. $(LDFLAGS) + CONSOLE_LINK_OPTS = $(LINK_OPTS) + LIBRARY_LINK = ar cr +diff --git a/config.linux-with-shared-libraries b/config.linux-with-shared-libraries +index 04d0ea0..2ae04ef 100644 +--- a/config.linux-with-shared-libraries ++++ b/config.linux-with-shared-libraries +@@ -33,12 +33,12 @@ CPLUSPLUS_COMPILER = $(CXX) + CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1 $(CPPFLAGS) $(CXXFLAGS) + OBJ = o + LINK = $(CXX) -o +-LINK_OPTS = -L. $(LDFLAGS) ++LINK_OPTS = -L. $(CPPFLAGS) $(LDFLAGS) + CONSOLE_LINK_OPTS = $(LINK_OPTS) +-LIBRARY_LINK = $(CC) -o ++LIBRARY_LINK = $(CXX) -o + SHORT_LIB_SUFFIX = so.$(shell expr $($(NAME)_VERSION_CURRENT) - $($(NAME)_VERSION_AGE)) + LIB_SUFFIX = $(SHORT_LIB_SUFFIX).$($(NAME)_VERSION_AGE).$($(NAME)_VERSION_REVISION) +-LIBRARY_LINK_OPTS = -shared -Wl,-soname,$(NAME).$(SHORT_LIB_SUFFIX) $(LDFLAGS) ++LIBRARY_LINK_OPTS = -shared -Wl,-soname,$(NAME).$(SHORT_LIB_SUFFIX) $(CPPFLAGS) $(LDFLAGS) + LIBS_FOR_CONSOLE_APPLICATION = -lssl -lcrypto + LIBS_FOR_GUI_APPLICATION = + EXE = diff --git a/repo/live-media/live-media.xibuild b/repo/live-media/live-media.xibuild new file mode 100644 index 0000000..625ff78 --- /dev/null +++ b/repo/live-media/live-media.xibuild @@ -0,0 +1,44 @@ +#!/bin/sh + +NAME="live-media" +DESC="A set of C++ libraries for multimedia streaming" + +MAKEDEPS="openssl" + +PKG_VER=2022.07.14 +SOURCE="https://download.videolan.org/contrib/live555/live.$PKG_VER.tar.gz" + +ADDITIONAL=" +0001-Add-a-pkg-config-file-for-the-shared-libraries.patch +0003-Link-shared-libraries-with-g-instead-of-gcc-to-fix-b.patch +" + +prepare () { + apply_patches +} + +build() { + ./genMakefiles linux-with-shared-libraries + make PREFIX=/usr LIBDIR=/usr/lib +} + +package() { + local testprog f so + mkdir -p "$PKG_DEST"/usr/lib + for f in BasicUsageEnvironment UsageEnvironment liveMedia groupsock; do + mkdir -p "$PKG_DEST"/usr/include/$f + cp $f/include/*.h* "$PKG_DEST"/usr/include/$f + for so in $f/lib*.so.*; do + soname=$(scanelf -B --format "#F%S" $so) + cp $so "$PKG_DEST"/usr/lib/ + so=${so##*/} + ln -s $so "$PKG_DEST"/usr/lib/$soname + ln -s $so "$PKG_DEST"/usr/lib/${soname%.so.*}.so + done + done + + mkdir -p "$PKG_DEST"/usr/bin + for testprog in $(find testProgs -type f -perm 755); do + install $testprog "$PKG_DEST"/usr/bin + done +} |