pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/firefox Add support for NetBSD/aarch64 and arm.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c5f7e45c3530
branches:  trunk
changeset: 330284:c5f7e45c3530
user:      rin <rin%pkgsrc.org@localhost>
date:      Tue Feb 26 12:14:12 2019 +0000

description:
Add support for NetBSD/aarch64 and arm.

This includes patches for third_party/rust/libc 2.43, which requires
hack to overwrite checksum fields in .cargo-checksum.json. These will
become unnecessary if libc >= 2.45 is imported.

For aarch64,

- python locks up randomly when "make configure"; see lib/54017:
http://gnats.netbsd.org/54017

- nodejs randomly(?) crashes sometimes.

However, if you are luckly enough ;-), you will have a working binary.

Bump revision.

diffstat:

 www/firefox/Makefile                                                                         |  14 +++++-
 www/firefox/PLIST                                                                            |   6 +-
 www/firefox/distinfo                                                                         |   4 +-
 www/firefox/mozilla-common.mk                                                                |  11 ++-
 www/firefox/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs       |  16 ++++++
 www/firefox/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_other_mod.rs |  26 ++++++++++
 6 files changed, 68 insertions(+), 9 deletions(-)

diffs (151 lines):

diff -r 6c71aca67678 -r c5f7e45c3530 www/firefox/Makefile
--- a/www/firefox/Makefile      Tue Feb 26 12:14:10 2019 +0000
+++ b/www/firefox/Makefile      Tue Feb 26 12:14:12 2019 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.359 2019/02/19 15:23:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.360 2019/02/26 12:14:12 rin Exp $
 
 FIREFOX_VER=           ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=            65.0
 MOZ_BRANCH_MINOR=      .1
+PKGREVISION=           1
 
 DISTNAME=      firefox-${FIREFOX_VER}.source
 PKGNAME=       ${DISTNAME:S/.source//:S/b/beta/:S/esr//}
@@ -75,6 +76,17 @@
 
 post-extract:
        mv ${WRKSRC}/gfx/ycbcr/yuv_row_arm.s ${WRKSRC}/gfx/ycbcr/yuv_row_arm.S
+# XXX Hack taken from lang/rust.
+# patch(1) in NetBSD does not handle .cargo-checksum.json like long width file.
+# Replace checksum fields for following patches:
+# patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs,v 1.1
+# patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_other_mod.rs,v 1.1
+       ${CP} ${WRKSRC}/third_party/rust/libc/.cargo-checksum.json \
+             ${WRKSRC}/third_party/rust/libc/.cargo-checksum.json.orig
+       ${CAT} ${WRKSRC}/third_party/rust/libc/.cargo-checksum.json.orig | \
+               ${SED} -e 's/4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212/7f3da734d5e2e9426051da4f406e46d9e9bed43ed2d7d048e8afc8af7ed44795/' | \
+               ${SED} -e 's/1cd66ed5967c788562d4ad626cfbeb1544f4b9267111de5f6790379b8327f28e/6ae549dd21581748b2f1d82880eaca3445c11e3354965e5b49b20342075a3e52/' \
+               > ${WRKSRC}/third_party/rust/libc/.cargo-checksum.json
 
 pre-configure:
        cd ${WRKSRC} && autoconf
diff -r 6c71aca67678 -r c5f7e45c3530 www/firefox/PLIST
--- a/www/firefox/PLIST Tue Feb 26 12:14:10 2019 +0000
+++ b/www/firefox/PLIST Tue Feb 26 12:14:12 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.136 2019/01/29 16:28:22 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.137 2019/02/26 12:14:12 rin Exp $
 bin/firefox
 lib/firefox/actors/AudibleAutoplayChild.jsm
 lib/firefox/actors/AudioPlaybackChild.jsm
@@ -4938,8 +4938,8 @@
 lib/firefox/hyphenation/hyph_tr.dic
 lib/firefox/hyphenation/hyph_uk.dic
 lib/firefox/liblgpllibs.so
-${PLIST.avx86}lib/firefox/libmozavcodec.so
-${PLIST.avx86}lib/firefox/libmozavutil.so
+${PLIST.ffvpx}lib/firefox/libmozavcodec.so
+${PLIST.ffvpx}lib/firefox/libmozavutil.so
 lib/firefox/libmozgtk.so
 lib/firefox/libmozsqlite3.so
 lib/firefox/libxul.so
diff -r 6c71aca67678 -r c5f7e45c3530 www/firefox/distinfo
--- a/www/firefox/distinfo      Tue Feb 26 12:14:10 2019 +0000
+++ b/www/firefox/distinfo      Tue Feb 26 12:14:12 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.338 2019/02/19 15:23:53 ryoon Exp $
+$NetBSD: distinfo,v 1.339 2019/02/26 12:14:12 rin Exp $
 
 SHA1 (firefox-65.0.1.source.tar.xz) = 5b3a64d5c843f4e23cb3220a3211077bc58cba34
 RMD160 (firefox-65.0.1.source.tar.xz) = 397345aa64b18771f7f82c41c146ee19d4865343
@@ -30,6 +30,8 @@
 SHA1 (patch-media_libpng_pngpriv.h) = c8084332560017cd7c9b519b61d125fa28af0dbc
 SHA1 (patch-python_mozbuild_mozbuild_action_check__binary.py) = 8103ca9f95fe98a4461c97abcd4cafd5ae5294f0
 SHA1 (patch-servo_components_style_build__gecko.rs) = dacdcb69de1c8409bda20b11afbfa49624005c72
+SHA1 (patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs) = bacab47c65bd9d3f5686426f1026edccda66942f
+SHA1 (patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_other_mod.rs) = 7af37abb3bf0674591192146476ea46ca180b5ab
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = 082aa7830b33cb91c2606fb06059d544c70a7e62
 SHA1 (patch-toolkit_library_moz.build) = 102e3713552c26f76e8b4e473846bb8fbc44b278
 SHA1 (patch-toolkit_moz.configure) = 40ee147cc1d2c62dd6c83b3f67ce9e61f758ea57
diff -r 6c71aca67678 -r c5f7e45c3530 www/firefox/mozilla-common.mk
--- a/www/firefox/mozilla-common.mk     Tue Feb 26 12:14:10 2019 +0000
+++ b/www/firefox/mozilla-common.mk     Tue Feb 26 12:14:12 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.125 2019/02/21 23:56:51 gutteridge Exp $
+# $NetBSD: mozilla-common.mk,v 1.126 2019/02/26 12:14:12 rin Exp $
 #
 # common Makefile fragment for mozilla packages based on gecko 2.0.
 #
@@ -133,15 +133,18 @@
 CONFIGURE_DIRS=                ${OBJDIR}
 CONFIGURE_SCRIPT=      ${WRKSRC}/configure
 
-PLIST_VARS+=   sps vorbis tremor glskia throwwrapper mozglue avx86
+PLIST_VARS+=   sps vorbis tremor glskia throwwrapper mozglue ffvpx
 
 .include "../../mk/endian.mk"
 .if ${MACHINE_ENDIAN} == "little"
 PLIST.glskia=  yes
 .endif
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-PLIST.avx86=   yes     # see media/libav/README_MOZILLA: only used on x86
+.if ${MACHINE_ARCH} == "aarch64" || \
+    !empty(MACHINE_ARCH:M*arm*) || \
+    ${MACHINE_ARCH} == "i386" || \
+    ${MACHINE_ARCH} == "x86_64"
+PLIST.ffvpx=   yes     # see media/ffvpx/ffvpxcommon.mozbuild
 .endif
 
 .if ${MACHINE_ARCH} != "sparc64"
diff -r 6c71aca67678 -r c5f7e45c3530 www/firefox/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs    Tue Feb 26 12:14:12 2019 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_mod.rs,v 1.1 2019/02/26 12:14:12 rin Exp $
+
+Hack for rust/libc 2.43. No need if libc >= 2.45 is imported.
+
+XXX This requires to overwrite checksum field in
+XXX third_party/rust/libc/.cargo-checksum.json
+
+--- third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs.orig   2019-02-25 14:11:08.927293182 +0900
++++ third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs        2019-02-25 17:36:14.206597084 +0900
+@@ -1,6 +1,5 @@
+ use dox::mem;
+ 
+-pub type c_char = i8;
+ pub type clock_t = ::c_uint;
+ pub type suseconds_t = ::c_int;
+ pub type dev_t = u64;
diff -r 6c71aca67678 -r c5f7e45c3530 www/firefox/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_other_mod.rs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_other_mod.rs      Tue Feb 26 12:14:12 2019 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-third__party_rust_libc_src_unix_bsd_netbsdlike_netbsd_other_mod.rs,v 1.1 2019/02/26 12:14:12 rin Exp $
+
+Hack for rust/libc 2.43. No need if libc >= 2.45 is imported.
+
+XXX This requires to overwrite checksum field in
+XXX third_party/rust/libc/.cargo-checksum.json
+
+--- third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/other/mod.rs.orig     2019-02-25 14:01:02.721786754 +0900
++++ third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/other/mod.rs  2019-02-25 17:36:24.225942932 +0900
+@@ -1,5 +1,15 @@
+ cfg_if! {
+-    if #[cfg(any(target_arch = "sparc64",
++    if #[cfg(any(target_arch = "aarch64",
++                 target_arch = "arm"))] {
++        pub type c_char = u8;
++    } else {
++        pub type c_char = i8;
++    }
++}
++
++cfg_if! {
++    if #[cfg(any(target_arch = "aarch64",
++                 target_arch = "sparc64",
+                  target_arch = "x86_64"))] {
+         mod b64;
+         pub use self::b64::*;



Home | Main Index | Thread Index | Old Index