[X2Go-Commits] [pale-moon] 19/52: debian/rules: add support for preprocessing files via the Mozilla preprocessor python script.

git-admin at x2go.org git-admin at x2go.org
Fri Sep 21 23:08:30 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository pale-moon.

commit 37e1c83af69f4ac1e0d3ef816d2279ada77a48e3
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Sep 20 22:37:18 2018 +0200

    debian/rules: add support for preprocessing files via the Mozilla preprocessor python script.
---
 debian/changelog |  2 ++
 debian/rules     | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cba74d5..43647dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -97,6 +97,8 @@ palemoon (27.9.2~repack-1-0x2go1) UNRELEASED; urgency=medium
       debian/noinstall.
     - Move GCC selection around a bit.
     - Remove useless mark.
+    - Add support for preprocessing files via the Mozilla preprocessor python
+      script.
   * debian/mozconfig:
     - Remove autoconf flags that should better be handled by debian/rules.
   * debian/make.mk:
diff --git a/debian/rules b/debian/rules
index 572d892..ece9c1a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,22 @@ $(call lazy,DEB_BUILD_ARCH_ENDIAN,$$(shell dpkg-architecture -qDEB_BUILD_ARCH_EN
 
 export SHELL=/bin/bash
 
+PYTHON := python -B
+
+SYSTEM_LIBS = zlib bz2 hunspell ffi libevent
+ifeq (,$(filter wheezy jessie stretch,$(DIST)))
+SYSTEM_LIBS += nspr nss sqlite
+endif
+ifeq (,$(filter wheezy jessie,$(DIST)))
+SYSTEM_LIBS += vpx
+endif
+
+define system_lib
+USE_SYSTEM_$(1) = 1
+SYSTEM_LIBS_VARS += USE_SYSTEM_$(1)
+endef
+$(foreach lib,$(sort $(call uc,$(SYSTEM_LIBS))),$(eval $(call system_lib,$(lib))))
+
 # Build with gcc-6 on Buster, Sid, Artful, Bionic and Cosmic.
 ifeq ($(DIST),$(filter buster sid artful bionic cosmic,$(DIST)))
 export CC=gcc-6
@@ -95,6 +111,22 @@ CXXFLAGS = $(CFLAGS)
 EXPORTS := CC CXX CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
 $(call lazy,CONFIGURE_ENV,$$(foreach export,$(EXPORTS),$$(export)="$$($$(export))"))
 
+IN_FILES := $(wildcard debian/*.in)
+preprocessed_filename = $(subst GRE_VERSION,$(GRE_VERSION),$(1:.in=))
+define preprocess
+$(call preprocessed_filename,$(1)): $(1)
+PREPROCESSED_FILES += $(call preprocessed_filename,$(1))
+endef
+$(foreach f,$(IN_FILES),$(eval $(call preprocess, $(f))))
+
+GENERATED_FILES += $(PREPROCESSED_FILES)
+debian/control: debian/rules debian/changelog
+
+$(PREPROCESSED_FILES): VARS = GRE_VERSION MOZ_APP_REMOTINGNAME $(SYSTEM_LIBS_VARS) GTK3 DIST MOZ_FFVPX CRASH_REPORTER RUST BUILD_RUST DEB_BUILD_ARCH
+
+$(PREPROCESSED_FILES):
+	$(PYTHON) python/mozbuild/mozbuild/preprocessor.py --marker % -Fsubstitution $(foreach var,$(VARS),-D$(var)="$($(var))" )$< > $@
+
 %/package-manifest:
 	$(MAKE) -C $*
 
@@ -153,6 +185,7 @@ override_dh_auto_build override_dh_auto_build-arch: stamps/build-palemoon
 
 override_dh_auto_clean::
 	rm -f MPL
+	rm -f $(filter-out debian/control,$(GENERATED_FILES))
 	# FIXME: handle potentially generated files, once we have them.
 	rm -f configure js/src/configure
 	rm -rf stamps l10n
@@ -288,6 +321,8 @@ endif
 override_dh_shlibdeps:
 	dh_shlibdeps -a -l$(CURDIR)/debian/tmp$(LIB_DIR)
 
+install binary binary-arch binary-indep: $(filter-out %.pc,$(GENERATED_FILES))
+
 binary binary-arch binary-indep build build-arch build-indep clean install:
 	dh $@
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list