Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Sep 2023 13:20:30 GMT
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 8cf67ffddfbc - main - www/foreign-cdm: Linux agent for Chromium allowing playing DRM protected content.
Message-ID:  <202309301320.38UDKUwQ088410@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8cf67ffddfbc8321df6d452cc9333129f42dbe96

commit 8cf67ffddfbc8321df6d452cc9333129f42dbe96
Author:     Alexey Donskov <voxnod@gmail.com>
AuthorDate: 2023-09-11 12:49:09 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-09-30 13:20:11 +0000

    www/foreign-cdm: Linux agent for Chromium allowing playing DRM protected content.
    
    Tested by:      arrowd
    Sponsored by:   Serenity Cybersecurity, LLC
    
    Co-authored-by: Gleb Popov <arrowd@FreeBSD.org>
---
 www/Makefile              |  1 +
 www/foreign-cdm/Makefile  | 50 +++++++++++++++++++++++++++++++++++++++++++++++
 www/foreign-cdm/distinfo  |  9 +++++++++
 www/foreign-cdm/pkg-descr |  2 ++
 www/foreign-cdm/pkg-plist | 12 ++++++++++++
 5 files changed, 74 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 879935b7a189..3f6f27862f64 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -181,6 +181,7 @@
     SUBDIR += flat-frog
     SUBDIR += flexget
     SUBDIR += flickcurl
+    SUBDIR += foreign-cdm
     SUBDIR += formication
     SUBDIR += foswiki
     SUBDIR += fpc-fastcgi
diff --git a/www/foreign-cdm/Makefile b/www/foreign-cdm/Makefile
new file mode 100644
index 000000000000..12f045cc58fb
--- /dev/null
+++ b/www/foreign-cdm/Makefile
@@ -0,0 +1,50 @@
+PORTNAME=	foreign-cdm
+PORTVERSION=	1
+CATEGORIES=	www multimedia linux
+MASTER_SITES=	https://arrowd.name/:cdm \
+		https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/:widevine
+DISTFILES=	cdm-${CDM_INT_HASH}.tar.gz:cdm \
+		google-chrome-stable_${CHROME_VERSION}_amd64.deb:widevine
+
+MAINTAINER=	arrowd@FreeBSD.org
+COMMENT=	CDM agent for Chromium
+WWW=		https://github.com/shkhln/foreign-cdm
+
+LICENSE=	MIT
+
+ONLY_FOR_ARCHS=	amd64
+
+BUILD_DEPENDS=	cmake:devel/cmake-core \
+		linux-c7-devtoolset>0:devel/linux-c7-devtoolset
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	shkhln
+GH_PROJECT=	foreign-cdm
+GH_TAGNAME=	32ed6209a25a60b3eef84e43cffb47a5da036290
+GH_TUPLE=	capnproto:capnproto:928c8390d4d562bd32dc79a42eb64e9bdba572d8:capnproto/third_party/capnproto
+
+MAKE_ENV=	LINUX_CC=/compat/linux/opt/rh/devtoolset-11/root/usr/bin/g++ \
+		MAKE_JOBS_NUMBER=${MAKE_JOBS_NUMBER}
+
+CHROME_VERSION=	116.0.5845.179-1
+CDM_INT_HASH=	fef0b5aa1bd31efb88dfab804bdbe614f3d54f28
+
+post-extract:
+	${MV} ${WRKDIR}/*.h ${WRKSRC}/third_party/cdm/
+	cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} data.tar.xz ${EXTRACT_AFTER_ARGS}
+
+do-install:
+	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/build/fcdm-worker ${STAGEDIR}${LINUXBASE}/usr/bin
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/foreign-cdm
+	${MV} ${WRKSRC}/build/fcdm-fbsd.so ${STAGEDIR}${PREFIX}/lib/foreign-cdm/
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/chromium
+	${MV} ${WRKDIR}/opt/google/chrome/WidevineCdm ${STAGEDIR}${PREFIX}/share/chromium/
+	${MKDIR} ${STAGEDIR}${LINUXBASE}/usr/lib/foreign-cdm
+	${MV} ${STAGEDIR}${PREFIX}/share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so ${STAGEDIR}${LINUXBASE}/usr/lib/foreign-cdm
+
+post-install:
+	${LN} -s ${PREFIX}/lib/foreign-cdm/fcdm-fbsd.so ${STAGEDIR}${PREFIX}/share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/foreign-cdm/fcdm-fbsd.so
+
+.include <bsd.port.mk>
diff --git a/www/foreign-cdm/distinfo b/www/foreign-cdm/distinfo
new file mode 100644
index 000000000000..2dc213ce2824
--- /dev/null
+++ b/www/foreign-cdm/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1695753109
+SHA256 (cdm-fef0b5aa1bd31efb88dfab804bdbe614f3d54f28.tar.gz) = 178ae15061d67943fa754e9ddf1903536c4cdb813dcdd90f98007f6238781a26
+SIZE (cdm-fef0b5aa1bd31efb88dfab804bdbe614f3d54f28.tar.gz) = 14361
+SHA256 (google-chrome-stable_116.0.5845.179-1_amd64.deb) = 75d091c547b4f336c88e45c61ba8b7a6fddb869034122b3ffe0ed60225c389b4
+SIZE (google-chrome-stable_116.0.5845.179-1_amd64.deb) = 96683480
+SHA256 (shkhln-foreign-cdm-1-32ed6209a25a60b3eef84e43cffb47a5da036290_GH0.tar.gz) = 434cab205adc99ebf7a985e0acb36ca70d2502398625e9377b33d4c6fce62785
+SIZE (shkhln-foreign-cdm-1-32ed6209a25a60b3eef84e43cffb47a5da036290_GH0.tar.gz) = 11772
+SHA256 (capnproto-capnproto-928c8390d4d562bd32dc79a42eb64e9bdba572d8_GH0.tar.gz) = 5c867f4758d7a3e2e0213e732e2b9a5ad70d1193a4d615bbab41df1d4051de37
+SIZE (capnproto-capnproto-928c8390d4d562bd32dc79a42eb64e9bdba572d8_GH0.tar.gz) = 2413835
diff --git a/www/foreign-cdm/pkg-descr b/www/foreign-cdm/pkg-descr
new file mode 100644
index 000000000000..2ce11b68080a
--- /dev/null
+++ b/www/foreign-cdm/pkg-descr
@@ -0,0 +1,2 @@
+Linuxulator-based CDM agent for the Chromium browser making it possible to
+to play DRM content with native Chromium.
diff --git a/www/foreign-cdm/pkg-plist b/www/foreign-cdm/pkg-plist
new file mode 100644
index 000000000000..6cc85c8b69bd
--- /dev/null
+++ b/www/foreign-cdm/pkg-plist
@@ -0,0 +1,12 @@
+/compat/linux/usr/bin/fcdm-worker
+/compat/linux/usr/lib/foreign-cdm/libwidevinecdm.so
+lib/foreign-cdm/fcdm-fbsd.so
+share/chromium/WidevineCdm/LICENSE
+share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
+share/chromium/WidevineCdm/manifest.json
+@dir /compat/linux/usr/bin
+@dir /compat/linux/usr/lib/foreign-cdm
+@dir /compat/linux/usr/lib
+@dir /compat/linux/usr
+@dir /compat/linux
+@dir /compat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309301320.38UDKUwQ088410>