Merge pull request #7982 from mingwandroid/live555
live-media: Update to 2021.02.11
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
From 226f23f13b628722da77f2ebe534422d223621e3 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 16:30:57 +0100
|
||||
Subject: [PATCH 1/7] Add a pkg-config file for the shared libraries. Author:
|
||||
Benjamin Drung <bdrung@debian.org>
|
||||
|
||||
---
|
||||
Makefile.head | 1 +
|
||||
Makefile.tail | 7 ++++++-
|
||||
live555.pc.in | 18 ++++++++++++++++++
|
||||
3 files changed, 25 insertions(+), 1 deletion(-)
|
||||
create mode 100644 live555.pc.in
|
||||
|
||||
diff --git a/Makefile.head b/Makefile.head
|
||||
index 458c54c..34c9dfa 100644
|
||||
--- a/Makefile.head
|
||||
+++ b/Makefile.head
|
||||
@@ -1 +1,2 @@
|
||||
+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 6c49b83..6dd0776 100644
|
||||
--- a/Makefile.tail
|
||||
+++ b/Makefile.tail
|
||||
@@ -25,7 +25,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..3fed3cb
|
||||
--- /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 -lssl -lcrypto
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
100
mingw-w64-live-media/0002-expose-server_string.patch
Normal file
100
mingw-w64-live-media/0002-expose-server_string.patch
Normal file
@@ -0,0 +1,100 @@
|
||||
From fccce9d5bacbdcaf50e4caad91c7f7d2493cbff7 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 16:36:56 +0100
|
||||
Subject: [PATCH 2/7] expose server_string
|
||||
|
||||
---
|
||||
liveMedia/RTSPClient.cpp | 11 +++++++++--
|
||||
liveMedia/include/RTSPClient.hh | 5 +++++
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/liveMedia/RTSPClient.cpp b/liveMedia/RTSPClient.cpp
|
||||
index 092e12e..18248bc 100644
|
||||
--- a/liveMedia/RTSPClient.cpp
|
||||
+++ b/liveMedia/RTSPClient.cpp
|
||||
@@ -382,7 +382,7 @@ RTSPClient::RTSPClient(UsageEnvironment& env, char const* rtspURL,
|
||||
desiredMaxIncomingPacketSize(0), fVerbosityLevel(verbosityLevel), fCSeq(1),
|
||||
fAllowBasicAuthentication(True), fTunnelOverHTTPPortNum(tunnelOverHTTPPortNum),
|
||||
fUserAgentHeaderStr(NULL), fUserAgentHeaderStrLen(0),
|
||||
- fInputSocketNum(-1), fOutputSocketNum(-1), fBaseURL(NULL), fTCPStreamIdCount(0),
|
||||
+ fInputSocketNum(-1), fOutputSocketNum(-1), fBaseURL(NULL), fserverString(NULL), fTCPStreamIdCount(0),
|
||||
fLastSessionId(NULL), fSessionTimeoutParameter(0), fSessionCookieCounter(0), fHTTPTunnelingConnectionIsPending(False),
|
||||
fTLS(*this) {
|
||||
setBaseURL(rtspURL);
|
||||
@@ -431,6 +431,7 @@ void RTSPClient::reset() {
|
||||
fRequestsAwaitingResponse.reset();
|
||||
|
||||
setBaseURL(NULL);
|
||||
+ setServerString(NULL);
|
||||
|
||||
fCurrentAuthenticator.reset();
|
||||
|
||||
@@ -441,6 +442,10 @@ void RTSPClient::setBaseURL(char const* url) {
|
||||
delete[] fBaseURL; fBaseURL = strDup(url);
|
||||
}
|
||||
|
||||
+void RTSPClient::setServerString(char const* str) {
|
||||
+ delete[] fserverString; fserverString = strDup(str);
|
||||
+}
|
||||
+
|
||||
int RTSPClient::grabSocket() {
|
||||
int inputSocket = fInputSocketNum;
|
||||
RTPInterface::clearServerRequestAlternativeByteHandler(envir(), fInputSocketNum); // in case we were receiving RTP-over-TCP
|
||||
@@ -1731,6 +1736,7 @@ void RTSPClient::handleResponseBytes(int newBytesRead) {
|
||||
char const* rtpInfoParamsStr = NULL;
|
||||
char const* wwwAuthenticateParamsStr = NULL;
|
||||
char const* publicParamsStr = NULL;
|
||||
+ char const* serverStr = NULL;
|
||||
char* bodyStart = NULL;
|
||||
unsigned numBodyBytes = 0;
|
||||
responseSuccess = False;
|
||||
@@ -1808,7 +1814,8 @@ void RTSPClient::handleResponseBytes(int newBytesRead) {
|
||||
// (see http://live555.com/liveMedia/faq.html#mailing-list-address for details),
|
||||
)) {
|
||||
// to check whether your proposed modification is appropriate/correct,
|
||||
- } else if (checkForHeader(lineStart, "Range:",
|
||||
+ } else if (checkForHeader(lineStart, "Server:", 7, serverStr)) {
|
||||
+ setServerString(serverStr); } else if (checkForHeader(lineStart, "Range:",
|
||||
// and, if so, whether instead it could be included in
|
||||
6,
|
||||
// a future release of the "LIVE555 Streaming Media" software,
|
||||
diff --git a/liveMedia/include/RTSPClient.hh b/liveMedia/include/RTSPClient.hh
|
||||
index 7ca61d3..aceaff3 100644
|
||||
--- a/liveMedia/include/RTSPClient.hh
|
||||
+++ b/liveMedia/include/RTSPClient.hh
|
||||
@@ -39,6 +39,8 @@ along with this library; if not, write to the Free Software Foundation, Inc.,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#define VLC_PATCH_RTSPCLIENT_SERVERSTRING
|
||||
+
|
||||
class RTSPClient: public Medium {
|
||||
public:
|
||||
static RTSPClient* createNew(UsageEnvironment& env, char const* rtspURL,
|
||||
@@ -189,6 +191,7 @@ public:
|
||||
unsigned sessionTimeoutParameter() const { return fSessionTimeoutParameter; }
|
||||
|
||||
char const* url() const { return fBaseURL; }
|
||||
+ char const* serverString() const { return fserverString; }
|
||||
|
||||
void useTLS() { fTLS.isNeeded = True; }
|
||||
|
||||
@@ -243,6 +246,7 @@ protected:
|
||||
|
||||
void reset();
|
||||
void setBaseURL(char const* url);
|
||||
+ void setServerString(char const* str);
|
||||
int grabSocket(); // allows a subclass to reuse our input socket, so that it won't get closed when we're deleted
|
||||
virtual unsigned sendRequest(RequestRecord* request);
|
||||
virtual Boolean setRequestFields(RequestRecord* request,
|
||||
@@ -344,6 +348,7 @@ private:
|
||||
unsigned fUserAgentHeaderStrLen;
|
||||
int fInputSocketNum, fOutputSocketNum;
|
||||
char* fBaseURL;
|
||||
+ char *fserverString;
|
||||
unsigned char fTCPStreamIdCount; // used for (optional) RTP/TCP
|
||||
char* fLastSessionId;
|
||||
unsigned fSessionTimeoutParameter; // optionally set in response "Session:" headers
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
27
mingw-w64-live-media/0003-mingw-static-libs.patch
Normal file
27
mingw-w64-live-media/0003-mingw-static-libs.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 5989542ea6b92c8486a901b47caea390e2a72cd6 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 16:38:27 +0100
|
||||
Subject: [PATCH 3/7] mingw static libs
|
||||
|
||||
---
|
||||
config.mingw | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config.mingw b/config.mingw
|
||||
index 29a03c5..283fb6f 100644
|
||||
--- a/config.mingw
|
||||
+++ b/config.mingw
|
||||
@@ -9,8 +9,8 @@ OBJ = o
|
||||
LINK = $(CXX) -o
|
||||
LINK_OPTS = -L.
|
||||
CONSOLE_LINK_OPTS = $(LINK_OPTS)
|
||||
-LIBRARY_LINK = $(LD) -o
|
||||
-LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic
|
||||
+LIBRARY_LINK = $(AR) cr
|
||||
+LIBRARY_LINK_OPTS =
|
||||
LIB_SUFFIX = a
|
||||
LIBS_FOR_CONSOLE_APPLICATION = -lws2_32 -lssl -lcrypto
|
||||
LIBS_FOR_GUI_APPLICATION = -lws2_32
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
45
mingw-w64-live-media/0004-live555-formatmessage.patch
Normal file
45
mingw-w64-live-media/0004-live555-formatmessage.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From bc961afdda311acb66099bf4ceb86f805dde9efb Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 16:39:31 +0100
|
||||
Subject: [PATCH 4/7] live555 formatmessage
|
||||
|
||||
---
|
||||
BasicUsageEnvironment/BasicUsageEnvironment0.cpp | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/BasicUsageEnvironment/BasicUsageEnvironment0.cpp b/BasicUsageEnvironment/BasicUsageEnvironment0.cpp
|
||||
index 2bc5a56..f094a8b 100644
|
||||
--- a/BasicUsageEnvironment/BasicUsageEnvironment0.cpp
|
||||
+++ b/BasicUsageEnvironment/BasicUsageEnvironment0.cpp
|
||||
@@ -19,9 +19,6 @@ along with this library; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include "BasicUsageEnvironment0.hh"
|
||||
#include <stdio.h>
|
||||
-#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
|
||||
-#define snprintf _snprintf
|
||||
-#endif
|
||||
|
||||
|
||||
////////// BasicUsageEnvironment //////////
|
||||
@@ -68,7 +65,6 @@ void BasicUsageEnvironment0::setResultErrMsg(MsgString msg, int err) {
|
||||
|
||||
if (err == 0) err = getErrno();
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
|
||||
-#ifndef _UNICODE
|
||||
char errMsg[RESULT_MSG_BUFFER_MAX] = "\0";
|
||||
if (0 != FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, errMsg, sizeof(errMsg)/sizeof(errMsg[0]), NULL)) {
|
||||
// Remove all trailing '\r', '\n' and '.'
|
||||
@@ -76,9 +72,8 @@ void BasicUsageEnvironment0::setResultErrMsg(MsgString msg, int err) {
|
||||
*p = '\0';
|
||||
}
|
||||
} else
|
||||
- snprintf(errMsg, sizeof(errMsg)/sizeof(errMsg[0]), "error %d", err);
|
||||
+ _snprintf(errMsg, sizeof(errMsg)/sizeof(errMsg[0]), "error %d", err);
|
||||
appendToResultMsg(errMsg);
|
||||
-#endif
|
||||
#else
|
||||
appendToResultMsg(strerror(err));
|
||||
#endif
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From ae1fdc3fb33922705a32bed6da3c7236422adf7a Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 16:40:38 +0100
|
||||
Subject: [PATCH 5/7] Fix testProgs static-lib link order
|
||||
|
||||
---
|
||||
testProgs/Makefile.tail | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/testProgs/Makefile.tail b/testProgs/Makefile.tail
|
||||
index 8f0e4de..e9a9e87 100644
|
||||
--- a/testProgs/Makefile.tail
|
||||
+++ b/testProgs/Makefile.tail
|
||||
@@ -73,7 +73,8 @@ LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX)
|
||||
GROUPSOCK_DIR = ../groupsock
|
||||
GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX)
|
||||
LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
|
||||
- $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)
|
||||
+ $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB) \
|
||||
+ $(GROUPSOCK_LIB)
|
||||
LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION)
|
||||
|
||||
testMP3Streamer$(EXE): $(MP3_STREAMER_OBJS) $(LOCAL_LIBS)
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
22
mingw-w64-live-media/0006-mingw-NO_GETIFADDRS.patch
Normal file
22
mingw-w64-live-media/0006-mingw-NO_GETIFADDRS.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
From 57341aff4178aed4a3af42747bed68b0dd1d64f9 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 16:59:03 +0100
|
||||
Subject: [PATCH 6/7] mingw NO_GETIFADDRS
|
||||
|
||||
---
|
||||
config.mingw | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.mingw b/config.mingw
|
||||
index 283fb6f..a0601ff 100644
|
||||
--- a/config.mingw
|
||||
+++ b/config.mingw
|
||||
@@ -1,4 +1,4 @@
|
||||
-COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED
|
||||
+COMPILE_OPTS = $(INCLUDES) -I/usr/local/include -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED -DNO_GETIFADDRS
|
||||
C = c
|
||||
C_COMPILER = $(CC)
|
||||
C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From a25a9e1fab97d977aaa41d4530a956d5642f477b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Wed, 17 Feb 2021 17:07:43 +0100
|
||||
Subject: [PATCH 7/7] mingw fix setsockopt optval arg via cast
|
||||
|
||||
---
|
||||
groupsock/GroupsockHelper.cpp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/groupsock/GroupsockHelper.cpp b/groupsock/GroupsockHelper.cpp
|
||||
index 90a66d3..658bb67 100644
|
||||
--- a/groupsock/GroupsockHelper.cpp
|
||||
+++ b/groupsock/GroupsockHelper.cpp
|
||||
@@ -180,7 +180,7 @@ int setupDatagramSocket(UsageEnvironment& env, Port port, int domain) {
|
||||
// For IPv6 sockets, we need the IPV6_V6ONLY flag set to 1, otherwise we would not
|
||||
// be able to have an IPv4 socket and an IPv6 socket bound to the same port:
|
||||
int const one = 1;
|
||||
- (void)setsockopt(newSocket, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof one);
|
||||
+ (void)setsockopt(newSocket, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<const char*>(&one), sizeof one);
|
||||
|
||||
MAKE_SOCKADDR_IN6(name, port.num());
|
||||
if (bind(newSocket, (struct sockaddr*)&name, sizeof name) != 0) {
|
||||
@@ -351,7 +351,7 @@ int setupStreamSocket(UsageEnvironment& env, Port port, int domain,
|
||||
// For IPv6 sockets, we need the IPV6_V6ONLY flag set to 1, otherwise we would not
|
||||
// be able to have an IPv4 socket and an IPv6 socket bound to the same port:
|
||||
int const one = 1;
|
||||
- (void)setsockopt(newSocket, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof one);
|
||||
+ (void)setsockopt(newSocket, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<const char*>(&one), sizeof one);
|
||||
|
||||
MAKE_SOCKADDR_IN6(name, port.num());
|
||||
if (bind(newSocket, (struct sockaddr*)&name, sizeof name) != 0) {
|
||||
@@ -597,7 +597,7 @@ Boolean socketJoinGroup(UsageEnvironment& env, int socket,
|
||||
return False;
|
||||
}
|
||||
}
|
||||
- if (setsockopt(socket, level, option_name, option_value, option_len) < 0) {
|
||||
+ if (setsockopt(socket, level, option_name, reinterpret_cast<const char*>(option_value), option_len) < 0) {
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
if (env.getErrno() != 0) {
|
||||
// That piece-of-shit toy operating system (Windows) sometimes lies
|
||||
@@ -650,7 +650,7 @@ Boolean socketLeaveGroup(UsageEnvironment&, int socket,
|
||||
return False;
|
||||
}
|
||||
}
|
||||
- if (setsockopt(socket, level, option_name, option_value, option_len) < 0) {
|
||||
+ if (setsockopt(socket, level, option_name, reinterpret_cast<const char*>(option_value), option_len) < 0) {
|
||||
return False;
|
||||
}
|
||||
|
||||
--
|
||||
2.30.1.windows.1
|
||||
|
||||
@@ -2,26 +2,64 @@
|
||||
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
|
||||
# Maintainer: Zach Bacon <11doctorwhocanada@gmail.com>
|
||||
# Contributor: Gilles CHAUVIN <gcnweb@gmail.com>
|
||||
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
||||
|
||||
_realname=live-media
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=2019.11.06
|
||||
pkgver=2021.02.11
|
||||
pkgrel=1
|
||||
pkgdesc="A set of C++ libraries for multimedia streaming (mingw-w64)"
|
||||
arch=('any')
|
||||
license=('LGPL')
|
||||
url="http://live555.com/liveMedia"
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc")
|
||||
makedepends=("rsync")
|
||||
options=('staticlibs')
|
||||
source=("https://download.videolan.org/contrib/live555/live.${pkgver}.tar.gz")
|
||||
sha256sums=('a512071d1c6dd2caf16ecec0aa2c24f0b1cc4fe789e96adc927ee1fe29be493a')
|
||||
source=("https://download.videolan.org/contrib/live555/live.${pkgver}.tar.gz"
|
||||
0001-Add-a-pkg-config-file-for-the-shared-libraries.patch
|
||||
0002-expose-server_string.patch
|
||||
0003-mingw-static-libs.patch
|
||||
0004-live555-formatmessage.patch
|
||||
0005-Fix-testProgs-static-lib-link-order.patch
|
||||
0006-mingw-NO_GETIFADDRS.patch
|
||||
0007-mingw-fix-setsockopt-optval-arg-via-cast.patch)
|
||||
sha256sums=('834ad3fc199f1a6b0c09646976deb71a3a7803dc7b498ce92e920f6cb7b717ba'
|
||||
'8611cb5eb31571d4026a66d47a98f2a08abf3b6c3ac373ee0c28638a3bf3c4dc'
|
||||
'84e1df79f5a2496068d37211dcd4c4a8c72c779cdf2f9d75d61847c08bb0eb91'
|
||||
'6111b8119b80eca6a2fdd1c116f2e3509d62098d3c36944bd1bf83bb03342c87'
|
||||
'58255bbd2e43112e36647d1194aa0cfa98d0e9bf58a8a41d59e1e81e1589028a'
|
||||
'9fb73d9da3c9448cc47ef14a3978861ed0d442822f48481ae8d858db1b04ae8e'
|
||||
'1a52a453eff64204d06f7616da19ce8def5798194ed20e93cc470cd0007a35ba'
|
||||
'e47358cc8e622de847607153a7f2d8e20a774cdf950714199aabbdf40baeb2e3')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/live
|
||||
|
||||
chmod -R a+w *
|
||||
find . -name "*.rej" -exec rm -f {} \;
|
||||
find . -name "*.orig" -exec rm -f {} \;
|
||||
|
||||
[[ -f live555.pc.in ]] && rm -f live555.pc.in
|
||||
patch -p1 -i ${srcdir}/0001-Add-a-pkg-config-file-for-the-shared-libraries.patch
|
||||
patch -p1 -i ${srcdir}/0002-expose-server_string.patch
|
||||
patch -p1 -i ${srcdir}/0003-mingw-static-libs.patch
|
||||
patch -p1 -i ${srcdir}/0004-live555-formatmessage.patch
|
||||
patch -p1 -i ${srcdir}/0005-Fix-testProgs-static-lib-link-order.patch
|
||||
patch -p1 -i ${srcdir}/0006-mingw-NO_GETIFADDRS.patch
|
||||
patch -p1 -i ${srcdir}/0007-mingw-fix-setsockopt-optval-arg-via-cast.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/live
|
||||
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
|
||||
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
|
||||
cp -rf ${srcdir}/live/* "${srcdir}"/build-${CARCH}
|
||||
# This cp is necessary since these are symlink targets but get extracted
|
||||
# later. While this shouldn't matter (symlink targets are allowed not to
|
||||
# exist on Windows as per Unix), it currently does as various MSYS2 tools
|
||||
# pre-date working Windows symlinks.
|
||||
cp ${srcdir}/live/COPYING* .
|
||||
rsync -rav ${srcdir}/live/* .
|
||||
./genMakefiles mingw
|
||||
|
||||
make CC=gcc
|
||||
@@ -30,12 +68,21 @@ build() {
|
||||
package() {
|
||||
cd "${srcdir}"/build-${CARCH}
|
||||
|
||||
make install DESTDIR=${pkgdir} PREFIX=${MINGW_PREFIX}
|
||||
make install_shared_libraries DESTDIR=${pkgdir} PREFIX=${MINGW_PREFIX}
|
||||
|
||||
for dir in BasicUsageEnvironment groupsock liveMedia UsageEnvironment; do
|
||||
install -dm755 ${pkgdir}${MINGW_PREFIX}/{bin,lib,include/${dir}}
|
||||
install -m644 ${dir}/*.a "${pkgdir}${MINGW_PREFIX}/lib"
|
||||
install -m644 ${dir}/include/*.h* "${pkgdir}${MINGW_PREFIX}/include/${dir}"
|
||||
done
|
||||
|
||||
mkdir -p "${pkgdir}${MINGW_PREFIX}/share/pkgconfig"
|
||||
install -m644 ${pkgdir}/pkgconfig/live555.pc "${pkgdir}${MINGW_PREFIX}/share/pkgconfig"
|
||||
sed -i "s|^prefix=$|prefix=${MINGW_PREFIX}|" "${pkgdir}${MINGW_PREFIX}/share/pkgconfig/live555.pc"
|
||||
sed -i "s|^libdir=$|libdir=${MINGW_PREFIX}/lib|" "${pkgdir}${MINGW_PREFIX}/share/pkgconfig/live555.pc"
|
||||
rm -rf ${pkgdir}/pkgconfig
|
||||
|
||||
for testprog in `find testProgs -type f -perm 755`; do
|
||||
install ${testprog} "${pkgdir}${MINGW_PREFIX}/bin"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user