From 18cf0c96933e2acd5f11f72b6249224c85abb4f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Thu, 29 Oct 2020 12:19:41 +0100 Subject: [PATCH] icecat: fix cross build --- srcpkgs/icecat/patches/fix-cross.patch | 16 ++++++++++++++++ srcpkgs/icecat/template | 12 +++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/icecat/patches/fix-cross.patch diff --git a/srcpkgs/icecat/patches/fix-cross.patch b/srcpkgs/icecat/patches/fix-cross.patch new file mode 100644 index 0000000000..9b8a816d26 --- /dev/null +++ b/srcpkgs/icecat/patches/fix-cross.patch @@ -0,0 +1,16 @@ +terrible hack to fix cross builds +overwrite HOST_* flags to get rid of -MF + +note: this patch was used from firefox-77 until 80, dropped with the update to 81 + +--- third_party/rust/glslopt/build.rs ++++ third_party/rust/glslopt/build.rs +@@ -28,6 +28,8 @@ + env::remove_var(format!("CXXFLAGS_{}", &target)); + env::remove_var(format!("CFLAGS_{}", target.replace("-", "_"))); + env::remove_var(format!("CXXFLAGS_{}", target.replace("-", "_"))); ++ env::set_var("HOST_CFLAGS", "-O2"); ++ env::set_var("HOST_CXXFLAGS", "-O2"); + + configure(&mut cc::Build::new()) + .warnings(false) diff --git a/srcpkgs/icecat/template b/srcpkgs/icecat/template index 69caccdf2f..2e325f517c 100644 --- a/srcpkgs/icecat/template +++ b/srcpkgs/icecat/template @@ -20,8 +20,7 @@ homepage="https://www.gnu.org/software/${pkgname}/" distfiles="https://distfiles.voidlinux.de/${pkgname}-${version}/${pkgname}-${version}-gnu1.tar.xz" checksum=739b304170f99ea0edda3c92eab17f55c764811b470dc6a262f3c9eaa717d062 lib32disabled=yes -nocross="warning: src/compiler/glsl/glcpp/glcpp-lex.l:622:1: fatal error: opening dependency file .deps/forc -e-cargo-library-build.pp: No such file or directory" +#nocross="warning: src/compiler/glsl/glcpp/glcpp-lex.l:622:1: fatal error: opening dependency file .deps/forc e-cargo-library-build.pp: No such file or directory" build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland" build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland" @@ -56,8 +55,9 @@ _clear_vendor_checksums() { # FIXME: The *.xpi files have to be signed to be accepted as plugins # yet how do you sign a package if you don't have a signing key? _install_langpack() { - local lang=$1 tempdir=$(ls -d ${wrksrc}/obj-${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}/dist/linux-*) - vinstall ${tempdir}/xpi/${sourcepkg}-${version}.${lang}.langpack.xpi \ + local lang=$1 + local tempdir="$(ls -d ${wrksrc}/obj-*/dist/linux-*/xpi|head -n1)" + vinstall "${tempdir}"/${sourcepkg}-${version}.${lang}.langpack.xpi \ 644 usr/lib/icecat/browser/extensions } @@ -69,6 +69,7 @@ post_extract() { post_patch() { _clear_vendor_checksums num-traits + _clear_vendor_checksums glslopt } do_build() { @@ -174,7 +175,8 @@ EOF ./mach build # Make langpacks for all languages - cd ${wrksrc}/obj-${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}/browser/locales/ + dir=$(ls -d obj-*/browser/locales) + cd ${wrksrc}/${dir} for lang in ${languages[*]}; do msg_normal "Making langpack for ${lang} ...\n" make ${makejobs} langpack-${lang} LOCALE_MERGEDIR=.