pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/multimedia/openwv
Module Name: pkgsrc
Committed By: ryoon
Date: Wed Jan 21 13:59:46 UTC 2026
Added Files:
pkgsrc/multimedia/openwv: DESCR Makefile PLIST distinfo
pkgsrc/multimedia/openwv/files: README.firefox.in
pkgsrc/multimedia/openwv/patches: patch-Cargo.toml patch-src_config.rs
patch-src_openwv.rs
Log Message:
multimedia/openwv: import openwv-1.1.3nb1
OpenWV is a free and open-source reimplementation of Google's Widevine Content
Decryption Module (CDM), the portion of the Widevine DRM system that runs in
your browser, obtains content keys for protected media, and decrypts the media
using those keys. OpenWV is a drop-in replacement for Google's official,
proprietary CDM and implements the same shared library API.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/openwv/DESCR \
pkgsrc/multimedia/openwv/Makefile pkgsrc/multimedia/openwv/PLIST \
pkgsrc/multimedia/openwv/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/openwv/files/README.firefox.in
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/openwv/patches/patch-Cargo.toml \
pkgsrc/multimedia/openwv/patches/patch-src_config.rs \
pkgsrc/multimedia/openwv/patches/patch-src_openwv.rs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/multimedia/openwv/DESCR
diff -u /dev/null pkgsrc/multimedia/openwv/DESCR:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/DESCR Wed Jan 21 13:59:45 2026
@@ -0,0 +1,5 @@
+OpenWV is a free and open-source reimplementation of Google's Widevine Content
+Decryption Module (CDM), the portion of the Widevine DRM system that runs in
+your browser, obtains content keys for protected media, and decrypts the media
+using those keys. OpenWV is a drop-in replacement for Google's official,
+proprietary CDM and implements the same shared library API.
Index: pkgsrc/multimedia/openwv/Makefile
diff -u /dev/null pkgsrc/multimedia/openwv/Makefile:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/Makefile Wed Jan 21 13:59:45 2026
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+
+DISTNAME= openwv-1.1.3
+PKGREVISION= 1
+CATEGORIES= multimedia
+# Tarball contains Git submodule and result of `cargo vendor`.
+MASTER_SITES= https://www.ryoon.net/~ryoon/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://github.com/tchebb/openwv/
+COMMENT= Open reimplementation of Google's Widevine
+LICENSE= gnu-lgpl-v3
+
+USE_LANGUAGES= c c++
+
+SUBST_CLASSES+= etc
+SUBST_STAGE.etc= pre-configure
+SUBST_MESSAGE.etc= Setting PKG_SYSCONFDIR
+SUBST_FILES.etc+= src/openwv.rs
+SUBST_VARS.etc+= PKG_SYSCONFDIR
+
+SUBST_CLASSES+= readme
+SUBST_STAGE.readme= pre-configure
+SUBST_MESSAGE.readme= Setting PREFIX for README files
+SUBST_FILES.readme+= README.firefox
+SUBST_VARS.readme+= PREFIX
+
+INSTALLATION_DIRS+= share/openwv
+INSTALLATION_DIRS+= share/doc/openwv
+
+post-extract:
+ # Adjust for vendor handling of cargo.mk
+ cd ${WRKSRC} && \
+ ${MV} vendor ..
+ # Place README files
+ ${CP} ${FILESDIR}/README.firefox.in ${WRKSRC}/README.firefox
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/target/release/libwidevinecdm.so \
+ ${DESTDIR}${PREFIX}/share/openwv
+ ${INSTALL_DATA} ${WRKSRC}/manifest-firefox.json \
+ ${DESTDIR}${PREFIX}/share/openwv
+ ${INSTALL_DATA} ${WRKSRC}/manifest-chromium.json \
+ ${DESTDIR}${PREFIX}/share/openwv
+ ${INSTALL_DATA} ${WRKSRC}/README.firefox \
+ ${DESTDIR}${PREFIX}/share/doc/openwv
+
+.include "../../lang/rust/cargo.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/multimedia/openwv/PLIST
diff -u /dev/null pkgsrc/multimedia/openwv/PLIST:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/PLIST Wed Jan 21 13:59:45 2026
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+share/doc/openwv/README.firefox
+share/openwv/libwidevinecdm.so
+share/openwv/manifest-chromium.json
+share/openwv/manifest-firefox.json
Index: pkgsrc/multimedia/openwv/distinfo
diff -u /dev/null pkgsrc/multimedia/openwv/distinfo:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/distinfo Wed Jan 21 13:59:45 2026
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+
+BLAKE2s (openwv-1.1.3.tar.bz2) = 2457e67c8cfcc33b7cc4161ad59fdb96176fe5f37805141f57300c8f9e9ec3cf
+SHA512 (openwv-1.1.3.tar.bz2) = 1168029017b0ccc92c119e860a37e565940d54f9f4b2759e26da9ae615c1940f83483cffea642c2e36e958d77f99c6bc58df9c747d08b3d229bc839093f4766f
+Size (openwv-1.1.3.tar.bz2) = 23790667 bytes
+SHA1 (patch-Cargo.toml) = bdda1d5ee91423d173e659bd4c305d4362a6f0c8
+SHA1 (patch-src_config.rs) = 80c6aee2b32fa9376b71f530719e88f6f3e70285
+SHA1 (patch-src_openwv.rs) = 5cb12ef32d13f7c0806f81d05501c2b1ebc5b53d
Index: pkgsrc/multimedia/openwv/files/README.firefox.in
diff -u /dev/null pkgsrc/multimedia/openwv/files/README.firefox.in:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/files/README.firefox.in Wed Jan 21 13:59:45 2026
@@ -0,0 +1,21 @@
+===========================================================================
+$NetBSD: README.firefox.in,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+
+For Firefox web browser:
+
+(1) Open about:support in www/firefox and get profile name.
+(2) Create gmp-widevinecdm/openwv directory under profile directory.
+$ mkdir -p ~/.mozilla/<profile>/gmp-widevinecdm/openwv
+(3) Copy @PREFIX@/share/openwv/libwidevinecdm.so
+ to ~/.mozilla/<profile>/gmp-widevinecdm/openwv
+(4) Copy @PREFIX@/share/openwv/manifest-firefox.json
+ as ~/.mozilla/<profile>/gmp-widevinecdm/openwv/manifest.json
+(5) Create some keys in about:config.
+ key | type | value
+ -------------------------------------------------------------
+ media.gmp-widevinecdm.enabled | boolean | true
+ media.gmp-widevinecdm.visible | boolean | true
+ media.gmp-widevinecdm.autoupdate | boolean | false
+ media.gmp-widevinecdm.version | string | openwv
+
+===========================================================================
Index: pkgsrc/multimedia/openwv/patches/patch-Cargo.toml
diff -u /dev/null pkgsrc/multimedia/openwv/patches/patch-Cargo.toml:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/patches/patch-Cargo.toml Wed Jan 21 13:59:45 2026
@@ -0,0 +1,24 @@
+$NetBSD: patch-Cargo.toml,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+
+* Use vendored autocxx for offline build.
+
+--- Cargo.toml.orig 2026-01-20 13:47:09.346022322 +0000
++++ Cargo.toml
+@@ -10,7 +10,7 @@ edition = "2024"
+ edition = "2024"
+
+ [dependencies]
+-autocxx = { git = "https://github.com/tchebb/autocxx.git", branch = "openwv-fixes" }
++autocxx = "0.30.0"
+ cxx = "1"
+ prost = "0.14.1"
+ thiserror = "2"
+@@ -31,7 +31,7 @@ ctr = "0.10.0-rc"
+ ctr = "0.10.0-rc"
+
+ [build-dependencies]
+-autocxx-build = { git = "https://github.com/tchebb/autocxx.git", branch = "openwv-fixes" }
++autocxx-build = "0.30.0"
+ prost-build = "0.14.1"
+ thiserror = "2"
+
Index: pkgsrc/multimedia/openwv/patches/patch-src_config.rs
diff -u /dev/null pkgsrc/multimedia/openwv/patches/patch-src_config.rs:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/patches/patch-src_config.rs Wed Jan 21 13:59:45 2026
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_config.rs,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+
+* Load .wvd data from file. Taken from OpenBSD Ports.
+
+--- src/config.rs.orig 2026-01-20 13:27:18.000000000 +0000
++++ src/config.rs
+@@ -3,16 +3,11 @@ pub const CONFIG: OpenWvConfig = OpenWvConfig {
+ /// go in a configuration file. See the comments on the structs and enums below
+ /// for information on the meaning of each parameter.
+ pub const CONFIG: OpenWvConfig = OpenWvConfig {
+- widevine_device: include_bytes!("../embedded.wvd"),
+ log_level: log::LevelFilter::Info,
+ encrypt_client_id: EncryptClientId::Always,
+ };
+
+ pub struct OpenWvConfig {
+- /// A pywidevine `.wvd` file containing the private key and Client ID to
+- /// present in license requests. You must obtain this on your own.
+- pub widevine_device: &'static [u8],
+-
+ /// This can be overridden by the OPENWV_LOG environment variable, but some
+ /// browsers like Firefox don't let CDMs see the full environment.
+ pub log_level: log::LevelFilter,
Index: pkgsrc/multimedia/openwv/patches/patch-src_openwv.rs
diff -u /dev/null pkgsrc/multimedia/openwv/patches/patch-src_openwv.rs:1.1
--- /dev/null Wed Jan 21 13:59:46 2026
+++ pkgsrc/multimedia/openwv/patches/patch-src_openwv.rs Wed Jan 21 13:59:45 2026
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_openwv.rs,v 1.1 2026/01/21 13:59:45 ryoon Exp $
+
+* Load .wvd data from file. Taken from OpenBSD Ports.
+
+--- src/openwv.rs.orig 2026-01-20 13:27:18.000000000 +0000
++++ src/openwv.rs
+@@ -1,13 +1,13 @@ use std::ffi::{c_char, c_int, c_uchar, c_void};
+ use autocxx::subclass::{CppSubclassSelfOwned, subclass};
+ use log::{debug, error, info, trace, warn};
+ use std::ffi::{c_char, c_int, c_uchar, c_void};
++use std::fs::File;
+ use std::pin::Pin;
+ use std::ptr::{null, null_mut};
+ use std::sync::OnceLock;
+
+ use crate::CdmError;
+ use crate::common_host::{CommonHost, downcast_host};
+-use crate::config::CONFIG;
+ use crate::decrypt::{DecryptError, decrypt_buf};
+ use crate::ffi::cdm;
+ use crate::service_certificate::{ServerCertificate, parse_service_certificate};
+@@ -27,7 +27,11 @@ extern "C" fn InitializeCdmModule_4() {
+
+ info!("OpenWV version {} initializing", env!("CARGO_PKG_VERSION"));
+
+- let mut embedded_wvd = std::io::Cursor::new(CONFIG.widevine_device);
++ let f = File::open("@PKG_SYSCONFDIR@/openwv/widevine_device.wvd");
++ let mut embedded_wvd = match f {
++ Ok(file) => file,
++ Err(_) => return(),
++ };
+ match wvd_file::parse_wvd(&mut embedded_wvd) {
+ Ok(dev) => {
+ if DEVICE.set(dev).is_err() {
Home |
Main Index |
Thread Index |
Old Index