mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-22 07:10:16 -07:00
firefox: Simpler build process
This commit is contained in:
parent
d2f715bda9
commit
444830a73a
@ -1,5 +1,8 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Down to one patch!!!! (Thank you to Michael Forney).
|
||||
patch -p1 < no-dbus.patch
|
||||
|
||||
# Build autoconf 2.13 for Firefox's sole use.
|
||||
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642
|
||||
(
|
||||
@ -25,36 +28,66 @@
|
||||
make
|
||||
make install
|
||||
)
|
||||
|
||||
export DESTDIR="$1"
|
||||
export PATH="$PWD/junk/bin:$PATH"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox"
|
||||
export CC="${CC:-gcc}"
|
||||
export CXX="${CXX:-g++}"
|
||||
export MOZ_NOSPAM=1
|
||||
|
||||
# Keep memory usage as low as possible.
|
||||
export LDFLAGS="$LDFLAGS -Wl,--as-needed -Wl,--no-keep-memory -Wl,--stats"
|
||||
export MOZ_LINK_FLAGS="$LDFLAGS"
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
export CC="${CC:-clang}"
|
||||
export CXX="${CXX:-clang++}"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox"
|
||||
export MOZ_DEBUG_FLAGS=-g0
|
||||
export MOZ_NOSPAM=1
|
||||
export RUSTFLAGS=-Cdebuginfo=0
|
||||
|
||||
# Hide all compiler warnings.
|
||||
export CFLAGS="$CFLAGS -w"
|
||||
../configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--enable-official-branding \
|
||||
--enable-optimize="$CFLAGS -w" \
|
||||
--enable-install-strip \
|
||||
--enable-strip \
|
||||
--enable-rust-simd \
|
||||
--enable-application=browser \
|
||||
--enable-release \
|
||||
--enable-alsa \
|
||||
--without-system-nspr \
|
||||
--without-system-nss \
|
||||
--with-system-jpeg \
|
||||
--with-system-zlib \
|
||||
--with-system-bz2 \
|
||||
--with-system-png \
|
||||
--with-system-libvpx \
|
||||
--with-system-pixman \
|
||||
--with-system-ffi \
|
||||
--disable-gconf \
|
||||
--disable-profiling \
|
||||
--disable-accessibility \
|
||||
--disable-tests \
|
||||
--disable-system-extension-dirs \
|
||||
--disable-parental-controls \
|
||||
--disable-debug-symbols \
|
||||
--disable-callgrind \
|
||||
--disable-vtune \
|
||||
--disable-elf-hack \
|
||||
--disable-gold \
|
||||
--disable-jemalloc \
|
||||
--disable-pulseaudio \
|
||||
--disable-startup-notification \
|
||||
--disable-crashreporter \
|
||||
--disable-updater \
|
||||
--disable-dbus \
|
||||
--disable-eme \
|
||||
--disable-necko-wifi
|
||||
|
||||
# Down to one patch!!!! (Thank you to Michael Forney).
|
||||
patch -p1 < no-dbus.patch
|
||||
|
||||
printf 'mk_add_options MOZ_MAKE_FLAGS="%s"\n' "${MAKEFLAGS:--j1 -l1}" \
|
||||
>> mozconfig
|
||||
|
||||
./mach build
|
||||
./mach install
|
||||
make
|
||||
make DESTDIR="$1" install
|
||||
|
||||
# Remove a lot of uneeded "stuff".
|
||||
rm -rf "$1/usr/include"
|
||||
rm -rf "$1/usr/lib/firefox-devel"
|
||||
rm -rf "$1/usr/share/idl"
|
||||
rm -rf "$1/usr/lib/firefox/gtk2"
|
||||
rm -rf "$1/usr/lib/firefox/gtk2" # Drop GTK+2 runtime dependency.
|
||||
rm -f "$1/usr/lib/firefox/browser/features/fxmonitor@mozilla.org.xpi"
|
||||
rm -f "$1/usr/lib/firefox/browser/features/screenshots@mozilla.org.xpi"
|
||||
rm -f "$1/usr/lib/firefox/browser/features/webcompat-reporter@mozilla.org.xpi"
|
||||
|
@ -1,6 +1,4 @@
|
||||
3b7b97b0b0625fc6ec23ee28d425988c679d3a56f362d62fd3b225a5d50afdc8 firefox-76.0.source.tar.xz
|
||||
f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e autoconf-2.13.tar.gz
|
||||
3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f yasm-1.3.0.tar.gz
|
||||
6e2832f39b8ccbef29f45208adf6b9dcf9c6d940ac211e6da6fa480e5f912e86 mozconfig
|
||||
960d82bbfdc88c95f5cb4f2e1c1bf23dae7519b3b7203914d7b3ddbff1ba4c28 stab.h
|
||||
4e12889240bd9603608f9a268ca8fd45f990eafc78847ff2c10a749670e83eb7 no-dbus.patch
|
||||
|
@ -1,58 +0,0 @@
|
||||
ac_add_options --prefix=/usr
|
||||
ac_add_options --libdir=/usr/lib
|
||||
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-optimize="$CFLAGS"
|
||||
ac_add_options --enable-install-strip
|
||||
ac_add_options --enable-strip
|
||||
|
||||
ac_add_options --without-system-nspr
|
||||
ac_add_options --without-system-nss
|
||||
ac_add_options --with-system-jpeg
|
||||
ac_add_options --with-system-zlib
|
||||
ac_add_options --with-system-bz2
|
||||
ac_add_options --with-system-png
|
||||
|
||||
# System 'libvpx' is too new.
|
||||
ac_add_options --without-system-libvpx
|
||||
|
||||
ac_add_options --with-system-pixman
|
||||
ac_add_options --with-system-ffi
|
||||
|
||||
ac_add_options --disable-gconf
|
||||
ac_add_options --disable-profiling
|
||||
ac_add_options --disable-accessibility
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-system-extension-dirs
|
||||
ac_add_options --disable-parental-controls
|
||||
ac_add_options --disable-debug-symbols
|
||||
ac_add_options --disable-callgrind
|
||||
ac_add_options --disable-vtune
|
||||
|
||||
# Settings for musl.
|
||||
ac_add_options --disable-elf-hack
|
||||
ac_add_options --disable-gold
|
||||
ac_add_options --disable-jemalloc
|
||||
ac_add_options --enable-release
|
||||
|
||||
# ALSA/PulseAudio (removed in 70 (still present in 71b4(?!))
|
||||
ac_add_options --disable-pulseaudio
|
||||
ac_add_options --enable-alsa
|
||||
|
||||
ac_add_options --disable-startup-notification
|
||||
|
||||
# Respect the user.
|
||||
ac_add_options MOZ_SERVICES_METRICS=
|
||||
ac_add_options MOZ_PAY=
|
||||
ac_add_options MOZ_SERVICES_HEALTHREPORTER=
|
||||
ac_add_options MOZ_SERVICES_FXACCOUNTS=
|
||||
ac_add_options MOZ_SERVICES_METRICS=
|
||||
ac_add_options MOZ_DATA_REPORTING=
|
||||
ac_add_options MOZ_DEVICES=
|
||||
ac_add_options MOZ_REQUIRE_SIGNING=
|
||||
ac_add_options MOZ_TELEMETRY_REPORTING=
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-dbus
|
||||
ac_add_options --disable-eme
|
||||
ac_add_options --disable-necko-wifi
|
@ -1,71 +0,0 @@
|
||||
/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
|
||||
/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)stab.h 5.2 (Berkeley) 4/4/91
|
||||
*/
|
||||
|
||||
#ifndef _STAB_H_
|
||||
#define _STAB_H_
|
||||
|
||||
/*
|
||||
* The following are symbols used by various debuggers and by the Pascal
|
||||
* compiler. Each of them must have one (or more) of the bits defined by
|
||||
* the N_STAB mask set.
|
||||
*/
|
||||
|
||||
#define N_GSYM 0x20 /* global symbol */
|
||||
#define N_FNAME 0x22 /* F77 function name */
|
||||
#define N_FUN 0x24 /* procedure name */
|
||||
#define N_STSYM 0x26 /* data segment variable */
|
||||
#define N_LCSYM 0x28 /* bss segment variable */
|
||||
#define N_MAIN 0x2a /* main function name */
|
||||
#define N_PC 0x30 /* global Pascal symbol */
|
||||
#define N_RSYM 0x40 /* register variable */
|
||||
#define N_SLINE 0x44 /* text segment line number */
|
||||
#define N_DSLINE 0x46 /* data segment line number */
|
||||
#define N_BSLINE 0x48 /* bss segment line number */
|
||||
#define N_SSYM 0x60 /* structure/union element */
|
||||
#define N_SO 0x64 /* main source file name */
|
||||
#define N_LSYM 0x80 /* stack variable */
|
||||
#define N_BINCL 0x82 /* include file beginning */
|
||||
#define N_SOL 0x84 /* included source file name */
|
||||
#define N_PSYM 0xa0 /* parameter variable */
|
||||
#define N_EINCL 0xa2 /* include file end */
|
||||
#define N_ENTRY 0xa4 /* alternate entry point */
|
||||
#define N_LBRAC 0xc0 /* left bracket */
|
||||
#define N_EXCL 0xc2 /* deleted include file */
|
||||
#define N_RBRAC 0xe0 /* right bracket */
|
||||
#define N_BCOMM 0xe2 /* begin common */
|
||||
#define N_ECOMM 0xe4 /* end common */
|
||||
#define N_ECOML 0xe8 /* end common (local name) */
|
||||
#define N_LENG 0xfe /* length of preceding entry */
|
||||
|
||||
#endif /* !_STAB_H_ */
|
@ -11,7 +11,4 @@ NOTE: Install the 'firefox-privacy' package to
|
||||
NOTE: This includes more telemetry removals,
|
||||
hardened settings, no phoning-home etc.
|
||||
|
||||
-> kiss b firefox-privacy
|
||||
-> kiss i firefox-privacy
|
||||
|
||||
EOF
|
||||
|
@ -1,6 +1,4 @@
|
||||
https://ftp.mozilla.org/pub/firefox/releases/76.0/source/firefox-76.0.source.tar.xz
|
||||
https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/
|
||||
https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz yasm/
|
||||
files/mozconfig
|
||||
files/stab.h toolkit/crashreporter/google-breakpad/src/
|
||||
patches/no-dbus.patch
|
||||
|
Loading…
Reference in New Issue
Block a user