From b82c77d1df9451525c72b9ab57b64a51d30d85c5 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Sun, 29 May 2022 20:03:11 +0200 Subject: [PATCH] New package: srt-1.4.4 --- common/shlibs | 1 + srcpkgs/libsrt | 1 + srcpkgs/srt-devel | 1 + srcpkgs/srt/patches/compiler.patch | 23 +++++++++++++++++ srcpkgs/srt/patches/dynamic-link.patch | 21 ++++++++++++++++ srcpkgs/srt/template | 35 ++++++++++++++++++++++++++ 6 files changed, 82 insertions(+) create mode 120000 srcpkgs/libsrt create mode 120000 srcpkgs/srt-devel create mode 100644 srcpkgs/srt/patches/compiler.patch create mode 100644 srcpkgs/srt/patches/dynamic-link.patch create mode 100644 srcpkgs/srt/template diff --git a/common/shlibs b/common/shlibs index c1deadaf9eb..8ed7c948eed 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4061,6 +4061,7 @@ libmariadbd.so.19 libmariadbclient-10.5.9_1 libinstpatch-1.0.so.2 libinstpatch-1.1.6_1 libbasu.so.0 basu-0.2.0_1 libhomfly.so.0 libhomfly-1.02r6_1 +libsrt.so.1.4 libsrt-1.4.4_1 libXcomp.so.3 nx-libs-3.5.99.24_1 libXcompshad.so.3 nx-libs-3.5.99.24_1 libNX_X11.so.6 nx-libs-3.5.99.24_1 diff --git a/srcpkgs/libsrt b/srcpkgs/libsrt new file mode 120000 index 00000000000..c9e6a08910c --- /dev/null +++ b/srcpkgs/libsrt @@ -0,0 +1 @@ +srt \ No newline at end of file diff --git a/srcpkgs/srt-devel b/srcpkgs/srt-devel new file mode 120000 index 00000000000..c9e6a08910c --- /dev/null +++ b/srcpkgs/srt-devel @@ -0,0 +1 @@ +srt \ No newline at end of file diff --git a/srcpkgs/srt/patches/compiler.patch b/srcpkgs/srt/patches/compiler.patch new file mode 100644 index 00000000000..73852e06100 --- /dev/null +++ b/srcpkgs/srt/patches/compiler.patch @@ -0,0 +1,23 @@ +Use the compiler we setup instead of trying to construct it in cmake +with prefixes. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -211,7 +211,7 @@ + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + +-if (NOT DEFINED WITH_COMPILER_TYPE) ++if (DEFINED FOO) + + # This is for a case when you provided the prefix, but you didn't + # provide compiler type. This option is in this form predicted to work +@@ -227,7 +227,7 @@ + set (USING_DEFAULT_COMPILER_PREFIX 1) + endif() + +-if (NOT USING_DEFAULT_COMPILER_PREFIX OR DEFINED WITH_COMPILER_PREFIX) ++if (DEFINED FOO) + message(STATUS "Handling compiler with PREFIX=${WITH_COMPILER_PREFIX} TYPE=${WITH_COMPILER_TYPE}") + + parse_compiler_type(${WITH_COMPILER_TYPE} COMPILER_TYPE COMPILER_SUFFIX) diff --git a/srcpkgs/srt/patches/dynamic-link.patch b/srcpkgs/srt/patches/dynamic-link.patch new file mode 100644 index 00000000000..cce249b66a3 --- /dev/null +++ b/srcpkgs/srt/patches/dynamic-link.patch @@ -0,0 +1,21 @@ +Dynamically link libsrt + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1061,13 +1061,13 @@ + # If static is available, link apps against static one. + # Otherwise link against shared one. + +-if (srt_libspec_static) ++if(srt_libspec_shared) ++ set (srt_link_library ${TARGET_srt}_shared) ++elseif(srt_libspec_static) + set (srt_link_library ${TARGET_srt}_static) + if (ENABLE_RELATIVE_LIBPATH) + message(STATUS "ENABLE_RELATIVE_LIBPATH=ON will be ignored due to static linking.") + endif() +-elseif(srt_libspec_shared) +- set (srt_link_library ${TARGET_srt}_shared) + else() + message(FATAL_ERROR "Either ENABLE_STATIC or ENABLE_SHARED has to be ON!") + endif() diff --git a/srcpkgs/srt/template b/srcpkgs/srt/template new file mode 100644 index 00000000000..7d90b1be33b --- /dev/null +++ b/srcpkgs/srt/template @@ -0,0 +1,35 @@ +# Template file for 'srt' +pkgname=srt +version=1.4.4 +revision=1 +build_style=cmake +configure_args=" + -DCMAKE_INSTALL_BINDIR=bin + -DCMAKE_INSTALL_INCLUDEDIR=include" +hostmakedepends="pkg-config" +makedepends="openssl-devel" +short_desc="Secure, Reliable, Transport" +maintainer="Duncaen " +license="MPL-2.0" +homepage="https://github.com/Haivision/srt" +distfiles="https://github.com/Haivision/srt/archive/refs/tags/v${version}.tar.gz" +checksum=93f5f3715bd5bd522b8d65fc0d086ef2ad49db6a41ad2d7b35df2e8bd7094114 + +libsrt_package() { + depends="libsrt>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove "usr/lib/*.so.*" + } +} + +srt-devel_package() { + depends="libsrt>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +}