git: 543aa1a5a568 - main - multimedia/obs-websocket: Update 4.8.0 -> 5.0.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 04 Aug 2022 08:09:58 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=543aa1a5a56824c155994dd4143cb8ac1df5ef15

commit 543aa1a5a56824c155994dd4143cb8ac1df5ef15
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-04 08:09:10 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-04 08:09:10 +0000

    multimedia/obs-websocket: Update 4.8.0 -> 5.0.1
    
    This also unbreaks it.
---
 multimedia/obs-websocket/Makefile                  | 23 ++++++++--------------
 multimedia/obs-websocket/distinfo                  | 10 +++++++---
 .../obs-websocket/files/patch-CMakeLists.txt       | 23 ++++++++++++++++++++++
 multimedia/obs-websocket/pkg-plist                 | 16 ---------------
 4 files changed, 38 insertions(+), 34 deletions(-)

diff --git a/multimedia/obs-websocket/Makefile b/multimedia/obs-websocket/Makefile
index 5b8a8ab04777..8ba6b0a639fd 100644
--- a/multimedia/obs-websocket/Makefile
+++ b/multimedia/obs-websocket/Makefile
@@ -1,5 +1,5 @@
-PORTNAME=	obs-websocket
-DISTVERSION=	4.8.0
+PORTNAME=	obs-websocket # will be included in obs-studio-28.x - port should be removed then
+DISTVERSION=	5.0.1
 CATEGORIES=	multimedia www
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -8,26 +8,19 @@ COMMENT=	OBS Studio Plugin: WebSockets API
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BROKEN=		does not build: src/rpc/../obs-websocket.h:36:7: error: type alias redefinition with different types, see https://github.com/obsproject/obs-websocket/issues/954
-
 BUILD_DEPENDS=	websocketpp>0:devel/websocketpp
 LIB_DEPENDS=	libobs.so:multimedia/obs-studio
 
-USES=		cmake compiler:c++17-lang localbase:ldflags qt:5
+USES=		cmake:insource compiler:c++17-lang localbase:ldflags qt:5 # insource because of https://github.com/obsproject/obs-websocket/issues/973
 USE_QT=		core gui widgets buildtools_build concurrent_build qmake_build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	obsproject
-GH_TUPLE=	chriskohlhoff:asio:b73dc1d2c0ecb9452a87c26544d7f71e24342df6:chriskohlhoff_asio/deps/asio
-
-OPTIONS_DEFINE=		IPV4 # with devel/websocketpp it's either IPv4 or IPv6, but not both
-OPTIONS_DEFAULT=	IPV4 # project defaults to IPv6 but the port defaults to IPv4 because IPv4 is currently more common
-
-post-patch-IPV4-on:
-	@${REINPLACE_CMD} -e 's|ip::tcp::v6|ip::tcp::v4|g' ${WRKSRC}/deps/asio/asio/src/tests/unit/ip/tcp.cpp
-	@${REINPLACE_CMD} -e 's|_server.listen(|_server.listen(asio::ip::tcp::v4(), |g' ${WRKSRC}/src/WSServer.cpp
+GH_TUPLE=	chriskohlhoff:asio:b73dc1d2c0ecb9452a87c26544d7f71e24342df6:chriskohlhoff_asio/deps/asio \
+		nlohmann:json:a34e011:json/deps/json \
+		nayuki:QR-Code-generator:8518684:qr/deps/qr
 
-post-install: # see https://github.com/Palakis/obs-websocket/issues/457
-	@${RM} -r ${STAGEDIR}${PREFIX}/lib/amd64-linux-gnu
+PLIST_FILES=	lib/obs-plugins/obs-websocket.so \
+		share/obs/obs-plugins/obs-websocket/locale/en-US.ini
 
 .include <bsd.port.mk>
diff --git a/multimedia/obs-websocket/distinfo b/multimedia/obs-websocket/distinfo
index 81dd9ea6f27c..98f1abda7027 100644
--- a/multimedia/obs-websocket/distinfo
+++ b/multimedia/obs-websocket/distinfo
@@ -1,5 +1,9 @@
-TIMESTAMP = 1655971074
-SHA256 (obsproject-obs-websocket-4.8.0_GH0.tar.gz) = a0b99f8039225305af36ef84d353155173d5878f56187a8988a827b487f15781
-SIZE (obsproject-obs-websocket-4.8.0_GH0.tar.gz) = 173336
+TIMESTAMP = 1659569302
+SHA256 (obsproject-obs-websocket-5.0.1_GH0.tar.gz) = eb0387788f6b1ed4868db1bbe2572879057027bc06e1ebc0e1d284b419244f33
+SIZE (obsproject-obs-websocket-5.0.1_GH0.tar.gz) = 211686
 SHA256 (chriskohlhoff-asio-b73dc1d2c0ecb9452a87c26544d7f71e24342df6_GH0.tar.gz) = e4a5f556e3d562c71f9e569ffa64eae665abd2c61d85a2d275c86042b32f9342
 SIZE (chriskohlhoff-asio-b73dc1d2c0ecb9452a87c26544d7f71e24342df6_GH0.tar.gz) = 1211725
+SHA256 (nlohmann-json-a34e011_GH0.tar.gz) = 8580814d7748cb417eb4e89bab32ae2473ecf055d33cdf18044f09f84eab2db8
+SIZE (nlohmann-json-a34e011_GH0.tar.gz) = 6860457
+SHA256 (nayuki-QR-Code-generator-8518684_GH0.tar.gz) = 0fa3e16822e66343d10ba0ba2787378e44d88686d9836476d2df041a59b729e9
+SIZE (nayuki-QR-Code-generator-8518684_GH0.tar.gz) = 135743
diff --git a/multimedia/obs-websocket/files/patch-CMakeLists.txt b/multimedia/obs-websocket/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..ea1a178b0100
--- /dev/null
+++ b/multimedia/obs-websocket/files/patch-CMakeLists.txt
@@ -0,0 +1,23 @@
+- workaround for
+- * https://github.com/obsproject/obs-websocket/issues/973
+- * https://github.com/obsproject/obs-websocket/issues/974
+--- CMakeLists.txt.orig	2022-08-02 21:52:49 UTC
++++ CMakeLists.txt
+@@ -77,7 +77,7 @@ add_subdirectory(deps/json)
+ # Configure files
+ configure_file(
+ 	src/plugin-macros.h.in
+-	../src/plugin-macros.generated.h
++	src/plugin-macros.generated.h
+ )
+ configure_file(
+ 	installer/installer-windows.iss.in
+@@ -303,7 +303,7 @@ endif()
+ if(UNIX AND NOT APPLE)
+ 	include(GNUInstallDirs)
+ 
+-	target_compile_options(obs-websocket PRIVATE -Wall -Wextra -Wpedantic -Werror -Wno-missing-field-initializers)
++	target_compile_options(obs-websocket PRIVATE -Wall -Wextra -Wpedantic -Wno-missing-field-initializers)
+ 
+ 	set_target_properties(obs-websocket PROPERTIES PREFIX "")
+ 	target_link_libraries(obs-websocket obs-frontend-api)
diff --git a/multimedia/obs-websocket/pkg-plist b/multimedia/obs-websocket/pkg-plist
deleted file mode 100644
index 7b113f88bf53..000000000000
--- a/multimedia/obs-websocket/pkg-plist
+++ /dev/null
@@ -1,16 +0,0 @@
-lib/obs-plugins/obs-websocket.so
-share/obs/obs-plugins/obs-websocket/locale/ar-SA.ini
-share/obs/obs-plugins/obs-websocket/locale/de-DE.ini
-share/obs/obs-plugins/obs-websocket/locale/en-US.ini
-share/obs/obs-plugins/obs-websocket/locale/es-ES.ini
-share/obs/obs-plugins/obs-websocket/locale/fr-FR.ini
-share/obs/obs-plugins/obs-websocket/locale/hi-IN.ini
-share/obs/obs-plugins/obs-websocket/locale/it-IT.ini
-share/obs/obs-plugins/obs-websocket/locale/ja-JP.ini
-share/obs/obs-plugins/obs-websocket/locale/ko-KR.ini
-share/obs/obs-plugins/obs-websocket/locale/nl-NL.ini
-share/obs/obs-plugins/obs-websocket/locale/pl-PL.ini
-share/obs/obs-plugins/obs-websocket/locale/pt-PT.ini
-share/obs/obs-plugins/obs-websocket/locale/ru-RU.ini
-share/obs/obs-plugins/obs-websocket/locale/zh-CN.ini
-share/obs/obs-plugins/obs-websocket/locale/zh-TW.ini