On Sat, 14 Nov 2020 13:24:21 +0100 Bastian Germann <[email protected]> wrote:
Source: mupdf
Severity: normal

Please package the new upstream version 1.18.0.

Patch series enclosed. Please consider importing 1.18.0 soon so that it can be released with bullseye.
>From 039dafded6dfae0059c4d2a3783ff0de643fe3c3 Mon Sep 17 00:00:00 2001
From: Bastian Germann <[email protected]>
Date: Sat, 24 Oct 2020 09:58:28 +0200
Subject: [PATCH 1/4] Refresh patches for v1.18.0

---
 ...atic-library-to-make-the-build-repro.patch |  6 ++---
 ...0003-use-debian-flavor-build-options.patch |  4 ++--
 ...rossbuild-use-target-arch-pkg-config.patch | 19 ++++++++++-----
 ...PDF-crossbuild-use-host-cc-for-utils.patch |  6 ++---
 .../0006-Allow-disabling-objcopy.patch        |  4 ++--
 ...1-does-not-need-to-link-to-libcrypto.patch |  4 ++--
 ...Build-mupdf-without-executable-stack.patch | 23 -------------------
 ...010-Prevent-thirdparty-archive-build.patch |  8 +++----
 debian/patches/series                         |  1 -
 9 files changed, 29 insertions(+), 46 deletions(-)
 delete mode 100644 debian/patches/0008-Build-mupdf-without-executable-stack.patch

diff --git a/debian/patches/0003-Sort-files-in-static-library-to-make-the-build-repro.patch b/debian/patches/0003-Sort-files-in-static-library-to-make-the-build-repro.patch
index 5624c9ea..498baf21 100644
--- a/debian/patches/0003-Sort-files-in-static-library-to-make-the-build-repro.patch
+++ b/debian/patches/0003-Sort-files-in-static-library-to-make-the-build-repro.patch
@@ -7,13 +7,13 @@ Subject: Sort files in static library to make the build reproducible
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 814a592..58698dc 100644
+index b0fb617..a33d5c1 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -53,7 +53,7 @@ endif
+@@ -57,7 +57,7 @@ endif
  MKTGTDIR = mkdir -p $(dir $@)
  CC_CMD = $(QUIET_CC) $(MKTGTDIR) ; $(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
- CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(CXX) $(CFLAGS) -MMD -MP -o $@ -c $<
+ CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(CXX) $(CFLAGS) $(XCXXFLAGS) -MMD -MP -o $@ -c $<
 -AR_CMD = $(QUIET_AR) $(MKTGTDIR) ; $(AR) cr $@ $^
 +AR_CMD = $(QUIET_AR) $(MKTGTDIR) ; $(AR) cr $@ `LC_ALL=C ls $^ 2>/dev/null`
  ifdef RANLIB
diff --git a/debian/patches/0003-use-debian-flavor-build-options.patch b/debian/patches/0003-use-debian-flavor-build-options.patch
index 3b081122..b29f393e 100644
--- a/debian/patches/0003-use-debian-flavor-build-options.patch
+++ b/debian/patches/0003-use-debian-flavor-build-options.patch
@@ -8,10 +8,10 @@ Do not strip binaries by default and use Debian LDFLAGS
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/Makerules b/Makerules
-index b96fc71..44d1bd1 100644
+index 9b82b55..93b5ca4 100644
 --- a/Makerules
 +++ b/Makerules
-@@ -24,7 +24,10 @@ SANITIZE_FLAGS += -fsanitize=leak
+@@ -38,7 +38,10 @@ endif
  
  ifeq ($(build),debug)
    CFLAGS += -pipe -g
diff --git a/debian/patches/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch b/debian/patches/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch
index 59d4d0b7..592409a7 100644
--- a/debian/patches/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch
+++ b/debian/patches/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch
@@ -5,11 +5,11 @@ Subject: MuPDF crossbuild use target arch pkg-config
 mupdf fails to cross build, because it uses the build architecture
 pkg-config and thus fails to find a pile of .pc files.
 ---
- Makerules | 52 ++++++++++++++++++++++++++++------------------------
- 1 file changed, 28 insertions(+), 24 deletions(-)
+ Makerules | 58 +++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 31 insertions(+), 27 deletions(-)
 
 diff --git a/Makerules b/Makerules
-index 44d1bd1..63a81ab 100644
+index 93b5ca4..e776ed7 100644
 --- a/Makerules
 +++ b/Makerules
 @@ -6,6 +6,10 @@ OS := $(OS:MSYS%=MINGW)
@@ -23,7 +23,7 @@ index 44d1bd1..63a81ab 100644
  ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
    # clang does not support these in combination with -fembed-bitcode
    CFLAGS += -ffunction-sections -fdata-sections
-@@ -97,29 +101,29 @@ else ifeq ($(OS),MACOS)
+@@ -121,33 +125,33 @@ else ifeq ($(OS),MACOS)
  else ifeq ($(OS),Linux)
    HAVE_OBJCOPY := yes
  
@@ -34,6 +34,13 @@ index 44d1bd1..63a81ab 100644
 +	SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2)
 +	SYS_FREETYPE_LIBS := $(shell $(PKG_CONFIG) --libs freetype2)
    endif
+-  ifeq ($(shell pkg-config --exists gumbo && echo yes),yes)
+-	SYS_GUMBO_CFLAGS := $(shell pkg-config --cflags gumbo)
+-	SYS_GUMBO_LIBS := $(shell pkg-config --libs gumbo)
++  ifeq ($(shell $(PKG_CONFIG) --exists gumbo && echo yes),yes)
++	SYS_GUMBO_CFLAGS := $(shell $(PKG_CONFIG) --cflags gumbo)
++	SYS_GUMBO_LIBS := $(shell $(PKG_CONFIG) --libs gumbo)
+   endif
 -  ifeq ($(shell pkg-config --exists harfbuzz && echo yes),yes)
 -	SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)
 -	SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz)
@@ -70,8 +77,8 @@ index 44d1bd1..63a81ab 100644
 +	SYS_ZLIB_LIBS := $(shell $(PKG_CONFIG) --libs zlib)
    endif
  
-   HAVE_SYS_CURL := $(shell pkg-config --exists libcurl && echo yes)
-@@ -134,16 +138,16 @@ else ifeq ($(OS),Linux)
+   HAVE_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
+@@ -174,16 +178,16 @@ else ifeq ($(OS),Linux)
  	SYS_GLUT_LIBS := -lglut -lGL
    endif
  
diff --git a/debian/patches/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch b/debian/patches/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch
index 41f39a64..4e96ce32 100644
--- a/debian/patches/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch
+++ b/debian/patches/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch
@@ -8,10 +8,10 @@ Subject: MuPDF crossbuild use host cc for utils
  2 files changed, 3 insertions(+)
 
 diff --git a/Makefile b/Makefile
-index 58698dc..c616f17 100644
+index a33d5c1..49b8e55 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -133,6 +133,8 @@ PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
+@@ -146,6 +146,8 @@ PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
  # --- Generated embedded font files ---
  
  HEXDUMP_EXE := $(OUT)/scripts/hexdump.exe
@@ -21,7 +21,7 @@ index 58698dc..c616f17 100644
  FONT_BIN := $(sort $(wildcard resources/fonts/urw/*.cff))
  FONT_BIN += $(sort $(wildcard resources/fonts/han/*.ttc))
 diff --git a/Makerules b/Makerules
-index 63a81ab..2476295 100644
+index e776ed7..7ac4912 100644
 --- a/Makerules
 +++ b/Makerules
 @@ -7,6 +7,7 @@ OS := $(OS:Windows_NT=MINGW)
diff --git a/debian/patches/0006-Allow-disabling-objcopy.patch b/debian/patches/0006-Allow-disabling-objcopy.patch
index ec0c2511..3c6a9469 100644
--- a/debian/patches/0006-Allow-disabling-objcopy.patch
+++ b/debian/patches/0006-Allow-disabling-objcopy.patch
@@ -7,10 +7,10 @@ Subject: Allow disabling objcopy
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makerules b/Makerules
-index 2476295..e77c7fe 100644
+index 7ac4912..2bbc3dd 100644
 --- a/Makerules
 +++ b/Makerules
-@@ -100,7 +100,7 @@ else ifeq ($(OS),MACOS)
+@@ -124,7 +124,7 @@ else ifeq ($(OS),MACOS)
    RANLIB = xcrun ranlib
  
  else ifeq ($(OS),Linux)
diff --git a/debian/patches/0007-mupdf-x11-does-not-need-to-link-to-libcrypto.patch b/debian/patches/0007-mupdf-x11-does-not-need-to-link-to-libcrypto.patch
index 0130d997..7d54563b 100644
--- a/debian/patches/0007-mupdf-x11-does-not-need-to-link-to-libcrypto.patch
+++ b/debian/patches/0007-mupdf-x11-does-not-need-to-link-to-libcrypto.patch
@@ -7,10 +7,10 @@ Subject: mupdf-x11 does not need to link to libcrypto
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index c616f17..dabe17c 100644
+index 49b8e55..b9bdcc6 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -239,7 +239,7 @@ ifeq ($(HAVE_X11),yes)
+@@ -270,7 +270,7 @@ ifeq ($(HAVE_X11),yes)
    MUVIEW_X11_OBJ += $(OUT)/platform/x11/x11_main.o
    MUVIEW_X11_OBJ += $(OUT)/platform/x11/x11_image.o
    $(MUVIEW_X11_EXE) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB)
diff --git a/debian/patches/0008-Build-mupdf-without-executable-stack.patch b/debian/patches/0008-Build-mupdf-without-executable-stack.patch
deleted file mode 100644
index 12848237..00000000
--- a/debian/patches/0008-Build-mupdf-without-executable-stack.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Kan-Ru Chen <[email protected]>
-Date: Sun, 23 Feb 2020 21:48:43 +0900
-Subject: Build mupdf without executable stack
-
-Fixes: #944817
-Thanks: Christopher Wellons
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index dabe17c..430f35b 100644
---- a/Makefile
-+++ b/Makefile
-@@ -60,7 +60,7 @@ endif
- LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
- TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
- WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
--OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -o $@ $<
-+OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
- 
- # --- Rules ---
- 
diff --git a/debian/patches/0010-Prevent-thirdparty-archive-build.patch b/debian/patches/0010-Prevent-thirdparty-archive-build.patch
index b687be1d..cf9f07be 100644
--- a/debian/patches/0010-Prevent-thirdparty-archive-build.patch
+++ b/debian/patches/0010-Prevent-thirdparty-archive-build.patch
@@ -7,12 +7,12 @@ Subject: Prevent thirdparty archive build
  1 file changed, 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 430f35b..b6a7a4d 100644
+index b9bdcc6..a37d5e5 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -192,7 +192,6 @@ generate: source/pdf/js/util.js.h
- # --- Library ---
- 
+@@ -217,7 +217,6 @@ MUPDF_LIB = $(OUT)/libmupdf.$(SO)
+ $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ) $(THREAD_OBJ) $(PKCS7_OBJ)
+ else
  MUPDF_LIB = $(OUT)/libmupdf.a
 -THIRD_LIB = $(OUT)/libmupdf-third.a
  THREAD_LIB = $(OUT)/libmupdf-threads.a
diff --git a/debian/patches/series b/debian/patches/series
index 591e3fa4..c99af939 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,5 +5,4 @@
 0005-MuPDF-crossbuild-use-host-cc-for-utils.patch
 0006-Allow-disabling-objcopy.patch
 0007-mupdf-x11-does-not-need-to-link-to-libcrypto.patch
-0008-Build-mupdf-without-executable-stack.patch
 0010-Prevent-thirdparty-archive-build.patch
-- 
2.29.2

>From 248ef47162f2232c22e63849b95a395974bda6ef Mon Sep 17 00:00:00 2001
From: Bastian Germann <[email protected]>
Date: Sat, 24 Oct 2020 10:08:32 +0200
Subject: [PATCH 2/4] Revert "Build-Conflict with libssl" (Closes: #969301)

This reverts commit abadd6204e2c07037e8dabdbffb4be694c85c616.

OpenSSL is considered a system library
(AGPL: "major component of the operating system") in Debian as of
http://meetbot.debian.net/debian-ftp/2020/debian-ftp.2020-03-13-20.02.html

With that, the exception for system libraries can be invoked and an
AGPL-licensed program may link with OpenSSL without an additional exception.
---
 debian/control | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 7d68a284..d05b6950 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,7 @@ Uploaders: Quoc-Viet Nguyen <[email protected]>
 Build-Depends: debhelper (>= 12), dh-exec, dpkg-dev (>= 1.16.1.1~),
  libfreetype6-dev, pkg-config, libjpeg-dev, libjbig2dec-dev,
  libmujs-dev, libopenjp2-7-dev, libx11-dev, libxext-dev, zlib1g-dev,
- libharfbuzz-dev, freeglut3-dev, liblcms2-dev, python3:any
-Build-Conflicts: libssl-dev
+ libharfbuzz-dev, freeglut3-dev, libssl-dev, liblcms2-dev, python3:any
 Standards-Version: 4.5.0
 Homepage: http://mupdf.com/
 Vcs-Git: https://salsa.debian.org/koster/mupdf.git
-- 
2.29.2

>From 3427eb2b96c00c91e93ea4d287228ffae96424ec Mon Sep 17 00:00:00 2001
From: Bastian Germann <[email protected]>
Date: Sat, 24 Oct 2020 10:26:16 +0200
Subject: [PATCH 3/4] Depend on libgumbo

---
 debian/control  | 2 +-
 debian/mupdf.pc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index d05b6950..8d79733d 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Kan-Ru Chen (陳侃如) <[email protected]>
 Uploaders: Quoc-Viet Nguyen <[email protected]>
 Build-Depends: debhelper (>= 12), dh-exec, dpkg-dev (>= 1.16.1.1~),
- libfreetype6-dev, pkg-config, libjpeg-dev, libjbig2dec-dev,
+ libfreetype6-dev, libgumbo-dev, pkg-config, libjpeg-dev, libjbig2dec-dev,
  libmujs-dev, libopenjp2-7-dev, libx11-dev, libxext-dev, zlib1g-dev,
  libharfbuzz-dev, freeglut3-dev, libssl-dev, liblcms2-dev, python3:any
 Standards-Version: 4.5.0
diff --git a/debian/mupdf.pc b/debian/mupdf.pc
index bb58f4e1..c0dd5490 100644
--- a/debian/mupdf.pc
+++ b/debian/mupdf.pc
@@ -6,7 +6,7 @@ includedir=${prefix}/include
 Name: mupdf
 Description: Library for rendering PDF documents
 Requires.private: freetype2
-Version: 1.15.0
+Version: 1.18.0
 Libs: -L${libdir} -lmupdf
-Libs.private: -lmujs -lopenjp2 -ljbig2dec -ljpeg -lz -lm
+Libs.private: -lmujs -lgumbo -lopenjp2 -ljbig2dec -ljpeg -lz -lm
 Cflags: -I${includedir}
-- 
2.29.2

>From f10fcc7122a017815f5ac25dbcaa5ab77f465ed9 Mon Sep 17 00:00:00 2001
From: Bastian Germann <[email protected]>
Date: Sat, 24 Oct 2020 10:41:46 +0200
Subject: [PATCH 4/4] Update debhelper to v13 (Closes: #960074)

---
 debian/compat               | 1 -
 debian/control              | 3 ++-
 debian/libmupdf-dev.install | 1 -
 debian/rules                | 3 +++
 4 files changed, 5 insertions(+), 3 deletions(-)
 delete mode 100644 debian/compat

diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index 48082f72..00000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-12
diff --git a/debian/control b/debian/control
index 8d79733d..d7593532 100644
--- a/debian/control
+++ b/debian/control
@@ -3,11 +3,12 @@ Section: text
 Priority: optional
 Maintainer: Kan-Ru Chen (陳侃如) <[email protected]>
 Uploaders: Quoc-Viet Nguyen <[email protected]>
-Build-Depends: debhelper (>= 12), dh-exec, dpkg-dev (>= 1.16.1.1~),
+Build-Depends: debhelper-compat (= 13), dpkg-dev (>= 1.16.1.1~),
  libfreetype6-dev, libgumbo-dev, pkg-config, libjpeg-dev, libjbig2dec-dev,
  libmujs-dev, libopenjp2-7-dev, libx11-dev, libxext-dev, zlib1g-dev,
  libharfbuzz-dev, freeglut3-dev, libssl-dev, liblcms2-dev, python3:any
 Standards-Version: 4.5.0
+Rules-Requires-Root: no
 Homepage: http://mupdf.com/
 Vcs-Git: https://salsa.debian.org/koster/mupdf.git
 Vcs-Browser: https://salsa.debian.org/koster/mupdf
diff --git a/debian/libmupdf-dev.install b/debian/libmupdf-dev.install
index b6d89a8a..7b6eb1d6 100644
--- a/debian/libmupdf-dev.install
+++ b/debian/libmupdf-dev.install
@@ -1,4 +1,3 @@
-#! /usr/bin/dh-exec
 debian/tmp/usr/include
 debian/tmp/usr/lib
 debian/mupdf.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
diff --git a/debian/rules b/debian/rules
index 92533dae..56986a96 100755
--- a/debian/rules
+++ b/debian/rules
@@ -64,5 +64,8 @@ override_dh_auto_clean:
 	-rm -rf generated
 	-rm -rf source/pdf/cmaps
 
+override_dh_missing:
+	dh_missing --list-missing
+
 %:
 	dh $@
-- 
2.29.2

Reply via email to