[atril] 04/07: Don't ship embedded MathJax Javascript library. Use Debian's version of libjs-mathjax instead. This requires repacking atril's orig tarball (for dropping the embedded code).

Mike Gabriel sunweaver at debian.org
Mon Aug 24 14:58:28 UTC 2015


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

sunweaver pushed a commit to branch master
in repository atril.

commit dd1d819fadc8d5410288ec2244c8feaaa3338faa
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Aug 24 14:29:39 2015 +0200

    Don't ship embedded MathJax Javascript library. Use Debian's version of libjs-mathjax instead. This requires repacking atril's orig tarball (for dropping the embedded code).
---
 debian/control                              |  1 +
 debian/copyright                            | 20 -------
 debian/patches/2001_dont-ship-mathjax.patch | 84 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 debian/rules                                | 28 +++++++++-
 debian/watch                                |  1 +
 6 files changed, 113 insertions(+), 22 deletions(-)

diff --git a/debian/control b/debian/control
index 6b12577..dcdabdc 100644
--- a/debian/control
+++ b/debian/control
@@ -147,6 +147,7 @@ Section: libs
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
+         libjs-mathjax,
 Breaks: libatril (<< 1.9.0)
 Replaces: libatril (<< 1.9.0)
 Description: MATE document rendering library
diff --git a/debian/copyright b/debian/copyright
index 8315f59..20e1e06 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -514,10 +514,6 @@ Files: backend/epub/epub-document.c
 Copyright: 2014 Avishkar Gupta <avishkar.gupta.delhi at gmail.com>
 License: GPL-2+
 
-Files: backend/epub/MathJax/*
-Copyright: 2009-2014 The MathJax Consortium
-License: Apache
-
 Files: help/*
 Copyright: Jonathan Blandford <jrb at redhat.com>
            Alexander Shopov  <ash at contact.bg>
@@ -800,22 +796,6 @@ License: Afmparse
  AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
 
-License: Apache
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- .
-     http://www.apache.org/licenses/LICENSE-2.0
- .
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- .
- On Debian systems, the complete text of the Apache License 2.0 can
- be found in "/usr/share/common-licenses/Apache-2.0"
-
 License: GFDL-1.1+
  Permission is granted to copy, distribute and/or modify this
  document under the terms of the GNU Free Documentation
diff --git a/debian/patches/2001_dont-ship-mathjax.patch b/debian/patches/2001_dont-ship-mathjax.patch
new file mode 100644
index 0000000..616dbe9
--- /dev/null
+++ b/debian/patches/2001_dont-ship-mathjax.patch
@@ -0,0 +1,84 @@
+Description: Don't ship embedded MathJax JS library in Debian's atril package
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+--- a/backend/epub/Makefile.am
++++ b/backend/epub/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = minizip MathJax
++SUBDIRS = minizip
+ 
+ AM_CPPFLAGS = 		       			\
+ 	-I$(top_srcdir)				\
+--- a/configure.ac
++++ b/configure.ac
+@@ -810,58 +810,6 @@
+ backend/dvi/mdvi-lib/Makefile
+ backend/epub/Makefile
+ backend/epub/minizip/Makefile
+-backend/epub/MathJax/Makefile
+-backend/epub/MathJax/config/Makefile
+-backend/epub/MathJax/config/local/Makefile
+-backend/epub/MathJax/extensions/Makefile
+-backend/epub/MathJax/extensions/MathML/Makefile
+-backend/epub/MathJax/extensions/TeX/Makefile
+-backend/epub/MathJax/images/Makefile
+-backend/epub/MathJax/jax/Makefile
+-backend/epub/MathJax/jax/element/Makefile
+-backend/epub/MathJax/jax/element/mml/Makefile
+-backend/epub/MathJax/jax/element/mml/optable/Makefile
+-backend/epub/MathJax/jax/input/Makefile
+-backend/epub/MathJax/jax/input/AsciiMath/Makefile
+-backend/epub/MathJax/jax/input/TeX/Makefile
+-backend/epub/MathJax/jax/input/MathML/Makefile
+-backend/epub/MathJax/jax/input/MathML/entities/Makefile
+-backend/epub/MathJax/jax/output/Makefile
+-backend/epub/MathJax/jax/output/SVG/Makefile
+-backend/epub/MathJax/jax/output/SVG/autoload/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/AMS/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/AMS/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Script/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Script/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Caligraphic/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Caligraphic/Bold/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Caligraphic/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Fraktur/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Fraktur/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Fraktur/Bold/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Math/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Math/Italic/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Math/BoldItalic/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size1/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size1/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size2/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size2/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size3/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size3/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size4/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Size4/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Main/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Main/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Main/Bold/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Main/Italic/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/SansSerif/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/SansSerif/Bold/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/SansSerif/Italic/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/SansSerif/Regular/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Typewriter/Makefile
+-backend/epub/MathJax/jax/output/SVG/fonts/TeX/Typewriter/Regular/Makefile
+ backend/pdf/Makefile
+ backend/pixbuf/Makefile
+ backend/ps/Makefile
+--- a/backend/epub/epub-document.c
++++ b/backend/epub/epub-document.c
+@@ -1642,8 +1642,7 @@
+ {
+ 	gchar *containerfilename= g_filename_from_uri(containeruri,NULL,NULL);
+ 	const gchar *backenddir = ev_backends_manager_get_backends_dir();
+-	GString *mathjaxdir = g_string_new(backenddir);
+-	g_string_append_printf(mathjaxdir,"/epub/MathJax");
++	GString *mathjaxdir = g_string_new("/usr/share/javascript/mathjax");
+ 
+ 	gchar *mathjaxref = g_filename_to_uri(mathjaxdir->str,NULL,NULL);
+ 	gchar *nodedata = g_strdup_printf("%s/MathJax.js?config=TeX-AMS-MML_SVG",mathjaxref);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0e51054
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+2001_dont-ship-mathjax.patch
diff --git a/debian/rules b/debian/rules
index 110f503..3bc6c20 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,12 @@
 #!/usr/bin/make -f
 
+PKD   = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
+PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
+UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
+DTYPE = +repack1
+VER  ?= $(subst $(DTYPE),,$(UVER))
+
+
 DHFLAGS=--parallel
 DEB_ATRIL_FLAGS=
 ifeq ($(shell dpkg-vendor --is Debian && echo yes),yes)
@@ -43,6 +50,23 @@ override_dh_strip:
 override_dh_builddeb:
 	dh_builddeb -- -Zxz -z9
 
-get-orig-source:
-	uscan --noconf --force-download --rename --download-current-version --destdir=..
+get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
+	@
 
+$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
+	@echo "# Downloading..."
+	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
+	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
+	@echo "# Extracting..."
+	mkdir $(PKG)-$(VER) \
+	    && tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
+	    || $(RM) -r $(PKG)-$(VER)
+	@echo "# Cleaning-up..."
+	cd $(PKG)-$(VER) \
+	    && $(RM) -r -v \
+	        backend/epub/MathJax/
+	$(RM) -v $(PKG)_$(VER).orig.tar.*
+	@echo "# Packing..."
+	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
+	    | XZ_OPT="-6v" tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+	    && $(RM) -r "$(PKG)-$(VER)"
diff --git a/debian/watch b/debian/watch
index 95baa4d..2cca1cd 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
 version=3
+opts=dversionmangle=s/\+repack1// \
 http://git.mate-desktop.org/atril/ \
     snapshot/atril-(\d\.(?:[0-9]+|)[24680]\.\d)\.tar\.xz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/atril.git



More information about the pkg-mate-commits mailing list