mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
libsrtp2: add recipe
This commit is contained in:
76
net-libs/libsrtp/libsrtp2-2.5.0.recipe
Normal file
76
net-libs/libsrtp/libsrtp2-2.5.0.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="Secure RTP (SRTP) Reference Implementation"
|
||||
DESCRIPTION="This package provides an implementation of the Secure Real-time \
|
||||
Transport Protocol (SRTP), the Universal Security Transform (UST), and \
|
||||
a supporting cryptographic kernel."
|
||||
HOMEPAGE="https://github.com/cisco/libsrtp/"
|
||||
COPYRIGHT="2001-2023 Cisco Systems, Inc."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="8a43ef8e9ae2b665292591af62aa1a4ae41e468b6d98d8258f91478735da4e09"
|
||||
SOURCE_DIR="libsrtp-$portVersion"
|
||||
PATCHES="libsrtp-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all ?x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
libsrtp2$secondaryArchSuffix = $portVersion
|
||||
lib:libsrtp2$secondaryArchSuffix = 1
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libsrtp2${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libsrtp2$secondaryArchSuffix = 1
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libsrtp2$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:meson
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export LDFLAGS="-lnetwork"
|
||||
|
||||
meson \
|
||||
--buildtype=release \
|
||||
--prefix=$prefix \
|
||||
--libdir=$libDir \
|
||||
--libexecdir=$binDir \
|
||||
--datadir=$dataDir \
|
||||
--includedir=$includeDir \
|
||||
-Dcrypto-library=openssl \
|
||||
_build
|
||||
|
||||
ninja -C _build
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
ninja -C _build install
|
||||
|
||||
# prepare development lib links
|
||||
prepareInstalledDevelLib libsrtp2
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
36
net-libs/libsrtp/patches/libsrtp-2.5.0.patchset
Normal file
36
net-libs/libsrtp/patches/libsrtp-2.5.0.patchset
Normal file
@@ -0,0 +1,36 @@
|
||||
From 0080247d1348a3e25b3f8e6d6580a8711ecbb3b9 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 12 Feb 2023 13:26:04 +1000
|
||||
Subject: Haiku fix
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3d9e4a9..cc40f17 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -273,6 +273,9 @@ if(WIN32)
|
||||
target_link_libraries(srtp2 ws2_32)
|
||||
target_compile_definitions(srtp2 PUBLIC _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
+if(HAIKU)
|
||||
+ target_link_libraries(srtp2 network)
|
||||
+endif()
|
||||
|
||||
install(TARGETS srtp2 DESTINATION lib
|
||||
EXPORT libSRTPTargets
|
||||
diff --git a/test/cutest.h b/test/cutest.h
|
||||
index 94e1087..9a10fac 100644
|
||||
--- a/test/cutest.h
|
||||
+++ b/test/cutest.h
|
||||
@@ -91,7 +91,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__)
|
||||
+#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__)
|
||||
#define CUTEST_UNIX__ 1
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
--
|
||||
2.37.3
|
||||
|
||||
Reference in New Issue
Block a user