pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox Fix webrtc build on recent NetBSD current



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d5b3a2899617
branches:  trunk
changeset: 370412:d5b3a2899617
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Tue Oct 17 03:39:04 2017 +0000

description:
Fix webrtc build on recent NetBSD current
>From rjs@. Thank you.

WebRTC connection works.
However video capture does not work.

diffstat:

 www/firefox/PLIST                                                         |   3 +-
 www/firefox/distinfo                                                      |   4 +-
 www/firefox/options.mk                                                    |   4 +-
 www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c             |  56 ++++++++++
 www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c |  22 +++
 5 files changed, 85 insertions(+), 4 deletions(-)

diffs (146 lines):

diff -r 98d297fb731a -r d5b3a2899617 www/firefox/PLIST
--- a/www/firefox/PLIST Tue Oct 17 03:32:28 2017 +0000
+++ b/www/firefox/PLIST Tue Oct 17 03:39:04 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.123 2017/09/30 05:34:11 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.124 2017/10/17 03:39:04 ryoon Exp $
 bin/firefox
 lib/firefox/application.ini
 lib/firefox/browser/blocklist.xml
@@ -3295,6 +3295,7 @@
 lib/firefox/chrome/toolkit/content/global/autocomplete.css
 lib/firefox/chrome/toolkit/content/global/backgroundPageThumbs.xhtml
 lib/firefox/chrome/toolkit/content/global/backgroundPageThumbsContent.js
+${PLIST.webrtc}lib/firefox/components/PeerConnection.js
 lib/firefox/chrome/toolkit/content/global/bindings/autocomplete.xml
 lib/firefox/chrome/toolkit/content/global/bindings/browser.xml
 lib/firefox/chrome/toolkit/content/global/bindings/button.xml
diff -r 98d297fb731a -r d5b3a2899617 www/firefox/distinfo
--- a/www/firefox/distinfo      Tue Oct 17 03:32:28 2017 +0000
+++ b/www/firefox/distinfo      Tue Oct 17 03:39:04 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.296 2017/09/30 05:34:11 ryoon Exp $
+$NetBSD: distinfo,v 1.297 2017/10/17 03:39:04 ryoon Exp $
 
 SHA1 (firefox-56.0.source.tar.xz) = 806cb335752ee93b204750b89dc6940768408088
 RMD160 (firefox-56.0.source.tar.xz) = b5239242e55e3031838c9807bff47b5b9c9fb420
@@ -70,6 +70,8 @@
 SHA1 (patch-mozglue_build_arm.cpp) = f41ace63b3f1d2a8ccaffc98c3c64d1e22af5249
 SHA1 (patch-mozglue_build_arm.h) = 5e272f4e19b9681d43a63c45d78b0e44a392c7dc
 SHA1 (patch-netwerk_dns_moz.build) = d4ad35ee7152ca206156403954cbd247d1252ab0
+SHA1 (patch-netwerk_srtp_src_crypto_hash_hmac.c) = 8ba57212adca077fb5cfa50d752a97b0e3becc6d
+SHA1 (patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c) = 08f3a347745b5529749328ad3a070fb78a75c1e9
 SHA1 (patch-servo_components_style_build__gecko.rs) = fca2260a70b496fc010f165ff4d68788b7e28632
 SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = 5ffb0782bbbff2fd17ad71e98b349b4ec3dc6c8c
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = 5b6d2e5c9f685d32894898d3ef3aec09a1a1e5ce
diff -r 98d297fb731a -r d5b3a2899617 www/firefox/options.mk
--- a/www/firefox/options.mk    Tue Oct 17 03:32:28 2017 +0000
+++ b/www/firefox/options.mk    Tue Oct 17 03:39:04 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.42 2017/08/10 14:46:15 ryoon Exp $
+# $NetBSD: options.mk,v 1.43 2017/10/17 03:39:04 ryoon Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.firefox
 
@@ -13,7 +13,6 @@
 PKG_SUGGESTED_OPTIONS+=        oss dbus
 .endif
 
-# On NetBSD/amd64 6.99.21 libxul.so is invalid when --enable-webrtc is set.
 PKG_SUGGESTED_OPTIONS.Linux+=  webrtc
 
 .include "../../mk/bsd.options.mk"
@@ -100,6 +99,7 @@
 .if !empty(PKG_OPTIONS:Mwebrtc)
 .include "../../graphics/libv4l/buildlink3.mk"
 CONFIGURE_ARGS+=       --enable-webrtc
+PLIST.webrtc=          yes
 .else
 CONFIGURE_ARGS+=       --disable-webrtc
 .endif
diff -r 98d297fb731a -r d5b3a2899617 www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c     Tue Oct 17 03:39:04 2017 +0000
@@ -0,0 +1,56 @@
+$NetBSD: patch-netwerk_srtp_src_crypto_hash_hmac.c,v 1.4 2017/10/17 03:39:04 ryoon Exp $
+
+--- netwerk/srtp/src/crypto/hash/hmac.c.orig   2017-06-15 20:52:29.000000000 +0000
++++ netwerk/srtp/src/crypto/hash/hmac.c
+@@ -55,7 +55,7 @@ debug_module_t mod_hmac = {
+ 
+ err_status_t
+ hmac_alloc(auth_t **a, int key_len, int out_len) {
+-  extern auth_type_t hmac;
++  extern auth_type_t hmac_auth;
+   uint8_t *pointer;
+ 
+   debug_print(mod_hmac, "allocating auth func with key length %d", key_len);
+@@ -79,21 +79,21 @@ hmac_alloc(auth_t **a, int key_len, int 
+ 
+   /* set pointers */
+   *a = (auth_t *)pointer;
+-  (*a)->type = &hmac;
++  (*a)->type = &hmac_auth;
+   (*a)->state = pointer + sizeof(auth_t);  
+   (*a)->out_len = out_len;
+   (*a)->key_len = key_len;
+   (*a)->prefix_len = 0;
+ 
+   /* increment global count of all hmac uses */
+-  hmac.ref_count++;
++  hmac_auth.ref_count++;
+ 
+   return err_status_ok;
+ }
+ 
+ err_status_t
+ hmac_dealloc(auth_t *a) {
+-  extern auth_type_t hmac;
++  extern auth_type_t hmac_auth;
+   
+   /* zeroize entire state*/
+   octet_string_set_to_zero((uint8_t *)a, 
+@@ -103,7 +103,7 @@ hmac_dealloc(auth_t *a) {
+   crypto_free(a);
+   
+   /* decrement global count of all hmac uses */
+-  hmac.ref_count--;
++  hmac_auth.ref_count--;
+ 
+   return err_status_ok;
+ }
+@@ -252,7 +252,7 @@ char hmac_description[] = "hmac sha-1 au
+  */
+ 
+ auth_type_t
+-hmac  = {
++hmac_auth  = {
+   (auth_alloc_func)      hmac_alloc,
+   (auth_dealloc_func)    hmac_dealloc,
+   (auth_init_func)       hmac_init,
diff -r 98d297fb731a -r d5b3a2899617 www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c Tue Oct 17 03:39:04 2017 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c,v 1.3 2017/10/17 03:39:04 ryoon Exp $
+
+--- netwerk/srtp/src/crypto/kernel/crypto_kernel.c.orig        2017-06-15 20:52:29.000000000 +0000
++++ netwerk/srtp/src/crypto/kernel/crypto_kernel.c
+@@ -77,7 +77,7 @@ extern cipher_type_t aes_cbc;
+  */
+ 
+ extern auth_type_t null_auth;
+-extern auth_type_t hmac;
++extern auth_type_t hmac_auth;
+ 
+ /* crypto_kernel is a global variable, the only one of its datatype */
+ 
+@@ -162,7 +162,7 @@ crypto_kernel_init() {
+   status = crypto_kernel_load_auth_type(&null_auth, NULL_AUTH);
+   if (status)
+     return status;
+-  status = crypto_kernel_load_auth_type(&hmac, HMAC_SHA1);
++  status = crypto_kernel_load_auth_type(&hmac_auth, HMAC_SHA1);
+   if (status)
+     return status;
+ 



Home | Main Index | Thread Index | Old Index