[debian-edu-commits] [Git][debian-edu/debian-edu-doc][master] 2 commits: Rework the build of PDF manuals

Wolfgang Schweer gitlab at salsa.debian.org
Fri Oct 30 17:37:35 GMT 2020



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-doc


Commits:
404cf775 by Wolfgang Schweer at 2020-10-30T18:32:39+01:00
Rework the build of PDF manuals

documentation/common/Makefile.common:
Don't convert PNG images to PDF files. It isn't needed because Xetex can
integrate PNG and JPEG images via the CPAN graphics package
(part of texlive-latex-base) by default.

documentation/scripts/get_images:
Drop transparency removal. It isn't needed anymore because Makefile.common
doesn't use img2pdf any longer.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
947e9894 by Wolfgang Schweer at 2020-10-30T18:34:17+01:00
Drop now unused img2pdf package from Build-Depends-Indep

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


4 changed files:

- debian/changelog
- debian/control
- documentation/common/Makefile.common
- documentation/scripts/get_images


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+debian-edu-doc (2.11.15) UNRELEASED; urgency=medium
+
+  * Rework the build of PDF manuals.
+    - documentation/common/Makefile.common: Don't convert PNG images to PDF
+      files. It isn't needed because Xetex can integrate PNG and JPEG images via
+      the CPAN graphics package (part of texlive-latex-base) by default.
+    - documentation/scripts/get_images: Drop transparency removal. It isn't
+      needed anymore because Makefile.common doesn't use img2pdf any longer.
+  * debian/control: Drop now unused img2pdf package from Build-Depends-Indep.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Fri, 30 Oct 2020 18:06:52 +0100
+
 debian-edu-doc (2.11.14) unstable; urgency=medium
 
   * Source only upload to allow new binaries to migrate to bullseye.


=====================================
debian/control
=====================================
@@ -9,7 +9,6 @@ Build-Depends-Indep: dblatex,
                      gsfonts,
                      fonts-lmodern,
                      imagemagick,
-                     img2pdf,
                      jdupes,
                      ldp-docbook-xsl,
                      lmodern,


=====================================
documentation/common/Makefile.common
=====================================
@@ -204,25 +204,14 @@ install: build
 			sed -i "s/href=\"$(name).$$f.html/href=\"$(name).html/g" $$LANGPATH/$(name).html ; \
 			sed -i "s#./images#./$(name)-images#g" $$LANGPATH/$(name).html ; \
 			if [ "$$f" = "en" ] ; then \
-			  for i in images/*.png ; do \
-				convert $$i -background white -alpha remove -alpha off $$i ; \
-				img2pdf -D -o $${i%.png}.pdf $$i ; \
-			  done ; \
 			  mkdir -p $$LANGPATH/$(name)-images/ ; \
 			  find images -maxdepth 1 -type f -exec cp \{\} $$LANGPATH/$(name)-images/ \; ; \
-			  sed s/\.png"/.pdf"/g $(name).xml > $(name).$$f.xml ; \
-			  sed -i $(SED_00) $(name).$$f.xml ; \
-			  $(DBLATEX) -o $$LANGPATH/$(name).pdf $(name).$$f.xml --param=lingua=$$f ; \
+			  sed -i $(SED_00) $(name).xml ; \
+			  $(DBLATEX) -o $$LANGPATH/$(name).pdf $(name).xml --param=lingua=$$f ; \
 			else \
 				mkdir -p $$LANGPATH/$(name)-images ; \
 				mkdir -p $$LANGPATH/$(name)-images-tmp ; \
 				cd images ; \
-				if [ -d $$f ] ; then \
-					for i in $$f/*.png ; do \
-					convert $$i -background white -alpha remove -alpha off $$i ; \
-					img2pdf -D -o $${i%.png}.pdf $$i ; \
-					done ; \
-				fi ; \
 				for i in *.* ; do \
 					if [ -e $$f/$$i ] ; then \
 						cp $$f/$$i $$LANGPATH/$(name)-images-tmp/ ; \
@@ -237,11 +226,8 @@ install: build
 						cp $$i $$LANGPATH/$(name)-images-tmp/ ; \
 					fi ; done ; \
 				cd .. ; \
-				sed -i s/\.png"/.pdf"/g $(name).$$f.xml ; \
 				sed -i "s#./images#./$(name)-images#g" $(name).$$f.xml ; \
 				$(DBLATEX) -I $$LANGPATH/ -I $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/ -o $$LANGPATH/$(name).pdf $(name).$$f.xml --param=lingua=$$f ; \
-				rm -f $$LANGPATH/$(name)-images/*.pdf ; \
-				rm -f $$LANGPATH/$(name)-images-tmp/*.pdf ; \
 				cp $$LANGPATH/$(name)-images-tmp/*.* $$LANGPATH/$(name)-images 2> /dev/null ; \
 				rm -rf $$LANGPATH/$(name)-images-tmp ; \
 			fi ; \
@@ -264,10 +250,9 @@ install: build
 			cd - ; \
 		fi ; \
 	done
-	rm -f $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/$(name)-images/*.pdf ; \
 
 clean:
-	rm -f *.pdf images/*.pdf images/*/*.pdf
+	rm -f *.pdf
 	rm -f *.html
 	rm -f $(name).*.xml
 	rm -f *.epub


=====================================
documentation/scripts/get_images
=====================================
@@ -33,8 +33,6 @@ sub create ($) {
 		print "Need to download: ".$url." to ".$imagedir."/".$name." \n";
 		print "Name: ".$name."\n";
 		system("wget \"$url\" -O \"$imagedir/$name\" 2> /dev/null");
-		# remove transparency to be able to use img2pdf in Makefile.common
-		system("convert $imagedir/$name -background white -alpha remove -alpha off $imagedir/$name");
 	}
 	return "<imagedata fileref='". $imagedir."/".$name."'/>";
 



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/-/compare/24d7e072d1b77f7a158915481b0c88484bd6d903...947e98948285afcbcf5390f1e2502824585289f4

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/-/compare/24d7e072d1b77f7a158915481b0c88484bd6d903...947e98948285afcbcf5390f1e2502824585289f4
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20201030/8b02a51e/attachment-0001.html>


More information about the debian-edu-commits mailing list