diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-05-24 12:22:12 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-05-24 12:22:12 +0800 |
| commit | 46ca440e9d6cc606d9c3233021e32d24b25172cf (patch) | |
| tree | eeb573e47ac56498fbf74bda6d22fac47038ecab /repos/extra/firefox | |
| parent | 8c2e7bb570c11a51fdcecf7302af4058757d862c (diff) | |
| download | alicelinux-46ca440e9d6cc606d9c3233021e32d24b25172cf.tar.gz alicelinux-46ca440e9d6cc606d9c3233021e32d24b25172cf.zip | |
added repos
Diffstat (limited to 'repos/extra/firefox')
| -rw-r--r-- | repos/extra/firefox/.files | 55 | ||||
| -rw-r--r-- | repos/extra/firefox/build | 82 | ||||
| -rw-r--r-- | repos/extra/firefox/depends | 14 | ||||
| -rw-r--r-- | repos/extra/firefox/fix-target-detection.patch | 19 | ||||
| -rw-r--r-- | repos/extra/firefox/info | 5 |
5 files changed, 175 insertions, 0 deletions
diff --git a/repos/extra/firefox/.files b/repos/extra/firefox/.files new file mode 100644 index 00000000..cacb68c8 --- /dev/null +++ b/repos/extra/firefox/.files @@ -0,0 +1,55 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +lrwxrwxrwx root/root usr/bin/firefox -> /usr/lib/firefox/firefox +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/firefox/ +-rw-r--r-- root/root usr/lib/firefox/application.ini +drwxr-xr-x root/root usr/lib/firefox/browser/ +drwxr-xr-x root/root usr/lib/firefox/browser/chrome/ +drwxr-xr-x root/root usr/lib/firefox/browser/chrome/icons/ +drwxr-xr-x root/root usr/lib/firefox/browser/chrome/icons/default/ +-rw-r--r-- root/root usr/lib/firefox/browser/chrome/icons/default/default128.png +-rw-r--r-- root/root usr/lib/firefox/browser/chrome/icons/default/default16.png +-rw-r--r-- root/root usr/lib/firefox/browser/chrome/icons/default/default32.png +-rw-r--r-- root/root usr/lib/firefox/browser/chrome/icons/default/default48.png +-rw-r--r-- root/root usr/lib/firefox/browser/chrome/icons/default/default64.png +drwxr-xr-x root/root usr/lib/firefox/browser/features/ +-rw-r--r-- root/root usr/lib/firefox/browser/features/formautofill@mozilla.org.xpi +-rw-r--r-- root/root usr/lib/firefox/browser/features/pictureinpicture@mozilla.org.xpi +-rw-r--r-- root/root usr/lib/firefox/browser/features/screenshots@mozilla.org.xpi +-rw-r--r-- root/root usr/lib/firefox/browser/features/webcompat-reporter@mozilla.org.xpi +-rw-r--r-- root/root usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi +-rw-r--r-- root/root usr/lib/firefox/browser/omni.ja +drwxr-xr-x root/root usr/lib/firefox/defaults/ +drwxr-xr-x root/root usr/lib/firefox/defaults/pref/ +-rw-r--r-- root/root usr/lib/firefox/defaults/pref/channel-prefs.js +-rw-r--r-- root/root usr/lib/firefox/dependentlibs.list +-rwxr-xr-x root/root usr/lib/firefox/firefox +-rwxr-xr-x root/root usr/lib/firefox/firefox-bin +drwxr-xr-x root/root usr/lib/firefox/fonts/ +-rw-r--r-- root/root usr/lib/firefox/fonts/TwemojiMozilla.ttf +-rwxr-xr-x root/root usr/lib/firefox/glxtest +drwxr-xr-x root/root usr/lib/firefox/gmp-clearkey/ +drwxr-xr-x root/root usr/lib/firefox/gmp-clearkey/0.1/ +-rwxr-xr-x root/root usr/lib/firefox/gmp-clearkey/0.1/libclearkey.so +-rw-r--r-- root/root usr/lib/firefox/gmp-clearkey/0.1/manifest.json +-rwxr-xr-x root/root usr/lib/firefox/libgkcodecs.so +-rwxr-xr-x root/root usr/lib/firefox/libipcclientcerts.so +-rwxr-xr-x root/root usr/lib/firefox/liblgpllibs.so +-rwxr-xr-x root/root usr/lib/firefox/libmozavcodec.so +-rwxr-xr-x root/root usr/lib/firefox/libmozavutil.so +-rwxr-xr-x root/root usr/lib/firefox/libmozgtk.so +-rwxr-xr-x root/root usr/lib/firefox/libmozsandbox.so +-rwxr-xr-x root/root usr/lib/firefox/libmozsqlite3.so +-rwxr-xr-x root/root usr/lib/firefox/libmozwayland.so +-rwxr-xr-x root/root usr/lib/firefox/libxul.so +-rw-r--r-- root/root usr/lib/firefox/omni.ja +-rwxr-xr-x root/root usr/lib/firefox/pingsender +-rw-r--r-- root/root usr/lib/firefox/platform.ini +-rw-r--r-- root/root usr/lib/firefox/removed-files +-rwxr-xr-x root/root usr/lib/firefox/vaapitest +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/applications/ +-rw-r--r-- root/root usr/share/applications/firefox.desktop +drwxr-xr-x root/root usr/share/pixmaps/ +lrwxrwxrwx root/root usr/share/pixmaps/firefox.png -> /usr/lib/firefox/browser/chrome/icons/default/default128.png diff --git a/repos/extra/firefox/build b/repos/extra/firefox/build new file mode 100644 index 00000000..fc368bb8 --- /dev/null +++ b/repos/extra/firefox/build @@ -0,0 +1,82 @@ +#pkg-config --exist apulse && _opt=",pulseaudio" + +export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system +export MOZBUILD_STATE_PATH=${PWD}/mozbuild + +cat > .mozconfig << EOF +ac_add_options --prefix=/usr +ac_add_options --libdir=/usr/lib +ac_add_options --enable-default-toolkit=cairo-gtk3-wayland-only +ac_add_options --enable-strip +ac_add_options --enable-release +#ac_add_options --enable-rust-simd +ac_add_options --enable-audio-backends=alsa$_opt +ac_add_options --enable-install-strip +ac_add_options --enable-official-branding +ac_add_options --enable-application=browser +ac_add_options --enable-optimize +ac_add_options --with-system-ffi +ac_add_options --with-system-jpeg +ac_add_options --with-system-libvpx +ac_add_options --with-system-nspr +ac_add_options --with-system-nss +ac_add_options --with-system-pixman +ac_add_options --with-system-png +ac_add_options --with-system-webp +ac_add_options --with-system-zlib +ac_add_options --without-wasm-sandboxed-libraries +ac_add_options --disable-eme +#ac_add_options --disable-dbus +ac_add_options --disable-tests +ac_add_options --disable-vtune +ac_add_options --disable-updater +ac_add_options --disable-jemalloc +ac_add_options --disable-elf-hack +ac_add_options --disable-callgrind +ac_add_options --disable-profiling +ac_add_options --disable-necko-wifi +ac_add_options --disable-crashreporter +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 +EOF + +if [ -e '/usr/bin/ccache' ]; then + echo 'ac_add_options --enable-ccache' >> .mozconfig + PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//') +fi + +# XXX: failed to build with clang +#export CC=gcc +#export CXX=g++ + +export CFLAGS="$CFLAGS -w" +export CXXFLAGS="$CXXFLAGS -w" +export LDFLAGS="$LDFLAGS -Wl,-rpath=/usr/lib/firefox,--enable-new-dtags" + +./mach build +./mach install + +mkdir -pv $PKG/usr/share/applications +mkdir -pv $PKG/usr/share/pixmaps + +cat > $PKG/usr/share/applications/firefox.desktop << EOF +[Desktop Entry] +Encoding=UTF-8 +Name=Firefox Web Browser +Comment=Browse the World Wide Web +GenericName=Web Browser +Exec=firefox %u +Terminal=false +Type=Application +Icon=firefox +Categories=GNOME;GTK;Network;WebBrowser; +MimeType=text/xml;text/mml;text/html;application/xhtml+xml;application/vnd.mozilla.xul+xml;x-scheme-handler/http;x-scheme-handler/https +StartupNotify=true +EOF + +mkdir -p $PKG/usr/share/pixmaps +ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \ + $PKG/usr/share/pixmaps/firefox.png diff --git a/repos/extra/firefox/depends b/repos/extra/firefox/depends new file mode 100644 index 00000000..9c84f228 --- /dev/null +++ b/repos/extra/firefox/depends @@ -0,0 +1,14 @@ +rust +alsa-utils +nspr +clang +rust +cbindgen +icu +nodejs +gtk3 +libwebp +libvpx +nasm +nss +libevent diff --git a/repos/extra/firefox/fix-target-detection.patch b/repos/extra/firefox/fix-target-detection.patch new file mode 100644 index 00000000..8e115a3d --- /dev/null +++ b/repos/extra/firefox/fix-target-detection.patch @@ -0,0 +1,19 @@ +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index 7a2fd1a..ba5ba62 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -403,9 +403,13 @@ def detect_rustc_target( + ] + if len(narrowed) == 1: + return narrowed[0].rust_target ++ elif narrowed: ++ candidates = narrowed ++ ++ aliased_vendor = "unknown" if host_or_target.vendor == "pc" else host_or_target.vendor + + # Finally, see if the vendor can be used to disambiguate. +- narrowed = [c for c in candidates if c.target.vendor == host_or_target.vendor] ++ narrowed = [c for c in candidates if c.target.vendor == aliased_vendor] + if len(narrowed) == 1: + return narrowed[0].rust_target + diff --git a/repos/extra/firefox/info b/repos/extra/firefox/info new file mode 100644 index 00000000..253f8947 --- /dev/null +++ b/repos/extra/firefox/info @@ -0,0 +1,5 @@ +name=firefox +version=126.0 +release=1 +source="https://ftp.mozilla.org/pub/${name}/releases/${version}/source/${name}-${version}.source.tar.xz + fix-target-detection.patch" |