mupdf: 1.25.3 -> 1.26.1

Changelog: https://github.com/ArtifexSoftware/mupdf/blob/1.26.1/CHANGES

We no longer need the patch, as this was fixed upstream.

USE_SONAME must be yes now per https://issues.guix.gnu.org/78401#2-lineno0

Closes: #386518
Closes: #409069
Resolves: #407523
This commit is contained in:
Michael Daniels
2025-05-27 16:43:34 -04:00
parent 01e096822b
commit 82e561d732
2 changed files with 11 additions and 69 deletions
@@ -1,60 +0,0 @@
diff --git a/Makerules b/Makerules
index f582dc061..2da5680b6 100644
--- a/Makerules
+++ b/Makerules
@@ -178,39 +178,20 @@ ifneq "$(CLUSTER)" ""
endif
ifeq ($(OS),Linux)
- LINUX_OR_OPENBSD := yes
+ LINUX_OR_OPENBSD_OR_MACOS := yes
endif
ifeq ($(OS),OpenBSD)
- LINUX_OR_OPENBSD := yes
+ LINUX_OR_OPENBSD_OR_MACOS := yes
+endif
+ifeq ($(OS),MACOS)
+ LINUX_OR_OPENBSD_OR_MACOS := yes
endif
ifeq ($(OS),MINGW)
WINDRES := windres
HAVE_WIN32 := yes
-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
-
- ifneq ($(ARCHFLAGS),)
- $(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, and setting HAVE_LIBCRYPTO to no.")
- HAVE_LIBCRYPTO := no
- else ifeq (, $(shell command -v pkg-config))
- $(warning "No pkg-config found, install it for proper integration of libcrypto")
- else
- HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)
- ifeq ($(HAVE_LIBCRYPTO),yes)
- LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
- LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
- endif
- endif
-
-else ifeq ($(LINUX_OR_OPENBSD),yes)
+else ifeq ($(LINUX_OR_OPENBSD_OR_MACOS),yes)
ifeq ($(OS),Linux)
HAVE_OBJCOPY := yes
@@ -274,6 +255,9 @@ else ifeq ($(LINUX_OR_OPENBSD),yes)
ifeq ($(OS),OpenBSD)
SYS_GLUT_CFLAGS := $(shell pkg-config --cflags glut gl)
SYS_GLUT_LIBS := $(shell pkg-config --libs glut gl)
+ else ifeq ($(OS),MACOS)
+ SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
+ SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
else
SYS_GLUT_CFLAGS :=
SYS_GLUT_LIBS := -lglut -lGL
+11 -9
View File
@@ -36,6 +36,7 @@
swig,
xcbuild,
gitUpdater,
enableBarcode ? false,
# for passthru.tests
cups-filters,
@@ -61,18 +62,15 @@ let
in
stdenv.mkDerivation rec {
version = "1.25.3";
version = "1.26.1";
pname = "mupdf";
src = fetchurl {
url = "https://mupdf.com/downloads/archive/${pname}-${version}-source.tar.gz";
hash = "sha256-uXTXBqloBTPRBLQRIiTHvz3pPye+fKQbS/tRVSYk8Kk=";
hash = "sha256-vc4BfHdnRMKIsCECl37gN4y0NseN+BJ6I/KB8TYEBv0=";
};
patches = [
# Upstream makefile does not work with system deps on macOS by default, so
# we reuse the Linux section instead.
./fix-darwin-system-deps.patch
# Upstream C++ wrap script only defines fixed-sized integers on macOS but
# this is required on aarch64-linux too.
./fix-cpp-build.patch
@@ -101,7 +99,11 @@ stdenv.mkDerivation rec {
]
++ lib.optionals (!enableX11) [ "HAVE_X11=no" ]
++ lib.optionals (!enableGL) [ "HAVE_GLUT=no" ]
++ lib.optionals (enableOcr) [ "USE_TESSERACT=yes" ];
++ lib.optionals (enableOcr) [ "USE_TESSERACT=yes" ]
++ lib.optionals (enableBarcode) [
"barcode=yes"
"USE_SYSTEM_ZXINGCPP=no"
];
nativeBuildInputs =
[ pkg-config ]
@@ -159,7 +161,7 @@ stdenv.mkDerivation rec {
];
preConfigure = ''
# Don't remove mujs because upstream version is incompatible
# Don't remove mujs or zxing-cpp because upstream version is incompatible
rm -rf thirdparty/{curl,freetype,glfw,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}
'';
@@ -242,7 +244,7 @@ stdenv.mkDerivation rec {
)
+ (lib.optionalString (enableCxx) ''
cp platform/c++/include/mupdf/*.h $out/include/mupdf
cp build/*/libmupdfcpp.so $out/lib
cp build/*/libmupdfcpp.so* $out/lib
'')
+ (lib.optionalString (enablePython) (
''
@@ -257,7 +259,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
env.USE_SONAME = "no";
env.USE_SONAME = "yes";
passthru = {
tests = {