I tracked this down to two separate issues in the debian/rules file, for
which I've attached a patch.

The first issue is that the 'eval' in 6-2 wasn't quite correct:

for EXT in $$(eval echo \\$$SIZE_EXTENSIONS$$SIZE); do\
                        ^^
There should only be one \ here (otherwise 'echo' is outputting '\10 20
35 40 50-large' instead of '$SIZE_EXTENSIONS-large').

The second problem is that the variables being exported and evaled
(SIZE_EXTENSIONS-large, etc.) contain -'s, which sh won't accept, so it
ends up with the eval being told to eval, e.g., '$SIZE_EXTENSIONS-large'
which it happily evals to 10 20 35 40 50-large instead of the intended
10 20 35 40 50 55 60 70.

The attached debian/rules patch fixes both issues (by defining the
variables with _'s instead of -'s) and makes everything build properly
-- i.e. with the proper sized dict files.

-- 
-- Jason Rhinelander
--- scowl-6.orig/debian/rules	2006-04-18 21:15:19.000000000 -0700
+++ scowl-6/debian/rules	2006-04-18 21:40:53.000000000 -0700
@@ -15,11 +15,11 @@
 # corresponding packages for wbritish and wcanadian.
 # The medium size packages have no -size part in their names
 # These are the scowl extensions (complexity numbers?) that contribute to each word list (i.e. each size);
-# the -size parts "-small", "", "-large", and "-huge" correspond to the end of the binary package name:
-export SIZE_EXTENSIONS-small:=10 20 35
-export SIZE_EXTENSIONS:=$(SIZE_EXTENSIONS-small) 40 50
-export SIZE_EXTENSIONS-large:=$(SIZE_EXTENSIONS) 55 60 70
-export SIZE_EXTENSIONS-huge:=$(SIZE_EXTENSIONS-large) 80
+# the size parts "small", "", "large", and "huge" correspond to the end of the binary package name:
+export SIZE_EXTENSIONS_small:=10 20 35
+export SIZE_EXTENSIONS:=$(SIZE_EXTENSIONS_small) 40 50
+export SIZE_EXTENSIONS_large:=$(SIZE_EXTENSIONS) 55 60 70
+export SIZE_EXTENSIONS_huge:=$(SIZE_EXTENSIONS_large) 80

 # These are the scowl word list classes we use:
 CLASSES:=words proper-names upper contractions
@@ -31,11 +31,12 @@
 
 	set -e;\
 	for SPELLING in american british canadian; do\
-	  for SIZE in -small "" -large -huge; do\
+	  for SIZENAME in small "" large huge; do\
+	    if [ -n "$$SIZENAME" ]; then SIZE="-$$SIZENAME"; SIZEVAR="_$$SIZENAME"; else SIZE=""; SIZEVAR=""; fi;\
 	    echo "The following SCOWL word lists were concatenated and sorted (with duplicates" > w$$SPELLING$$SIZE.scowl-word-lists-used;\
 	    echo "removed) to create this word list (see README.Debian for more details):" >> w$$SPELLING$$SIZE.scowl-word-lists-used;\
 	    for CLASS in $(CLASSES); do\
-	      for EXT in $$(eval echo \\$$SIZE_EXTENSIONS$$SIZE); do\
+	      for EXT in $$(eval echo \$$SIZE_EXTENSIONS$$SIZEVAR); do\
 		if [ -f final/english-$$CLASS.$$EXT ]; then\
 		  echo "cat final/english-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted";\
 		  cat final/english-$$CLASS.$$EXT >> $$SPELLING-english$$SIZE.unsorted;\

Reply via email to