summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorohfp <1813007-ohfp@users.noreply.gitlab.com>2021-07-07 15:19:00 +0200
committerohfp <1813007-ohfp@users.noreply.gitlab.com>2021-07-07 15:19:00 +0200
commit4e47988307152b105ae3adc2d01a09e3e32c2b37 (patch)
treefeb7699ef51dd1e444cd8e30b13b46dbef8b96a2
parentMerge branch 'include_new_patches' into 'master' (diff)
downloadlibrewolf-debian-4e47988307152b105ae3adc2d01a09e3e32c2b37.tar.gz
librewolf-debian-4e47988307152b105ae3adc2d01a09e3e32c2b37.tar.bz2
librewolf-debian-4e47988307152b105ae3adc2d01a09e3e32c2b37.zip
use cargo-installed cbindgen 0.19.0 until in upstream repos
-rw-r--r--cbindgen.patch44
-rwxr-xr-xscripts/prep-librewolf-dpkg.sh18
2 files changed, 54 insertions, 8 deletions
diff --git a/cbindgen.patch b/cbindgen.patch
new file mode 100644
index 0000000..eddce0f
--- /dev/null
+++ b/cbindgen.patch
@@ -0,0 +1,44 @@
+diff --git a/control b/control
+index a010475..da60418 100644
+--- a/control
++++ b/control
+@@ -33,7 +33,6 @@ Build-Depends: autotools-dev,
+ llvm-dev,
+ libclang-dev,
+ clang,
+- cbindgen (>= 0.19.0),
+ nodejs (>= 10),
+ zip,
+ unzip,
+diff --git a/control.in b/control.in
+index b6acf1b..089cbf7 100644
+--- a/control.in
++++ b/control.in
+@@ -58,7 +58,6 @@ Build-Depends: autotools-dev,
+ libclang-dev,
+ clang,
+ %endif
+- cbindgen (>= 0.19.0),
+ %if DIST == stretch
+ nodejs-mozilla (>= 10),
+ %else
+diff --git a/rules b/rules
+index 117197e..e1b7858 100755
+--- a/rules
++++ b/rules
+@@ -239,11 +239,14 @@ stamps/configure-$(PRODUCT):: stamps/prepare-configure debian/$($(PRODUCT)).mozc
+ $(COMMON_CONFIGURE_FLAGS) \
+ $(CONFIGURE_FLAGS)
+
+-stamps/build-$(PRODUCT):: stamps/configure-check-$(PRODUCT)
++stamps/build-$(PRODUCT):: $(CARGO_HOME)/bin/cbindgen stamps/configure-check-$(PRODUCT)
+ +dh_auto_build --parallel --builddirectory=build-$(PRODUCT) -- \
+ LD_LIBS=-Wl,--no-gc-sections \
+ _LEAKTEST_FILES=leaktest.py
+
++$(CARGO_HOME)/bin/cbindgen:
++ cargo install --version 0.19.0 cbindgen
++
+ L10N_BUILD_STAMPS = $(foreach lang,$(L10N_LANGS),stamps/build-l10n-$(lang))
+ stamps/build-l10n:: $(L10N_BUILD_STAMPS)
+
diff --git a/scripts/prep-librewolf-dpkg.sh b/scripts/prep-librewolf-dpkg.sh
index ecf4b6f..c0c220c 100755
--- a/scripts/prep-librewolf-dpkg.sh
+++ b/scripts/prep-librewolf-dpkg.sh
@@ -91,6 +91,12 @@ test -z "${SKIP_EXTRACT}" && {
#####################################
# Script 1 tasks
+# some direct patching to use the bundled cbindgen until cbindgen >= 0.19.0 is in the debian sid repos
+cd "${debian_dir}"
+patch -Np1 -i "${CI_PROJECT_DIR}"/cbindgen.patch
+cd "${work_dir}"
+
+
# update debian/control file
# update fields and add libjack-dev
sed -i -r "${debian_dir}"/control \
@@ -151,6 +157,9 @@ mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=0
+# workaround to use bundled cbindgen
+ac_add_options CBINDGEN=\$topsrcdir/debian/.cargo/bin/cbindgen
+
EOF
test "$( uname -p )" = "x86_64" && { echo "ac_add_options --disable-elf-hack" >> "${debian_dir}${_mozconfig}" ; }
cat <<EOF >> "${debian_dir}${_mozconfig}"
@@ -164,12 +173,6 @@ cat <<EOF >> "${debian_dir}${_mozconfig}"
ac_add_options --enable-optimize
EOF
-# workaround to allow an older cargo version until 0.48 is available in SID
-sed -i 's/cargo (>= 0.47),/cargo (>= 0.46),/g' "${debian_dir}"/control.in
-sed -i 's/cargo (>= 0.47),/cargo (>= 0.46),/g' "${debian_dir}"/control
-sed -i 's/rustc (>= 1.47),/rustc (>= 1.41),/g' "${debian_dir}"/control
-sed -i 's/rustc (>= 1.47),/rustc (>= 1.41),/g' "${debian_dir}"/control.in
-
# add patches to debian/patches
mkdir -p "${debian_dir}"/patches/librewolf
@@ -370,8 +373,7 @@ sed -r \
-e '/libasound2-dev/s/libasound2-dev,/libasound2-dev, libjack-dev,/;' \
-e '/^Vcs-/d' \
-e '/^ firefox/s/firefox/librewolf/g' \
- -e 's/cargo \(>= 0\.47\),/cargo \(>= 0\.46\),/' \
- -e 's/rustc \(>= 1\.47\),/rustc \(>= 1\.41\),/' \
+ -e 's/cbindgen (>= 0.19.0), //' \
firefox_"${distro_firefox_version}".dsc > librewolf_"${distro_firefox_version}".dsc
{
echo "Files:"
bgstack15