Control: tag -1 patch

The attached patch seems to allow the "Converting images" step to
succeed.  I ran this only once though.

Regards.
--- debian/rules-orig
+++ debian/rules
@@ -2,6 +2,9 @@
 
 export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow future=+lfs
 export DH_VERBOSE=1
+
+POLFILE = "/etc/$(shell convert -version|sed -n '/^Version: /s@Version: ImageMagick \([[:digit:]]\+\)\..*@ImageMagick-\1@p')/policy.xml"
+
 %:
 	dh $@
 
@@ -11,7 +14,10 @@
 	# We need therion itself to build the samples
 	$(MAKE) therion
 	# create HTML documentation for samples
-	faketime "$(dpkg-parsechangelog -S Date)" $(MAKE) samples
+	mkdir -p debian/tmp/ImageMagick
+	sed -e '/<policy domain="coder" rights="none" pattern="PDF" .>/s@"none"@"read|write"@' "$(POLFILE)" > debian/tmp/ImageMagick/policy.xml
+	faketime "$(dpkg-parsechangelog -S Date)" $(MAKE) XDG_CONFIG_HOME="$(shell pwd)/debian/tmp" samples
+	rm -Rf debian/tmp/ImageMagick
 endif
 	$(MAKE) thbook
 

Reply via email to