add firefox-hg
This commit is contained in:
		
							parent
							
								
									f5a5840714
								
							
						
					
					
						commit
						357b165cb1
					
				
					 4 changed files with 188 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								gui/firefox-hg/avoid-redefinition.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								gui/firefox-hg/avoid-redefinition.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | ||||||
|  | Author: Rasmus Thomsen <oss@cogitri.dev> | ||||||
|  | Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones | ||||||
|  | (linux/if.h), leading to redefinitions. We need to include net/if.h before | ||||||
|  | linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt | ||||||
|  | Upstream: No | ||||||
|  | --- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig	2020-07-28 19:24:32.359751046 +0200
 | ||||||
|  | +++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c	2020-07-28 19:24:37.856343751 +0200
 | ||||||
|  | @@ -31,6 +31,7 @@
 | ||||||
|  |  */ | ||||||
|  |   | ||||||
|  |  #if defined(LINUX) | ||||||
|  | +#include <net/if.h>
 | ||||||
|  |  #include "addrs-netlink.h" | ||||||
|  |  #include <csi_platform.h> | ||||||
|  |  #include <assert.h> | ||||||
							
								
								
									
										94
									
								
								gui/firefox-hg/build.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								gui/firefox-hg/build.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,94 @@ | ||||||
|  | pkgname=firefox | ||||||
|  | pkgver=26726cd430955db041e5de33d9792bb816c57608 | ||||||
|  | mkdeps="cbindgen:rust" | ||||||
|  | 
 | ||||||
|  | fetch() { | ||||||
|  | 	#curl "https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz" -o $pkgname-$pkgver.tar.xz | ||||||
|  | 	curl "https://hg.mozilla.org/mozilla-unified/archive/26726cd430955db041e5de33d9792bb816c57608.zip" -o $pkgname-$pkgver.zip | ||||||
|  | 	unzip | ||||||
|  | 	mv mozilla-unified-$pkgver $pkgname-$pkgver | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	# patch -p1 < ../../no-x11.patch | ||||||
|  | 	# patch -p1 < ../../fix-clang-as.patch | ||||||
|  | 	patch -p1 < ../../avoid-redefinition.patch | ||||||
|  | 	patch -p1 < ../../libcxx.patch | ||||||
|  | 	patch -p1 < ../../grefptr.patch | ||||||
|  | 	# patch -p1 < ../../sandbox-fork.patch | ||||||
|  | 	# patch -p1 < ../../sandbox-sched.patch | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | build() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	ulimit -n 4096 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	export MACH_USE_SYSTEM_PYTHON=1 | ||||||
|  | 	export CXXSTDLIB=c++ | ||||||
|  | 	export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox/,--enable-new-dtags" | ||||||
|  | 
 | ||||||
|  | 	cat > .mozconfig << EOF | ||||||
|  | ac_add_options --enable-default-toolkit=cairo-gtk3-wayland | ||||||
|  | ac_add_options --prefix=/usr | ||||||
|  | ac_add_options --libdir=/usr/lib | ||||||
|  | ac_add_options --disable-alsa | ||||||
|  | ac_add_options --enable-dbus | ||||||
|  | ac_add_options --enable-strip | ||||||
|  | ac_add_options --enable-release | ||||||
|  | ac_add_options --enable-rust-simd | ||||||
|  | ac_add_options --enable-install-strip | ||||||
|  | ac_add_options --enable-official-branding | ||||||
|  | ac_add_options --enable-application=browser | ||||||
|  | ac_add_options --enable-optimize="-O3 -w" | ||||||
|  | ac_add_options --without-system-libvpx | ||||||
|  | ac_add_options --without-system-ffi | ||||||
|  | ac_add_options --without-system-png | ||||||
|  | ac_add_options --without-system-jpeg | ||||||
|  | ac_add_options --without-system-zlib | ||||||
|  | ac_add_options --without-system-pixman | ||||||
|  | ac_add_options --without-system-nss | ||||||
|  | ac_add_options --without-system-nspr | ||||||
|  | ac_add_options --enable-linker=lld | ||||||
|  | ac_add_options --disable-tests | ||||||
|  | ac_add_options --disable-vtune | ||||||
|  | ac_add_options --disable-updater | ||||||
|  | ac_add_options --disable-jemalloc | ||||||
|  | ac_add_options --disable-callgrind | ||||||
|  | ac_add_options --disable-profiling | ||||||
|  | ac_add_options --disable-necko-wifi | ||||||
|  | ac_add_options --disable-crashreporter | ||||||
|  | ac_add_options --enable-pulseaudio | ||||||
|  | ac_add_options --disable-accessibility | ||||||
|  | ac_add_options --disable-debug | ||||||
|  | ac_add_options --disable-debug-symbols | ||||||
|  | ac_add_options --disable-parental-controls | ||||||
|  | ac_add_options --disable-system-extension-dirs | ||||||
|  | ac_add_options --enable-webrtc | ||||||
|  | ac_add_options --disable-elf-hack | ||||||
|  | ac_add_options --without-wasm-sandboxed-libraries | ||||||
|  | #ac_add_options MOZ_PGO=1 | ||||||
|  | EOF | ||||||
|  | 
 | ||||||
|  | 	bad --gmake --gm4 --autoconf ./mach clobber | ||||||
|  | 	bad --gmake --gm4 --autoconf ./mach build | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | package() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 
 | ||||||
|  | 	export MACH_USE_SYSTEM_PYTHON=1 | ||||||
|  | 	export CXXSTDLIB=c++ | ||||||
|  | 	export RUSTFLAGS='-C target-feature=-crt-static' | ||||||
|  | 	export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox/,--enable-new-dtags" | ||||||
|  | 
 | ||||||
|  | 	DESTDIR=$pkgdir bad --gmake --gm4 --autoconf ./mach install | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | backup() { | ||||||
|  | 	return | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | license() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	cat LICENSE | ||||||
|  | #	cat COPYING | ||||||
|  | } | ||||||
							
								
								
									
										10
									
								
								gui/firefox-hg/grefptr.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								gui/firefox-hg/grefptr.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | ||||||
|  | --- a/widget/gtk/nsClipboard.cpp
 | ||||||
|  | +++ b/widget/gtk/nsClipboard.cpp
 | ||||||
|  | @@ -31,6 +31,7 @@
 | ||||||
|  |  #include "nsIObserverService.h" | ||||||
|  |  #include "mozilla/Services.h" | ||||||
|  |  #include "mozilla/RefPtr.h" | ||||||
|  | +#include "GRefPtr.h"
 | ||||||
|  |  #include "mozilla/SchedulerGroup.h" | ||||||
|  |  #include "mozilla/StaticPrefs_widget.h" | ||||||
|  |  #include "mozilla/TimeStamp.h" | ||||||
							
								
								
									
										69
									
								
								gui/firefox-hg/libcxx.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								gui/firefox-hg/libcxx.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,69 @@ | ||||||
|  | --- a/memory/mozalloc/throw_gcc.h
 | ||||||
|  | +++ b/memory/mozalloc/throw_gcc.h
 | ||||||
|  | @@ -74,50 +74,66 @@ __throw_bad_function_call(void) {
 | ||||||
|  |    mozalloc_abort("fatal: STL threw bad_function_call"); | ||||||
|  |  } | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_logic_error( | ||||||
|  |      const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_domain_error( | ||||||
|  |      const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void | ||||||
|  |  __throw_invalid_argument(const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_length_error( | ||||||
|  |      const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_out_of_range( | ||||||
|  |      const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_runtime_error( | ||||||
|  |      const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_range_error( | ||||||
|  |      const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void | ||||||
|  |  __throw_overflow_error(const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  | +#if !defined(_LIBCPP_VERSION)
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void | ||||||
|  |  __throw_underflow_error(const char* msg) { | ||||||
|  |    mozalloc_abort(msg); | ||||||
|  |  } | ||||||
|  | +#endif  // _LIBCPP_VERSION
 | ||||||
|  | 
 | ||||||
|  |  MOZ_THROW_NORETURN MOZ_THROW_EXPORT MOZ_THROW_INLINE void __throw_ios_failure( | ||||||
|  |      const char* msg) { | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue