[Pkg-sugar-commit] [sugar-browse-activity] 11/32: Update CDBS snippets: Fix use underscore (not dash) for internal variables. Build-depend unversioned on python-sugar-toolkit. Add new variable DEB_SUGAR_BRANCHES in python-sugar.mk.

Jonas Smedegaard dr at jones.dk
Mon Apr 20 09:46:43 UTC 2015


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

js pushed a commit to annotated tag debian/108-10
in repository sugar-browse-activity.

commit e908878b0cc9d1838c207d50c5368a407aa76746
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Fri Sep 18 19:11:48 2009 +0200

    Update CDBS snippets: Fix use underscore (not dash) for internal variables. Build-depend unversioned on python-sugar-toolkit. Add new variable DEB_SUGAR_BRANCHES in python-sugar.mk.
---
 debian/cdbs/1/class/python-sugar.mk | 23 ++++++++++++++++++++---
 debian/cdbs/1/class/python-vars.mk  |  4 ++--
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/debian/cdbs/1/class/python-sugar.mk b/debian/cdbs/1/class/python-sugar.mk
index 387542a..2fd26cd 100644
--- a/debian/cdbs/1/class/python-sugar.mk
+++ b/debian/cdbs/1/class/python-sugar.mk
@@ -22,15 +22,32 @@ _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
 _cdbs_class_path ?= /usr/share/cdbs/1/class
 
-ifndef _cdbs_class_python-sugar
-_cdbs_class_python-sugar = 1
+ifndef _cdbs_class_python_sugar
+_cdbs_class_python_sugar = 1
 
 #include $(_cdbs_class_path)/python-vars.mk$(_cdbs_makefile_suffix)
 include debian/cdbs/1/class/python-vars.mk
 include $(_cdbs_rules_path)/debhelper.mk$(_cdbs_makefile_suffix)
 
+# Space-delimited list of supported branches, lowest listed first
+# (comment out if all current branches are supported)
+# NB! This variable must be declared *above* inclusion of this snippet
+#DEB_SUGAR_BRANCHES = 0.84 0.86
+
+# FIXME: move these to buildvars.mk
+comma = ,
+cdbs_delimit = $(firstword $1)$(foreach word,$(wordlist 2,$(words $1),$1),$2$(word))
+
+# List "packages multiplied with branches", or just packages if no branches
+# FIXME: move this to buildvars.mk
+cdbs_expand_branches = $(subst WORDDELIMITER,$3,$(subst BRANCHDELIMITER,$4,$(call cdbs_delimit,$(if $2,$(foreach pkg,$1,$(call cdbs_delimit,$(foreach branch,$2,$(pkg)$(branch:%=-%)),BRANCHDELIMITER)),$1),WORDDELIMITER)))
+
+# convenience wrappers to expand Sugar branches for package dependencies
+cdbs_sugar_allbranchdeps = $(call cdbs_expand_branches,$1,$(DEB_SUGAR_BRANCHES),$(comma) ,$(comma) )
+cdbs_sugar_anybranchdeps = $(call cdbs_expand_branches,$1,$(DEB_SUGAR_BRANCHES),$(comma) , | )
+
 # Declare Build-Deps for packages using this file
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-sugar, python-sugar-toolkit (>= 0.82.5), unzip
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), $(call cdbs_sugar_anybranchdeps,python-sugar python-sugar-toolkit), unzip
 # FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only
 ifeq (,$(cdbs_python_pkg_check)$(DEB_PYTHON_ARCH_PACKAGES))
   ifneq (, $(cdbs_python_compile_version))
diff --git a/debian/cdbs/1/class/python-vars.mk b/debian/cdbs/1/class/python-vars.mk
index 38cfa00..729a3c2 100644
--- a/debian/cdbs/1/class/python-vars.mk
+++ b/debian/cdbs/1/class/python-vars.mk
@@ -23,8 +23,8 @@ _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
 _cdbs_class_path ?= /usr/share/cdbs/1/class
 
-ifndef _cdbs_class_python-vars
-_cdbs_class_python-vars = 1
+ifndef _cdbs_class_python_vars
+_cdbs_class_python_vars = 1
 
 include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-browse-activity.git



More information about the pkg-sugar-commit mailing list