summaryrefslogtreecommitdiff
path: root/app-text/mupdf/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/mupdf/files')
-rw-r--r--app-text/mupdf/files/mupdf-1.23.3-cross-fixes.patch120
-rw-r--r--app-text/mupdf/files/mupdf-1.23.3-darwin.patch45
-rw-r--r--app-text/mupdf/files/mupdf-1.23.3-openssl-x11.patch19
-rw-r--r--app-text/mupdf/files/mupdf-1.24.8-add-desktop-pc-files.patch33
4 files changed, 33 insertions, 184 deletions
diff --git a/app-text/mupdf/files/mupdf-1.23.3-cross-fixes.patch b/app-text/mupdf/files/mupdf-1.23.3-cross-fixes.patch
deleted file mode 100644
index 02fa3bfdd45c..000000000000
--- a/app-text/mupdf/files/mupdf-1.23.3-cross-fixes.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-Refreshed patches based on:
-https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch/
-https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch/
---- a/Makerules
-+++ b/Makerules
-@@ -9,6 +9,9 @@ ifeq ($(OS),)
- OS := $(OS:Darwin=MACOS)
- endif
-
-+PKG_CONFIG ?= pkg-config
-+CC_FOR_BUILD ?= $(CC)
-+
- WARNING_CFLAGS := -Wall -Wsign-compare
-
- # Feature configuration options
-@@ -190,51 +193,51 @@ else ifeq ($(OS),Linux)
- LDFLAGS += -sTOTAL_MEMORY=48MB
- endif
-
-- ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
-- SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
-- SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
-+ ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes)
-+ 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)
-+ 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)
- endif
-- ifeq ($(shell pkg-config --exists lcms2 && echo yes),yes)
-- SYS_LCMS2_CFLAGS := $(shell pkg-config --cflags lcms2)
-- SYS_LCMS2_LIBS := $(shell pkg-config --libs lcms2)
-+ ifeq ($(shell $(PKG_CONFIG) --exists lcms2 && echo yes),yes)
-+ SYS_LCMS2_CFLAGS := $(shell $(PKG_CONFIG) --cflags lcms2)
-+ SYS_LCMS2_LIBS := $(shell $(PKG_CONFIG) --libs lcms2)
- endif
-- ifeq ($(shell pkg-config --exists libjpeg && echo yes),yes)
-- SYS_LIBJPEG_CFLAGS := $(shell pkg-config --cflags libjpeg)
-- SYS_LIBJPEG_LIBS := $(shell pkg-config --libs libjpeg)
-+ ifeq ($(shell $(PKG_CONFIG) --exists libjpeg && echo yes),yes)
-+ SYS_LIBJPEG_CFLAGS := $(shell $(PKG_CONFIG) --cflags libjpeg)
-+ SYS_LIBJPEG_LIBS := $(shell $(PKG_CONFIG) --libs libjpeg)
- endif
-- ifeq ($(shell pkg-config --exists libopenjp2 && echo yes),yes)
-- SYS_OPENJPEG_CFLAGS := $(shell pkg-config --cflags libopenjp2)
-- SYS_OPENJPEG_LIBS := $(shell pkg-config --libs libopenjp2)
-+ ifeq ($(shell $(PKG_CONFIG) --exists libopenjp2 && echo yes),yes)
-+ SYS_OPENJPEG_CFLAGS := $(shell $(PKG_CONFIG) --cflags libopenjp2)
-+ SYS_OPENJPEG_LIBS := $(shell $(PKG_CONFIG) --libs libopenjp2)
- endif
-- ifeq ($(shell pkg-config --exists zlib && echo yes),yes)
-- SYS_ZLIB_CFLAGS := $(shell pkg-config --cflags zlib)
-- SYS_ZLIB_LIBS := $(shell pkg-config --libs zlib)
-+ ifeq ($(shell $(PKG_CONFIG) --exists zlib && echo yes),yes)
-+ SYS_ZLIB_CFLAGS := $(shell $(PKG_CONFIG) --cflags zlib)
-+ SYS_ZLIB_LIBS := $(shell $(PKG_CONFIG) --libs zlib)
- endif
-
-- HAVE_SYS_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
-+ HAVE_SYS_LEPTONICA := $(shell $(PKG_CONFIG) --exists 'lept >= 1.7.4' && echo yes)
- ifeq ($(HAVE_SYS_LEPTONICA),yes)
-- SYS_LEPTONICA_CFLAGS := $(shell pkg-config --cflags lept)
-- SYS_LEPTONICA_LIBS := $(shell pkg-config --libs lept)
-+ SYS_LEPTONICA_CFLAGS := $(shell $(PKG_CONFIG) --cflags lept)
-+ SYS_LEPTONICA_LIBS := $(shell $(PKG_CONFIG) --libs lept)
- endif
-
-- HAVE_SYS_TESSERACT := $(shell pkg-config --exists 'tesseract >= 4.0.0' && echo yes)
-+ HAVE_SYS_TESSERACT := $(shell $(PKG_CONFIG) --exists 'tesseract >= 4.0.0' && echo yes)
- ifeq ($(HAVE_SYS_TESSERACT),yes)
-- SYS_TESSERACT_CFLAGS := $(shell pkg-config --cflags tesseract)
-- SYS_TESSERACT_LIBS := $(shell pkg-config --libs tesseract)
-+ SYS_TESSERACT_CFLAGS := $(shell $(PKG_CONFIG) --cflags tesseract)
-+ SYS_TESSERACT_LIBS := $(shell $(PKG_CONFIG) --libs tesseract)
- endif
-
-- HAVE_SYS_CURL := $(shell pkg-config --exists libcurl && echo yes)
-+ HAVE_SYS_CURL := $(shell $(PKG_CONFIG) --exists libcurl && echo yes)
- ifeq ($(HAVE_SYS_CURL),yes)
-- SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl)
-- SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
-+ SYS_CURL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcurl)
-+ SYS_CURL_LIBS := $(shell $(PKG_CONFIG) --libs libcurl)
- endif
-
- HAVE_GLUT := yes
-@@ -243,18 +246,18 @@ else ifeq ($(OS),Linux)
- SYS_GLUT_LIBS := -lglut -lGL
- endif
-
- HAVE_X11 := not-unless-portage-tells-me
- ifeq ($(HAVE_X11),yes)
-- X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
-- X11_LIBS := $(shell pkg-config --libs x11 xext)
-+ X11_CFLAGS := $(shell $(PKG_CONFIG) --cflags x11 xext)
-+ X11_LIBS := $(shell $(PKG_CONFIG) --libs x11 xext)
- endif
-
- ifeq ($(HAVE_LIBCRYPTO),)
- HAVE_LIBCRYPTO := not-unless-portage-tells-me
- endif
- ifeq ($(HAVE_LIBCRYPTO),yes)
-- LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
-- LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
-+ LIBCRYPTO_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcrypto) -DHAVE_LIBCRYPTO
-+ LIBCRYPTO_LIBS := $(shell $(PKG_CONFIG) --libs libcrypto)
- endif
-
- HAVE_PTHREAD := yes
diff --git a/app-text/mupdf/files/mupdf-1.23.3-darwin.patch b/app-text/mupdf/files/mupdf-1.23.3-darwin.patch
deleted file mode 100644
index c151d81f175d..000000000000
--- a/app-text/mupdf/files/mupdf-1.23.3-darwin.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/Makerules
-+++ b/Makerules
-@@ -161,11 +161,11 @@ ifeq ($(OS),MINGW)
- else ifeq ($(OS),MACOS)
- HAVE_GLUT := yes
- SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
-- SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
-- CC = xcrun cc
-- AR = xcrun ar
-- LD = xcrun ld
-- RANLIB = xcrun ranlib
-+ SYS_GLUT_LIBS ?= -framework GLUT -framework OpenGL
-+ CC ?= xcrun cc
-+ AR ?= xcrun ar
-+ LD ?= xcrun ld
-+ RANLIB ?= xcrun ranlib
-
- ifneq ($(ARCHFLAGS),)
- $(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, and setting HAVE_LIBCRYPTO to no.")
-@@ -180,15 +180,7 @@ else ifeq ($(OS),MACOS)
- endif
- endif
-
--else ifeq ($(OS),Linux)
-- ifeq ($(PYODIDE_ROOT),)
-- HAVE_OBJCOPY := yes
-- else
-- # Pyodide's ld does not support -b so we cannot use it to create object
-- # files containing font data, so leave HAVE_OBJCOPY unset. And we need
-- # extra memory when linking.
-- LDFLAGS += -sTOTAL_MEMORY=48MB
-- endif
-+endif
-
- ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
- SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
-@@ -263,8 +255,6 @@ else ifeq ($(OS),Linux)
- PTHREAD_LIBS := -lpthread
- endif
-
--endif
--
- # The following section has various cross compilation configurations.
- #
- # Invoke these as:
diff --git a/app-text/mupdf/files/mupdf-1.23.3-openssl-x11.patch b/app-text/mupdf/files/mupdf-1.23.3-openssl-x11.patch
deleted file mode 100644
index b91bd9ad12e3..000000000000
--- a/app-text/mupdf/files/mupdf-1.23.3-openssl-x11.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/Makerules
-+++ b/Makerules
-@@ -243,14 +243,14 @@ else ifeq ($(OS),Linux)
- SYS_GLUT_LIBS := -lglut -lGL
- endif
-
-- HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
-+ HAVE_X11 := not-unless-portage-tells-me
- ifeq ($(HAVE_X11),yes)
- X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
- X11_LIBS := $(shell pkg-config --libs x11 xext)
- endif
-
- ifeq ($(HAVE_LIBCRYPTO),)
-- HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)
-+ HAVE_LIBCRYPTO := not-unless-portage-tells-me
- endif
- ifeq ($(HAVE_LIBCRYPTO),yes)
- LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
diff --git a/app-text/mupdf/files/mupdf-1.24.8-add-desktop-pc-files.patch b/app-text/mupdf/files/mupdf-1.24.8-add-desktop-pc-files.patch
new file mode 100644
index 000000000000..03d5a014fe48
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.24.8-add-desktop-pc-files.patch
@@ -0,0 +1,33 @@
+--- /dev/null
++++ ./platform/debian/mupdf.desktop
+@@ -0,0 +1,15 @@
++[Desktop Entry]
++Name=MuPDF
++GenericName=PDF file viewer
++Exec=mupdf %f
++TryExec=mupdf
++Icon=mupdf-icon
++Terminal=false
++Type=Application
++MimeType=application/pdf;application/x-pdf;application/x-cbz;application/oxps;application/vnd.ms-xpsdocument;image/jpeg;image/pjpeg;image/png;image/tiff;image/x-tiff;
++Categories=Viewer;Graphics;
++Actions=View;
++
++[Desktop Action View]
++Name=View with mupdf
++Exec=mupdf %f
+--- /dev/null
++++ ./platform/debian/mupdf.pc
+@@ -0,0 +1,12 @@
++prefix=/usr
++exec_prefix=${prefix}
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: mupdf
++Description: Library for rendering PDF documents
++Requires: freetype2 libopenjp2 libcrypto
++Version: 0.5.0
++Libs: -L${libdir} -lmupdf
++Libs.private: -lmupdf-js-none
++Cflags: -I${includedir}