Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2023 14:39:41 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: 50f7afc62558 - main - www/foreign-cdm: Reorganize the port.
Message-ID:  <202310081439.398Edf5t006812@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=50f7afc62558db975f4815f6b2422f52a7cb0e0f

commit 50f7afc62558db975f4815f6b2422f52a7cb0e0f
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-10-08 14:01:34 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-10-08 14:39:35 +0000

    www/foreign-cdm: Reorganize the port.
    
    - Do not install anything into LINUXBASE.
    - Add an environment setup script.
    - Remove pkg-plist.
    - Remove original Google Widevine files from this port to avoid licensing
      problems. Users are expected to install www/linux-widevine-cmd on their own.
---
 www/foreign-cdm/Makefile                | 35 +++++++++++++++++++--------------
 www/foreign-cdm/distinfo                |  4 +---
 www/foreign-cdm/files/fcdm-setup-env.in |  2 ++
 www/foreign-cdm/pkg-plist               | 12 -----------
 4 files changed, 23 insertions(+), 30 deletions(-)

diff --git a/www/foreign-cdm/Makefile b/www/foreign-cdm/Makefile
index e6785fb60c92..157c883b316b 100644
--- a/www/foreign-cdm/Makefile
+++ b/www/foreign-cdm/Makefile
@@ -1,10 +1,9 @@
 PORTNAME=	foreign-cdm
 PORTVERSION=	2
+PORTREVISION=	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
+MASTER_SITES=	https://arrowd.name/:cdm
+DISTFILES=	cdm-${CDM_INT_HASH}.tar.gz:cdm
 
 MAINTAINER=	arrowd@FreeBSD.org
 COMMENT=	CDM agent for Chromium
@@ -27,25 +26,31 @@ GH_TUPLE=	capnproto:capnproto:928c8390d4d562bd32dc79a42eb64e9bdba572d8: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
+SUB_FILES=	fcdm-setup-env
+
+PLIST_FILES=	libexec/fcdm-worker \
+		lib/foreign-cdm/fcdm-fbsd.so \
+		share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so \
+		share/chromium/WidevineCdm/manifest.json \
+		share/foreign-cdm/fcdm-setup-env
+
 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
+	${INSTALL_PROGRAM} ${WRKSRC}/build/fcdm-worker ${STAGEDIR}${PREFIX}/libexec/
+
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKDIR}/fcdm-setup-env ${STAGEDIR}${DATADIR}
+
 	${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
+	${CP} ${WRKSRC}/build/fcdm-fbsd.so ${STAGEDIR}${PREFIX}/lib/foreign-cdm/
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/foreign-cdm/fcdm-fbsd.so
 
-post-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/chromium/WidevineCdm/_platform_specific/linux_x64
 	${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
+	${LN} -s ${PREFIX}/lib/WidevineCdm/manifest.json ${STAGEDIR}${PREFIX}/share/chromium/WidevineCdm/manifest.json
 
 .include <bsd.port.mk>
diff --git a/www/foreign-cdm/distinfo b/www/foreign-cdm/distinfo
index 892668884386..786ccc10b6b8 100644
--- a/www/foreign-cdm/distinfo
+++ b/www/foreign-cdm/distinfo
@@ -1,8 +1,6 @@
-TIMESTAMP = 1696359943
+TIMESTAMP = 1696769052
 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-2-760e440839f4456373460dcb61cfa8e36618d310_GH0.tar.gz) = 394faa92a8957f858561308638370098fd7e3d30301f8791380520003f19a08e
 SIZE (shkhln-foreign-cdm-2-760e440839f4456373460dcb61cfa8e36618d310_GH0.tar.gz) = 11776
 SHA256 (capnproto-capnproto-928c8390d4d562bd32dc79a42eb64e9bdba572d8_GH0.tar.gz) = 5c867f4758d7a3e2e0213e732e2b9a5ad70d1193a4d615bbab41df1d4051de37
diff --git a/www/foreign-cdm/files/fcdm-setup-env.in b/www/foreign-cdm/files/fcdm-setup-env.in
new file mode 100644
index 000000000000..1bc9c3cb400b
--- /dev/null
+++ b/www/foreign-cdm/files/fcdm-setup-env.in
@@ -0,0 +1,2 @@
+export FCDM_CDM_SO_PATH=%%PREFIX%%/lib/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
+export FCDM_WORKER_PATH=%%PREFIX%%/libexec/fcdm-worker
diff --git a/www/foreign-cdm/pkg-plist b/www/foreign-cdm/pkg-plist
deleted file mode 100644
index 6cc85c8b69bd..000000000000
--- a/www/foreign-cdm/pkg-plist
+++ /dev/null
@@ -1,12 +0,0 @@
-/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?202310081439.398Edf5t006812>